summaryrefslogtreecommitdiff
tag namescrub-fix-xattr-memory-mgmt-6.4_2023-04-12 (0d0f43f71546786bac0f7e190465b2c772626cbf)
tag date2023-04-12 17:40:19 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 44af6c7e59...
xfs: clean up memory management in xattr scrub [v24.5]
Currently, the extended attribute scrubber uses a single VLA to store all the context information needed in various parts of the scrubber code. This includes xattr leaf block space usage bitmaps, and the value buffer used to check the correctness of remote xattr value block headers. We try to minimize the insanity through the use of helper functions, but this is a memory management nightmare. Clean this up by making the bitmap and value pointers explicit members of struct xchk_xattr_buf. Second, strengthen the xattr checking by teaching it to look for overlapping data structures in the shortform attr data. Signed-off-by: Darrick J. Wong <djwong@kernel.org> -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZDdPcwAKCRBKO3ySh0YR pmurAP9rHDJGrWcbzXVi1fZPdXwpQtXP1pxmIomTz+rrVZkPLAEA/8bcM/Bkuf1/ i9Y/GBlO6M9suQlC+x+yq3ijRvaJVAM= =O2Vu -----END PGP SIGNATURE-----