* [PATCH v2] docs: make kptr_restrict and hash_pointers reference each other
@ 2026-01-07 20:21 Marc Herbert
2026-01-07 22:22 ` Randy Dunlap
2026-01-16 18:32 ` Jonathan Corbet
0 siblings, 2 replies; 3+ messages in thread
From: Marc Herbert @ 2026-01-07 20:21 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-doc, linux-kernel, Rick Edgecombe, Marc Herbert
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.
Signed-off-by: Marc Herbert <marc.herbert@linux.intel.com>
---
Please just go ahead with any minor correction(s); I mean do not ask
for my opinion.
Changes in v2:
- Rebased on today's docs-next/master to fix textual, unrelated conflict
- Stop using backquotes in kernel-parameters.txt for consistency
- Link to v1: https://patch.msgid.link/20251205-doc-hash-ptr-v1-1-573966cfa404@linux.intel.com
---
Documentation/admin-guide/kernel-parameters.txt | 3 +++
Documentation/admin-guide/sysctl/kernel.rst | 3 +++
2 files changed, 6 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index a8d0afde7f85..b189dfd60059 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1969,6 +1969,9 @@ Kernel parameters
param "no_hash_pointers" is an alias for
this mode.
+ For controlling hashing dynamically at runtime,
+ use the "kernel.kptr_restrict" sysctl instead.
+
hashdist= [KNL,NUMA] Large hashes allocated during boot
are distributed across NUMA nodes. Defaults on
for 64-bit NUMA, off otherwise.
diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index 239da22c4e28..0315eb7ee6d4 100644
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -591,6 +591,9 @@ 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.
+
softlockup_sys_info & hardlockup_sys_info
=========================================
A comma separated list of extra system information to be dumped when
---
base-commit: f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1
change-id: 20251204-doc-hash-ptr-00e46e1a5398
Best regards,
--
Marc Herbert <marc.herbert@linux.intel.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] docs: make kptr_restrict and hash_pointers reference each other
2026-01-07 20:21 [PATCH v2] docs: make kptr_restrict and hash_pointers reference each other Marc Herbert
@ 2026-01-07 22:22 ` Randy Dunlap
2026-01-16 18:32 ` Jonathan Corbet
1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2026-01-07 22:22 UTC (permalink / raw)
To: Marc Herbert, Jonathan Corbet; +Cc: linux-doc, linux-kernel, Rick Edgecombe
On 1/7/26 12:21 PM, Marc Herbert wrote:
> 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.
>
> Signed-off-by: Marc Herbert <marc.herbert@linux.intel.com>
> ---
> Please just go ahead with any minor correction(s); I mean do not ask
> for my opinion.
>
> Changes in v2:
> - Rebased on today's docs-next/master to fix textual, unrelated conflict
> - Stop using backquotes in kernel-parameters.txt for consistency
> - Link to v1: https://patch.msgid.link/20251205-doc-hash-ptr-v1-1-573966cfa404@linux.intel.com
> ---
> Documentation/admin-guide/kernel-parameters.txt | 3 +++
> Documentation/admin-guide/sysctl/kernel.rst | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index a8d0afde7f85..b189dfd60059 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -1969,6 +1969,9 @@ Kernel parameters
> param "no_hash_pointers" is an alias for
> this mode.
>
> + For controlling hashing dynamically at runtime,
> + use the "kernel.kptr_restrict" sysctl instead.
See Documentation/admin-guide/sysctl/kernel.rst.
> +
> hashdist= [KNL,NUMA] Large hashes allocated during boot
> are distributed across NUMA nodes. Defaults on
> for 64-bit NUMA, off otherwise.
> diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
> index 239da22c4e28..0315eb7ee6d4 100644
> --- a/Documentation/admin-guide/sysctl/kernel.rst
> +++ b/Documentation/admin-guide/sysctl/kernel.rst
> @@ -591,6 +591,9 @@ 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.
(once and for all),
or
(until the next boot),
> +
> softlockup_sys_info & hardlockup_sys_info
> =========================================
> A comma separated list of extra system information to be dumped when
>
> ---
> base-commit: f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1
> change-id: 20251204-doc-hash-ptr-00e46e1a5398
>
> Best regards,
> --
> Marc Herbert <marc.herbert@linux.intel.com>
>
>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Thanks.
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] docs: make kptr_restrict and hash_pointers reference each other
2026-01-07 20:21 [PATCH v2] docs: make kptr_restrict and hash_pointers reference each other Marc Herbert
2026-01-07 22:22 ` Randy Dunlap
@ 2026-01-16 18:32 ` Jonathan Corbet
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2026-01-16 18:32 UTC (permalink / raw)
To: Marc Herbert; +Cc: linux-doc, linux-kernel, Rick Edgecombe, Marc Herbert
Marc Herbert <marc.herbert@linux.intel.com> writes:
> 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.
>
> Signed-off-by: Marc Herbert <marc.herbert@linux.intel.com>
> ---
> Please just go ahead with any minor correction(s); I mean do not ask
> for my opinion.
>
> Changes in v2:
> - Rebased on today's docs-next/master to fix textual, unrelated conflict
> - Stop using backquotes in kernel-parameters.txt for consistency
> - Link to v1: https://patch.msgid.link/20251205-doc-hash-ptr-v1-1-573966cfa404@linux.intel.com
> ---
> Documentation/admin-guide/kernel-parameters.txt | 3 +++
> Documentation/admin-guide/sysctl/kernel.rst | 3 +++
> 2 files changed, 6 insertions(+)
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-16 18:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07 20:21 [PATCH v2] docs: make kptr_restrict and hash_pointers reference each other Marc Herbert
2026-01-07 22:22 ` Randy Dunlap
2026-01-16 18:32 ` Jonathan Corbet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox