Re: [PATCH pidfd] signal: Add missing __user annotation to copy_siginfo_from_user_any

From: Christian Brauner
Date: Mon Dec 07 2020 - 05:33:32 EST


On Mon, Dec 07, 2020 at 01:02:52AM +0100, Jann Horn wrote:
> copy_siginfo_from_user_any() takes a userspace pointer as second
> argument; annotate the parameter type accordingly.
>
> Signed-off-by: Jann Horn <jannh@xxxxxxxxxx>
> ---
> I'm messing around with clang's version of __user annotation checking
> and it spotted this issue:
>
> kernel/signal.c:3759:44: warning: casting to dereferenceable pointer removes 'noderef' attribute [-Wnoderef]
> ret = copy_siginfo_from_user_any(&kinfo, info);
> ^~~~
> Untracked cast to function pointer at kernel/signal.c:4294:26
>
>
> Christian, since this is pidfd code, can you take this through your tree?
> Or should I send this to akpm (or someone else)?

I'm picking it up now. :) Thanks!

Christian