summaryrefslogtreecommitdiff
tag namescrub-fix-xattr-memory-mgmt_2022-11-09 (dd8869197fc3a4167a189541c7f748be5ace0f7d)
tag date2022-11-09 19:09:49 -0800
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 5211ba1508...
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+H93GTRKtOsFAmNsa30ACgkQ+H93GTRK tOuG4g/8D3I4UWA0Ih+TrCxVm6ArRO4hJ8lbp9mkbbn1OxUO2Z0EVTc5dizDTXy2 zqdDsE6pAKlCyP/NxO5efu0c/zY8ORMoPHVgnZ/kyiIyxVdKx8rsi+nNujAbRKyl AgYpsFCm+QZjjv5bQNJLCyajp0P4lEbD3dX/OY4lNqjEM0xghbiMS9lUpR/c/ZTh 7IZPN+t4vYdw77x5RxCeuYr2SoDglYED8/1N8d1wSfY5ONUSjiA1ZqXSwrOqLNbK ZxWzoqecpbYcSBWurRUdLnG7TltDU2htc48JZcN/Vfewea+mKQRiHekCoBmYBue1 zHDbeYogdQ/mYAhIAMuh79++y2M4aQYX/OqK3LihvmXC+aV46xZwX32nEkxmVkog HvLv2nhBsPqeK+yHhc07/kBMLUnqTFsun4E/Igy17eMY4PeFuDQdopMPjikU4Wy9 +NhAz1NBYeOVSglez5vXvM4u0Uo8XsIU97g6n8YgiMw23t/4pnG9+mpQRBuFWS8I mIv2ZtTZHZFVuj9YaYXBZqah/YetGoFotbkFPB64YIYtgxmj+cZwH5YgH4/HhAKn 930FWcAA5vjGKXYXDgUWEFQEDrKG8l+AdSTqyu01SxoYu/uVbZEJTJNiHPgLrXt/ HovM3dF5YkLkr3s/UHBDRROQzJNZiCLMKaJvJCTfcdQKgOQbnh8= =jOFK -----END PGP SIGNATURE-----