Thread (61 messages) 61 messages, 12 authors, 2022-02-16

Re: [PATCH 04/14] x86: use more conventional access_ok() definition

From: Al Viro <viro@zeniv.linux.org.uk>
Date: 2022-02-14 20:46:22
Also in: linux-alpha, linux-api, linux-arch, linux-m68k, linux-mips, linux-mm, linux-riscv, linux-s390, linux-sh, linuxppc-dev, lkml, sparclinux

On Mon, Feb 14, 2022 at 12:01:05PM -0800, Linus Torvalds wrote:
On Mon, Feb 14, 2022 at 11:46 AM Arnd Bergmann [off-list ref] wrote:
quoted
As Al pointed out, they turned out to be necessary on sparc64, but the only
definitions are on sparc64 and x86, so it's possible that they serve a similar
purpose here, in which case changing the limit from TASK_SIZE to
TASK_SIZE_MAX is probably wrong as well.
x86-64 has always(*) used TASK_SIZE_MAX for access_ok(), and the
get_user() assembler implementation does the same.

I think any __range_not_ok() users that use TASK_SIZE are entirely
historical, and should be just fixed.
IIRC, that was mostly userland stack trace collection in perf.
I'll try to dig in archives and see what shows up - it's been
a while ago...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help