On 1/26/21 10:47 AM, Vlastimil Babka wrote:
Given Linus' current stance later in this thread, could we revive the idea of a
boot time option, or at least a CONFIG (I assume a runtime toggle would be too
much, even if limited to !kernel_lockdown:) , that would disable all hashing?
It would be really useful for a development/active debugging, as evidenced
below. Thanks.
So you're saying:
if CONFIG_PRINTK_NEVER_HASH is disabled, then %p prints hashed addresses
and %px prints unhashed.
If CONFIG_PRINTK_NEVER_HASH is enabled, then %p and %px both print
unhashed addresses.
I like this idea, and I would accept it as a solution if I had to, but I
still would also like for an option for print_hex_dump() to print
unhashed addresses even when CONFIG_PRINTK_NEVER_HASH is disabled. I
can't always recompile the entire kernel for my testing purposes.
The only drawback to this idea is: what happens if distros start
enabling CONFIG_PRINTK_NEVER_HASH by default, just because it makes
debugging easier?