Re: [PATCH v3] proc/kcore: allow disabling /proc/kcore at boot
From: Chris Down
Date: Mon Nov 23 2026 - 01:11:40 EST
Hi Christian,
Thanks for picking this up!
Christian Brauner writes:
Iow, it would be nicer if someone took the time and came up with some
boot setting that is a list of memory protection settings instead of
spraying ever more kernel command line switches that nobody can
reasonably remember or use.
Hmm, I agree that would be nicer, but I don't see a good way to do it. How
would you suggest going about it?
In my mind, the model one would have for a list like that is mitigations=,
but it didn't replace the specific switches, right? For example, retbleed=
and mds= have nevertheless stayed. In that case, the list sets their
defaults, but more specific switches win out over it.
These are the problems I see with a list like that:
1. I don't know where the list would live. A list of memory protection
settings in procfs would cover two switches today (that is, kcore= and
proc_mem.force_override=). Anything wider crosses into mm and security
(I have similar switches out for slab hardening and mseal, for example),
and it isn't clear to me who would own that or decide what goes on it.
2. Lockdown already has a list of what gives access to kernel memory,
with entries for /proc/kcore, /dev/mem, kprobes and so on (although
not for FOLL_FORCE), but lockdown= only takes the two levels.
Selecting individual entries was proposed last year, and the lockdown
maintainers turned it down because most entries can be bypassed when
they are used on their own [1]. So a wider list would have to be a
second one next to lockdown's.
Did you have something specific in mind in terms of a design and what it
would encompass?
Chris
[1] https://lore.kernel.org/r/2vldrnqs6fbljqqp6vbwmkushx6dxcpephgb6svmu5i64lijpy@lg37aflddv3b