Re: [PATCH 1/3] x86: fix access_ok() and valid_user_address() using wrong USER_PTR_MAX in modules
From: Borislav Petkov
Date: Thu Nov 06 2025 - 08:10:54 EST
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...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette