DARWIN: correct size of fstrace ICL_TYPE_LONG and ICL_TYPE_POINTER 58/14558/4
authorMark Vitale <mvitale@sinenomine.net>
Wed, 10 Mar 2021 04:12:50 +0000 (23:12 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 1 Jul 2021 20:03:13 +0000 (16:03 -0400)
commitadf08b464efa8c29256dc7b261b10b60cc31119d
tree239129b11ee896d53faf44d755cb9865638cf857
parent503db6ee8354bb1ed17ac365507491deecbdcd77
DARWIN: correct size of fstrace ICL_TYPE_LONG and ICL_TYPE_POINTER

Commit 248da50aa56f19bdc8b2b322f5e17b3d2a363dce 'icl 64 bit platform
rationalization' introduced support for 64-bit ICL_TYPE_POINTER and
ICL_TYPE_LONG for fstrace running on DARWIN kernels.  However, it
neglected to make the matching change in the fstrace utility itself,
which reads and reports these trace entries.  The result is that all
fstrace records which contain 64-bit pointers or longs are misreported
as 32-bit values.  Furthermore, any subsequent values in the same
fstrace record are also misreported because the offsets are now
incorrect.

Move the definition of ICL_LONG from afs_icl.c to icl.h so fstrace.c may
share the ICL_LONG logic and value.

Modify fstrace to use logic similar to the recording logic in afs_icl.c
so that the correct size and offsets are maintained while decoding the
contents of each fstrace record.

We can use the build-time value of ICL_LONG (rather than the runtime
value of afs_sizeofLong) because the difference only matters for SGI62
32-bit kernels.  It is unknown whether the existing code works correctly
for SGI62 32-bit mode, but this commit should not affect that support
either way.

Change-Id: I240f76fed4618822b774451c5184b1160f17221d
Reviewed-on: https://gerrit.openafs.org/14558
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/afs/afs_icl.c
src/config/icl.h
src/venus/fstrace.c