Files
Linux/lib
Stephen Boyd 792702911f slub: force on no_hash_pointers when slub_debug is enabled
Obscuring the pointers that slub shows when debugging makes for some
confusing slub debug messages:

 Padding overwritten. 0x0000000079f0674a-0x000000000d4dce17

Those addresses are hashed for kernel security reasons.  If we're trying
to be secure with slub_debug on the commandline we have some big problems
given that we dump whole chunks of kernel memory to the kernel logs.
Let's force on the no_hash_pointers commandline flag when slub_debug is on
the commandline.  This makes slub debug messages more meaningful and if by
chance a kernel address is in some slub debug object dump we will have a
better chance of figuring out what went wrong.

Note that we don't use %px in the slub code because we want to reduce the
number of places that %px is used in the kernel.  This also nicely prints
a big fat warning at kernel boot if slub_debug is on the commandline so
that we know that this kernel shouldn't be used on production systems.

[[email protected]: fix build with CONFIG_SLUB_DEBUG=n]

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Stephen Boyd <[email protected]>
Acked-by: Vlastimil Babka <[email protected]>
Acked-by: Petr Mladek <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Muchun Song <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2021-06-29 10:53:47 -07:00
..
…
…
2021-06-29 10:53:46 -07:00
…
…
…
…
…
2021-04-14 16:30:30 +03:00
…
…
2021-05-06 19:24:12 -07:00
…
…
…
…
…
…
…
2021-01-21 14:06:00 -07:00
…
…
2021-06-05 08:58:12 -07:00
…
…
2021-01-03 20:05:18 -05:00
…
…
…
…
…
…
…
…
…
…
…
2021-04-14 16:30:30 +03:00
2021-02-26 09:41:05 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
2021-05-06 19:24:12 -07:00
…
…
…
…
…
…
…
…
2020-12-15 22:46:16 -08:00
2020-12-15 22:46:16 -08:00
2021-02-26 09:41:05 -08:00
…
…
…
2021-02-26 09:41:05 -08:00
…
…
…