RE: [PATCHES] uaccess simple access_ok() removals

From: David Laight
Date: Sun May 10 2020 - 10:34:09 EST


From: Al Viro
> Sent: 10 May 2020 00:41
>
> One of the uaccess-related branches; this one is just the
> cases when access_ok() calls are trivially pointless - the address
> in question gets fed only to primitives that do access_ok() checks
> themselves.

There is also the check in rw_copy_check_uvector() that should
always be replicated by the copy_to/from_user() in _copy_to/from_iter().

And the strange call to rw_copy_check_uvector() in mm/process_vm_access.c
which carefully avoids the access_ok() check for the target process.
I did a quick look, but failed to see an obvious check further
down the call path.
The code is doing a read/write from another process, not sure when it
is used - not by gdb.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)