[PATCH v2 00/10] xfs: strengthen log intent validation

Darrick J. Wong
2020-12-04T01:12:31Z

Hi all,

This patchset hoists the code that checks log intent record validation
into separate functions, and reworks them to use the standard field
validation predicates instead of open-coding them. This strengthens log
recovery against (some) fuzzed log items.

v2: rearrange some of the checks per hch; report intent item corruption

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything. Enjoy!
Comments and questions are, as always, welcome.

--D

kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=fix-recovered-log-intent-validation-5.11
---
fs/xfs/xfs_bmap_item.c | 77 +++++++++++++++++++++++++++++---------------
fs/xfs/xfs_extfree_item.c | 30 +++++++++++++----
fs/xfs/xfs_log_recover.c | 5 ++-
fs/xfs/xfs_refcount_item.c | 59 ++++++++++++++++++++++------------
fs/xfs/xfs_rmap_item.c | 74 ++++++++++++++++++++++++++++--------------
fs/xfs/xfs_trace.h | 19 +++++++++++
6 files changed, 182 insertions(+), 82 deletions(-)