/proc/kcore is a read-only virtual file that exposes the whole of physical memory and the kernel’s virtual address space as an ELF core dump. It has real uses, like live kernel debugging and memory forensics, and it’s already limited to root or processes with CAP_SYS_RAWIO. Still, that’s all of kernel memory in one file.
Phoronix reports a patch from Chris Down heading for Linux 7.5 adds a kcore= boot parameter. Booting with kcore=off disables it, as long as the kernel was built with CONFIG_PROC_KCORE in the first place.
My take
I like this kind of hardening: a simple switch, off only if you ask. On servers where nobody does live kernel debugging, turning off one more window into kernel memory costs nothing. Just remember it’s there before your forensics folks need it.
God Bless, and Use the Source!