Re: [PATCH 2/2] mm/usercopy: enable usercopy size checking for modern versions of gcc

From: Linus Torvalds
Date: Mon Aug 29 2016 - 11:36:53 EST


On Mon, Aug 29, 2016 at 7:48 AM, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote:
>
> So I *think* your patch fixes the wrong problem. That's probably at
> least somewhat my fault because I misunderstood the issue before and may
> have described it wrong at some point.
>
> AFAICT, gcc isn't doing anything wrong, and the false positives are
> "intentional".
>
> There are in fact two static warnings (which are being silenced for new
> versions of gcc):

[ snip snip details ]

Ok.

Color me convinced, I never even looked at the two different cases, I
thought it was just one issue.

Let's just remove the spurious false positive warning then, in order
to re-instate the *actual* warning that right now is disabled entirely
due to the unrelated false positives.

Thanks for looking into this. Would you happen to also have a patch
that can be applied? Hint hint..

Linus