[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#639919: linux-2.6: please enable DEBUG_STRICT_USER_COPY_CHECKS



On dim., 2012-06-03 at 14:22 +0100, Ben Hutchings wrote:
> On Sun, 2012-06-03 at 09:07 +0200, Yves-Alexis Perez wrote:
> > On dim., 2012-06-03 at 01:08 +0100, Ben Hutchings wrote:
> > > So sizeof(s) == 4 and count <= 3,
> > 
> > How do you know that? From the call stack?
> 
> What?  Did you even read the code?

Sorry, I misunderstood that. Indeed, at runtime you know that count is
checked before so copy_from_user() will have a correct size.
> 
> > >  but the compiler is still too stupid
> > > to avoid generating a conditional call to copy_from_user_overflow().
> > > And this would break the build if we did what you're asking.
> > 
> > Well, I think the point is to manage to fix those (if it's now the
> > default upstream, I guess there will be some more visibility and people
> > trying to fix them).
> > 
> > I still think it's useful to catch those at compile time instead of at
> > runtime.
> 
> I think it's more useful to be able to build the kernel than to not be
> able to build the kernel.

Well, sure, but that doesn't mean it shouldn't be fixed upstream (wether
issues are false positive or real ones). But maybe that's not Debian
role to check for those.

Regards,
--
Yves-Alexis

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: