docs: make kptr_restrict and hash_pointers reference each other
PATCH 1/1 docs: make kptr_restrict and hash_pointers reference each other
vsprintf.c uses a mix of the kernel.kptr_restrict sysctl and the hash_pointers boot param to control pointer hashing. But that wasn't possible to tell without looking at the source code.
They have a different focus and purpose. To avoid wasting the time of users trying to use one instead of the other, simply have them reference each other in the Documentation.
---
(please just go ahead with any minor corrections; I mean do not ask for my opinion)
--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ Documentation/admin-guide/sysctl/kernel.rst | 2 ++ 2 files changed, 5 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +3 -0
@@ -1867,6 +1867,9 @@ param "no_hash_pointers" is an alias for this mode. + For controlling hashing dynamically at runtime, + use the sysctl `kernel.kptr_restrict` instead. + hashdist= [KNL,NUMA] Large hashes allocated during boot are distributed across NUMA nodes. Defaults on for 64-bit NUMA, off otherwise.
Documentation/admin-guide/sysctl/kernel.rst +2 -0
@@ -576,6 +576,8 @@ if leaking kernel pointer values to unprivileged users is a concern. When ``kptr_restrict`` is set to 2, kernel pointers printed using %pK will be replaced with 0s regardless of privileges. +For disabling these security restrictions early at boot time (and once +for all), use the ``hash_pointers`` boot parameter instead. modprobe ========
---
base-commit: 7d0a66e4bb9081d75c82ec4957c50034cb0ea449
change-id: 20251204-doc-hash-ptr-00e46e1a5398
Best regards,
Signature · 1 line
Marc Herbert <[email protected]>
Jonathan Corbet
maintainerQuoted 8 lines · Marc Herbert
vsprintf.cuses a mix of thekernel.kptr_restrictsysctl and thehash_pointersboot param to control pointer hashing. But that wasn't possible to tell without looking at the source code.They have a different focus and purpose. To avoid wasting the time of users trying to use one instead of the other, simply have them reference each other in the Documentation.
Quoted 8 lines
Signed-off-by Marc Herbert <[email protected]>---
(please just go ahead with any minor corrections; I mean do not ask for my opinion)--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ Documentation/admin-guide/sysctl/kernel.rst | 2 ++ 2 files changed, 5 insertions(+)
This one doesn't apply to docs-next; any chance I could get a respin?
Thanks,
jon