Re: [PATCH v4 3/4] x86/uaccess: Use pointer masking to limit uaccess speculation

From: Christoph Hellwig
Date: Thu May 06 2021 - 08:05:48 EST

On Thu, May 06, 2021 at 08:36:08AM +0000, David Laight wrote:
> uaddr = access_ok(uaddr, size)

access_ok as a public API is not interesting. There are very few
valid uses cases for ever calling access_ok outside the usual
uaccess helper. So leave access_ok alone, there is not point in
touching all the callers except for removing most of them. If OTOH
we can micro-optimize get_user and put_user by using a different
variant of access_ok that seems fair game and actually useful.