mbox series

[v3,00/10] xfs: strengthen log intent validation

Message ID 160729618252.1607103.863261260798043728.stgit@magnolia (mailing list archive)
Headers show
Series xfs: strengthen log intent validation | expand

Message

Darrick J. Wong Dec. 6, 2020, 11:09 p.m. UTC
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
v3: call XFS_CORRUPTION_ERROR to dump the bad intent item to dmesg

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     |   78 +++++++++++++++++++++++++++++---------------
 fs/xfs/xfs_extfree_item.c  |   32 ++++++++++++++----
 fs/xfs/xfs_log_recover.c   |    5 ++-
 fs/xfs/xfs_refcount_item.c |   61 +++++++++++++++++++++++-----------
 fs/xfs/xfs_rmap_item.c     |   76 +++++++++++++++++++++++++++++--------------
 fs/xfs/xfs_trace.h         |   18 ++++++++++
 6 files changed, 188 insertions(+), 82 deletions(-)