diff options
author | 2021-02-25 17:19:40 -0800 | |
---|---|---|
committer | 2021-02-26 09:41:02 -0800 | |
commit | 35beccf0926d42ee0d56e41979ec8cdf814c4769 (patch) | |
tree | 76e12c5cf818b3abcd59d1466c52c518202b0873 /mm/kfence/kfence_test.c | |
parent | MAINTAINERS: add entry for KFENCE (diff) | |
download | linux-35beccf0926d42ee0d56e41979ec8cdf814c4769.tar.gz linux-35beccf0926d42ee0d56e41979ec8cdf814c4769.tar.bz2 linux-35beccf0926d42ee0d56e41979ec8cdf814c4769.zip |
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>
Diffstat (limited to 'mm/kfence/kfence_test.c')
-rw-r--r-- | mm/kfence/kfence_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/kfence/kfence_test.c b/mm/kfence/kfence_test.c index db1bb596acaf..4acf4251ee04 100644 --- a/mm/kfence/kfence_test.c +++ b/mm/kfence/kfence_test.c @@ -146,7 +146,7 @@ static bool report_matches(const struct expect_report *r) break; } - cur += scnprintf(cur, end - cur, " 0x" PTR_FMT, (void *)r->addr); + cur += scnprintf(cur, end - cur, " 0x%p", (void *)r->addr); spin_lock_irqsave(&observed.lock, flags); if (!report_available()) |