• Christian Borntraeger's avatar
    s390/debug: use pK for kernel pointers · 860ec7c6
    Christian Borntraeger authored
    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: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
    Acked-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    860ec7c6
debug.c 34.7 KB