lkml.org 
[lkml]   [2019]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] Convert filldir[64]() from __put_user() to unsafe_put_user()
On Sun, Oct 13, 2019 at 12:10 PM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> No arguments re put_user_ex side of things... Below is a completely
> untested patch for get_user_ex elimination (it seems to build, but that's
> it); in any case, I would really like to see comments from x86 folks
> before it goes anywhere.

Please don't do this:

> + if (unlikely(__copy_from_user(&sc, usc, sizeof(sc))))
> + goto Efault;

Why would you use __copy_from_user()? Just don't.

> + if (unlikely(__copy_from_user(&v, user_vm86,
> + offsetof(struct vm86_struct, int_revectored))))

Same here.

There's no excuse for __copy_from_user().

Linus

\
 
 \ /
  Last update: 2019-10-13 21:24    [W:0.344 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site