[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251106192645.4108a505@pumpkin>
Date: Thu, 6 Nov 2025 19:26:45 +0000
From: David Laight <david.laight.linux@...il.com>
To: Mateusz Guzik <mjguzik@...il.com>
Cc: Borislav Petkov <bp@...en8.de>, Linus Torvalds
<torvalds@...ux-foundation.org>, "the arch/x86 maintainers"
<x86@...nel.org>, brauner@...nel.org, viro@...iv.linux.org.uk,
jack@...e.cz, linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
tglx@...utronix.de, pfalcato@...e.de
Subject: Re: [PATCH 1/3] x86: fix access_ok() and valid_user_address() using
wrong USER_PTR_MAX in modules
On Thu, 6 Nov 2025 14:19:06 +0100
Mateusz Guzik <mjguzik@...il.com> wrote:
> On Thu, Nov 6, 2025 at 2:10 PM Borislav Petkov <bp@...en8.de> wrote:
> >
> > On Thu, Nov 06, 2025 at 01:06:06PM +0100, Mateusz Guzik wrote:
> > > I don't know what are you trying to say here.
> > >
> > > Are you protesting the notion that reducing cache footprint of the
> > > memory allocator is a good idea, or perhaps are you claiming these
> > > vars are too problematic to warrant the effort, or something else?
> >
> > I'm saying all work which does not change the code in a trivial way should
> > have numbers to back it up. As in: "this change X shows this perf improvement
> > Y with the benchmark Z."
> >
> > Because code uglification better have a fair justification.
> >
> > Not just random "oh yeah, it would be better to have this." If the changes are
> > trivial, sure. But the runtime const thing was added for a very narrow case,
> > AFAIR, and it wasn't supposed to have a widespread use. And it ain't that
> > trivial, codewise.
> >
> > IOW, no non-trivial changes which become a burden to maintainers without
> > a really good reason for them. This has been the guiding principle for
> > non-trivial perf optimizations in Linux. AFAIR at least.
> >
> > But hey, what do I know...
>
> Then, as I pointed out, you should be protesting the patching of
> USER_PTR_MAX as it came with no benchmarks and also resulted in a
> regression.
>
IIRC it was a definite performance improvement for a specific workload
(compiling kernels) on a system where the relatively small d-cache
caused significant overhead reading the value from memory.
Look at the patch author for more info.
David
Powered by blists - more mailing lists