Linus Torvalds yesterday merged a patch from SUSE’s Petr Mladek introducing a new boot parameter option for the kernel to provide greater control over the behavior of hashing pointer values.
The default behavior of the Linux kernel continues to be that when a pointer is printed to the console that the pointer value is hashed. This pointer hashing is done so that unprivileged users won’t know of the actual kernel addresses should they be trying to exploit the system. That though can obviously make system debugging more of a challenge with the hashed pointers.
With Linux 6.17 there is now the “hash_pointer=” parameter to better control this feature and an alternative to the existing basic “no_hash_pointers” knob.
The default “auto” behavior for hash_pointers= is that pointer hashing is enabled unless SLAB debugging (slab_debug) is enabled since the hashed pointers make SLAB debugging much more challenging to impractical.
The hash_pointers= boot parameter can also be set to “always” so that it is always engaged even if SLAB debugging is active. Or “hash_pointers=never” to match the existing “no_hash_pointers” option of never hashing pointer values.
System administrators wanting to know more can see this patch merged for Linux 6.17.