[PATCH 04/14] x86: use more conventional access_ok() definition
Al Viro
viro at zeniv.linux.org.uk
Mon Feb 14 12:17:07 PST 2022
On Mon, Feb 14, 2022 at 12:01:05PM -0800, Linus Torvalds wrote:
> On Mon, Feb 14, 2022 at 11:46 AM Arnd Bergmann <arnd at kernel.org> wrote:
> >
> > 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...
More information about the linux-snps-arc
mailing list