tag name | scrub-fix-xattr-memory-mgmt_2022-10-14 (77050708aea5ba13d5a33e4863464f4dbfbb99f5) |
tag date | 2022-10-14 14:18:30 -0700 |
tagged by | Darrick J. Wong <djwong@kernel.org> |
tagged object | commit 1a4c9029de... |
xfs: clean up memory management in xattr scrub
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-----
iQIzBAABCgAdFiEEUzaAxoMeQq6m2jMV+H93GTRKtOsFAmNJ0iYACgkQ+H93GTRK
tOsTaBAAq4FAcFHUxkFmcei/FNSUC5Z7SupDD9xjZ8e5Vw5RlGuBTxmKRYjbVJfT
yqaP5h2xK2r61t1O95afRMdqSb+yHsqD3pUkGG0rHyl1/i8SbdWq9gN4A6yDYnV4
YUYNatu9v4eN8sB9zfeMJ08RJBavE4snzFvatyC8hoWmGenwsj6KghWm5YViUqdO
/i4BYYTQcHaYW1PFj0cmUV1WU06XNs0UYliaUM3565ofqQ+1PHzyDyffBganTeiG
JbNbrT37D+pMLXN6mQKPM8ad8WtY3UE4+9J247F3Aijriop+87dbqi4TxnGHx++5
DoHYA+Jsktvt82lNwKsDnv+WMVmFFeHvLP9S4dESsEeS+bpY56FvTYxH5cAYwfx3
n61noMKsSuM7FzPBu332sffil85vShrY2NrMQEH1ohgmBIiU4TETg3WKhLh5ROLP
/SgjNGqUbcBEpGNUJWzXRodZHu1Nios+25d25E2Ab4KXacsgErgIAPDLdWAK/wIv
AAXclwhuKMD9tBX60YkSrM9DY+SNq2JHOsMX9EtlzK3rcLVmrnB9MzzLT13ZfZ5M
OVnjkCrVF65CGCxZDS70NHlkYSRLVypRNyDN8New7cKjKVw6+104B0AQnUqSIZFn
H8qbtm/3ZwP/dDLv/O4AK28c7J0Q1O9M14d5LcxU/sRs5TK8sEo=
=ATIc
-----END PGP SIGNATURE-----