]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: use %px for data pointers when debugging
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 27 Feb 2018 04:43:18 +0000 (22:43 -0600)
committerEric Sandeen <sandeen@redhat.com>
Tue, 27 Feb 2018 04:43:18 +0000 (22:43 -0600)
commitd7e71605e73f5c05ac029046d56781b675311592
tree297be88297f165feb76e23eeb28cd3da1665e72c
parentef4109d1b66633808ed945c13e6478a5eb09952f
xfs: use %px for data pointers when debugging

Source kernel commit: c96900435fa9fdfd9702a60cd765bd85e380303e

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>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/libxfs_priv.h
libxfs/xfs_dir2_node.c