Skip to content
Commit 5ead723a authored by Timur Tabi's avatar Timur Tabi Committed by Petr Mladek
Browse files

lib/vsprintf: no_hash_pointers prints all addresses as unhashed



If the no_hash_pointers command line parameter is set, then
printk("%p") will print pointers as unhashed, which is useful for
debugging purposes.  This change applies to any function that uses
vsprintf, such as print_hex_dump() and seq_buf_printf().

A large warning message is displayed if this option is enabled.
Unhashed pointers expose kernel addresses, which can be a security
risk.

Also update test_printf to skip the hashed pointer tests if the
command-line option is set.

Signed-off-by: default avatarTimur Tabi <timur@kernel.org>
Acked-by: default avatarPetr Mladek <pmladek@suse.com>
Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Acked-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Acked-by: default avatarMarco Elver <elver@google.com>
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20210214161348.369023-4-timur@kernel.org
parent d9d4de23
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment