arm64: access_ok() optimization
The TBI setup on arm64 is very strange: HW is set up to always do TBI,
but the kernel enforcement for system calls is purely a software
contract, and user space is supposed to mask off the top bits before the
system call.
Except all the actual brk/mmap/etc() system calls then mask it in kernel
space anyway, and accept any TBI address.
This basically unifies things and makes access_ok() also ignore it.
This is an ABI change, but the current situation is very odd, and this
change avoids the current mess and makes the kernel more permissive, and
as such is unlikely to break anything.
The way forward - for some possible future situation when people want to
use more bits - is probably to introduce a new "I actually want the full
64-bit address space" prctl. But we should make sure that the software
and hardware rules actually match at that point.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 file changed