[PATCH 1/6] syscalls: use uaccess_kernel in addr_limit_user_check
Christoph Hellwig
hch at lst.de
Tue Jul 21 01:35:42 EDT 2020
On Mon, Jul 20, 2020 at 10:30:30PM -0700, Guenter Roeck wrote:
> Guess I lost it somewhere. Are you saying the check was wrong all along
> and your patch fixed it ?
Oh, it is a little complicated.
Normally we have two address space limits, KERNEL_DS and USER_DS,
and they are supposed to be different. armnommu and m68k define them
to the same value for no good reason. That leads to:
uaccess_kernel always returning true as it does a positive check
agains KERNEL_DS, which disables a bunch of drivers like sg and
rdma, and could also lead to really strange and probably broken
results in a few places.
It also leads to the SIGKILL in addr_limit_user_check never
triggering due to the negatіve check, which is ok as the limits
never are different.
More information about the linux-riscv
mailing list