xfs: use %px for data pointers when debugging
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 9 Jan 2018 20:02:55 +0000 (12:02 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 12 Jan 2018 22:09:08 +0000 (14:09 -0800)
commitc96900435fa9fdfd9702a60cd765bd85e380303e
treebbda292a21a12d0e37644506400a65b5acdb5c81
parentaff68a5502d24be416e256478448e228f1a88aaf
xfs: use %px for data pointers when debugging

Starting with commit 57e734423ad ("vsprintf: refactor %pK code out of
pointer"), the behavior of the raw '%p' printk format specifier was
changed to print a 32-bit hash of the pointer value to avoid leaking
kernel pointers into dmesg.  For most situations that's good.

This is /undesirable/ behavior when we're trying to debug XFS, however,
so define a PTR_FMT that prints the actual pointer when we're in debug
mode.

Note that %p for tracepoints still prints the raw pointer, so in the
long run we could consider rewriting some of these messages as
tracepoints.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/libxfs/xfs_dir2_node.c
fs/xfs/xfs_aops.c
fs/xfs/xfs_dquot_item.c
fs/xfs/xfs_fsops.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_linux.h
fs/xfs/xfs_log.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_qm.c