Re: [PATCH] seccomp: Remove bogus __user annotations

From: Jann Horn
Date: Fri Nov 20 2020 - 10:47:03 EST


On Fri, Nov 20, 2020 at 4:36 PM Tyler Hicks <code@xxxxxxxxxxx> wrote:
> Hey Jann - Thanks for cleaning this up!
>
> On 2020-11-20 02:59:13, Jann Horn wrote:
> > Buffers that are passed to read_actions_logged() and write_actions_logged()
> > are in kernel memory; the sysctl core takes care of copying from/to
> > userspace.
> >
> > Fixes: 0ddec0fc8900 ("seccomp: Sysctl to configure actions that are allowed to be logged")
>
> After tracing back through the code, I was struggling to understand why
> I thought the __user annotation was needed back then. It turns out that
> __user was correct when I wrote 0ddec0fc8900 and that the Fixes tag
> should be changed to this:
>
> Fixes: 32927393dc1c ("sysctl: pass kernel pointers to ->proc_handler")
>
> If you agree, please adjust and resubmit with:
>
> Reviewed-by: Tyler Hicks <code@xxxxxxxxxxx>
>
> Thank you!

Aaaah, that makes sense. Thanks, will do.