]> git.baikalelectronics.ru Git - kernel.git/commit
kfence: report sensitive information based on no_hash_pointers
authorMarco Elver <elver@google.com>
Fri, 26 Feb 2021 01:19:40 +0000 (17:19 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Feb 2021 17:41:02 +0000 (09:41 -0800)
commit73fc56d2fffe80992c29d67c6692ae499b56ca29
tree76e12c5cf818b3abcd59d1466c52c518202b0873
parent674c26d4298a6b27650dc525edaded61f1a3a9f7
kfence: report sensitive information based on no_hash_pointers

We cannot rely on CONFIG_DEBUG_KERNEL to decide if we're running a "debug
kernel" where we can safely show potentially sensitive information in the
kernel log.

Instead, simply rely on the newly introduced "no_hash_pointers" to print
unhashed kernel pointers, as well as decide if our reports can include
other potentially sensitive information such as registers and corrupted
bytes.

Link: https://lkml.kernel.org/r/20210223082043.1972742-1-elver@google.com
Signed-off-by: Marco Elver <elver@google.com>
Cc: Timur Tabi <timur@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Cc: Jann Horn <jannh@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/dev-tools/kfence.rst
mm/kfence/core.c
mm/kfence/kfence.h
mm/kfence/kfence_test.c
mm/kfence/report.c