s390/debug: Remove pointer obfuscation
authorPeter Oberparleiter <oberpar@linux.ibm.com>
Wed, 9 Jun 2021 12:05:56 +0000 (14:05 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Fri, 18 Jun 2021 14:41:19 +0000 (16:41 +0200)
When read via debugfs, s390dbf debug-views print the kernel address of
the call-site that created a trace entry. The kernel's %p pointer
hashing feature obfuscates this address, and commit 860ec7c6e21c
("s390/debug: use pK for kernel pointers") made this obfuscation
configurable via the kptr_restrict sysctl.

Obfuscation of kernel address data printed via s390dbf debug-views does
not add any additional protection since the associated debugfs files are
only accessible to the root user that typically has enough other means
to obtain kernel address data.

Also trace payload data may contain binary representations of kernel
addresses as part of logged data structues. Requiring such payload data
to be obfuscated as well would be impractical and greatly diminish the
use of s390dbf.

Therefore completely remove pointer obfuscation from s390dbf
debug-views.

Reviewed-by: Steffen Maier <maier@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/debug.c

index bb958d3..09b6c64 100644 (file)
@@ -1418,7 +1418,7 @@ int debug_dflt_header_fn(debug_info_t *id, struct debug_view *view,
        else
                except_str = "-";
        caller = (unsigned long) entry->caller;
-       rc += sprintf(out_buf, "%02i %011ld:%06lu %1u %1s %04u %pK  ",
+       rc += sprintf(out_buf, "%02i %011ld:%06lu %1u %1s %04u %px  ",
                      area, sec, usec, level, except_str,
                      entry->cpu, (void *)caller);
        return rc;