Restrict kstats and print real pointers

There are several places where we use zfs_dbgmsg and %p to
print pointers. In the Linux kernel, these values obfuscated
to prevent information leaks which means the pointers aren't
very useful for debugging crash dumps. We decided to restrict
the permissions of dbgmsg (and some other kstats while we were
at it) and print pointers with %px in zfs_dbgmsg as well as
spl_dumpstack

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Gallagher <john.gallagher@delphix.com>
Signed-off-by: sara hartse <sara.hartse@delphix.com>
Closes #8467 
Closes #8476
This commit is contained in:
Sara Hartse
2019-04-04 18:57:06 -07:00
committed by Brian Behlendorf
parent af65079300
commit a887d653b3
18 changed files with 33 additions and 17 deletions
@@ -33,11 +33,11 @@ log_assert "dbufstat generates output and doesn't return an error code"
typeset -i i=0
while [[ $i -lt ${#args[*]} ]]; do
log_must eval "dbufstat ${args[i]} > /dev/null"
log_must eval "sudo dbufstat ${args[i]} > /dev/null"
((i = i + 1))
done
# A simple test of dbufstat filter functionality
log_must eval "dbufstat -F object=10,dbc=1,pool=$TESTPOOL > /dev/null"
log_must eval "sudo dbufstat -F object=10,dbc=1,pool=$TESTPOOL > /dev/null"
log_pass "dbufstat generates output and doesn't return an error code"