Messages in this thread | | | Date | Sun, 29 Mar 2020 19:16:27 +0100 | From | Al Viro <> | Subject | Re: [RFC][PATCH 01/22] x86 user stack frame reads: switch to explicit __get_user() |
| |
On Sun, Mar 29, 2020 at 10:56:59AM -0700, Linus Torvalds wrote:
> But, if you have lots of performance-critical get_user() calls, just use > > if (user_access_begin(..)) > goto efault; > > .. multiple "unsafe_get_user(x,ptr,efault);" .. > > user_access_end(); > ... > > efault: > user_access_end(); > return -EFAULT; > > and be done with it.
Except that you'd better make that if (!user_access_begin(...)) return -EFAULT;
| |