]> git.baikalelectronics.ru Git - kernel.git/commit
s390/debug: use pK for kernel pointers
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 23 Nov 2017 18:26:20 +0000 (19:26 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 24 Nov 2017 13:28:34 +0000 (14:28 +0100)
commit35e102ee443dbe50ccbe34b6c1d4781ec1bae288
tree375847e608aa9dbe1c10abcd1a143a5bbb1c1b98
parentdcf9c8b3436c705031bec945f3b31bdb6805b7e5
s390/debug: use pK for kernel pointers

the s390 debug feature (/sys/kernel/debug/s390dbf/) shows the kernel
pointer of the calling function even for kptr_restrict == 2. Let us
use pK instead of p.

This hides the kernel addresses for kptr_restrict == 2:

root@host $ echo 2 >  /proc/sys/kernel/kptr_restrict
root@host $ tail -n1  /sys/kernel/debug/s390dbf/cio_msg/sprintf
00 01511461280:386645 2 - 00 0000000000000000  snsid: device 0.0.3f68: rc=0 3990/e9 3390/0c

root@host $ echo 1 >  /proc/sys/kernel/kptr_restrict
root@host $ tail -n1  /sys/kernel/debug/s390dbf/cio_msg/sprintf
00 01511461280:386645 2 - 00 000000000071171c  snsid: device 0.0.3f68: rc=0 3990/e9 3390/0c

root@host $ echo 0 >  /proc/sys/kernel/kptr_restrict
root@host $ tail -n1  /sys/kernel/debug/s390dbf/cio_msg/sprintf
00 01511461280:386645 2 - 00 000000000071171c  snsid: device 0.0.3f68: rc=0 3990/e9 3390/0c

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/debug.c