]> git.proxmox.com Git - mirror_zfs.git/commit
Restrict kstats and print real pointers
authorSara Hartse <sara.hartse@gmail.com>
Fri, 5 Apr 2019 01:57:06 +0000 (18:57 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 5 Apr 2019 01:57:06 +0000 (18:57 -0700)
commita887d653b32aaba3fe04c7b25ff0091b9ea9c64e
tree6d0bd45a6d2080fce9223ae252f5c93782418dd7
parentaf6507930051e9ee481cad1130df84636c4a770c
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
18 files changed:
cmd/ztest/ztest.c
include/spl/sys/debug.h
include/spl/sys/kstat.h
include/spl/sys/procfs_list.h
include/sys/zfs_context.h
lib/libzpool/kernel.c
module/spl/spl-kstat.c
module/spl/spl-procfs-list.c
module/zfs/arc.c
module/zfs/metaslab.c
module/zfs/range_tree.c
module/zfs/spa_stats.c
module/zfs/space_map.c
module/zfs/vdev_removal.c
module/zfs/zfs_debug.c
module/zfs/zil.c
module/zfs/zio.c
tests/zfs-tests/tests/functional/cli_user/misc/dbufstat_001_pos.ksh