kfence: report sensitive information based on no_hash_pointers 52/281552/1
authorMarco Elver <elver@google.com>
Tue, 23 Feb 2021 08:20:43 +0000 (09:20 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 20 Sep 2022 02:45:50 +0000 (11:45 +0900)
commitd6617e038823b56d99169b7f5ad174871430c4e8
tree5cb41911f7c2b1d40a5bfd568ca122225c1cc680
parentf0e2bb4198dba33f5fa962ea3ff553727fcd5c8c
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.

Cc: Timur Tabi <timur@kernel.org>
Signed-off-by: Marco Elver <elver@google.com>
[port kfence feature to rpi-5.10.95]
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: Ie87a49f890db5a49503afe50e63d908247eb31a3
Documentation/dev-tools/kfence.rst
mm/kfence/core.c
mm/kfence/kfence.h
mm/kfence/kfence_test.c
mm/kfence/report.c