xfs: fix [f]inobt magic value verification
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest8 patches 12 repliesIn review
- v39 patches 17 repliesSuperseded
- v2 posting 2/27 patches 4 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 RFC posting 1/2 | 3 patches | 6 replies | Superseded |
Changes in v4 from the cover letter · 21 lines
- Dropped set buf ops patch (already merged).
- Replace magic value asserts with build-time magic offset checks.
v3: https://marc.info/?l=linux-xfs&m=154929197225225&w=2
- Fix function declarations to include parameter names.
- Convert allocbt buffer verifier.
v2: https://marc.info/?l=linux-xfs&m=154894958207167&w=2
- Include djwong's ->b_ops patch w/ modifications.
- Added patch to fix up existing cpu endian magic checks, fold in typo fix.
- Replace static inline magic verifier helper with out of line variant, kill macro.
- Store on-disk byte order magics in ->b_ops.
- Added patch to refactor common xfs_da3_blkinfo checks.
v1: https://marc.info/?l=linux-xfs&m=154878684317178&w=2
- Remove endian conversion from helper.
- Drop finobt bad magic mitigation patch.
- Additional verifier magic fixups.
- Add verifier name typo fixup.
rfcv2: https://marc.info/?l=linux-xfs&m=154868884311668&w=2
- Split off finobt verifier into separate patch, assign it appropriately.
- Created helpers for xfs_buf_ops magic value verification.
- Added error mitigation patch for problematic finobt blocks.
rfcv1: https://marc.info/?l=linux-xfs&m=154834528212262&w=2
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | xfs: always check magic values in on-disk byte orderfs/ fs/ fs/ +2 more | +8 | 1 reply | |
| 2/8 | xfs: create a separate finobt verifierfs/ fs/ fs/ +2 more | +15 | 0 replies | |
| 3/8 | xfs: distinguish between inobt and finobt magic valuesfs/ fs/ fs/ | +28 | 2 replies | |
| 4/8 | xfs: split up allocation btree verifierfs/ fs/ fs/ +2 more | +20 | 0 replies | |
| 5/8 | xfs: distinguish between bnobt and cntbt magic valuesfs/ | +25 | 0 replies | |
| 6/8 | xfs: use verifier magic field in dir2 leaf verifiersfs/ fs/ | +30 | 3 replies | |
| 7/8 | xfs: miscellaneous verifier magic value fixupsfs/ fs/ fs/ +11 more | +63 | 3 replies | |
| 8/8 | xfs: factor xfs_da3_blkinfo verification into common helperfs/ fs/ fs/ +1 more | +43 | 0 replies |
Reviews trailers per patch
6 of 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Darrick J. Wong | Brian Foster |
|---|---|---|
| Series | R-b R-b R-b | |
| 1/8 | R-b | |
| 2/8 | R-b | |
| 3/8 | R-b | |
| 4/8 | R-b | |
| 5/8 | R-b | |
| 6/8 | ||
| 7/8 | ||
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/8] xfs: fix [f]inobt magic value verification
Hi all,
This is v4 of the buffer verifier magic value rework. The only changes in this version are that patch 1 of v3 has been dropped as it is already merged and that the magic value asserts that were added to several of the refactored verifiers are replaced with compile-time magic value offset checks starting from the top-level structures used in the associated verifiers.
Brian
v4:
- Dropped set buf ops patch (already merged).
- Replace magic value asserts with build-time magic offset checks.
v3: https://marc.info/?l=linux-xfs&m=154929197225225&w=2
- Fix function declarations to include parameter names.
- Convert allocbt buffer verifier.
v2: https://marc.info/?l=linux-xfs&m=154894958207167&w=2
- Include djwong's ->b_ops patch w/ modifications.
- Added patch to fix up existing cpu endian magic checks, fold in typo fix.
- Replace static inline magic verifier helper with out of line variant, kill macro.
- Store on-disk byte order magics in ->b_ops.
- Added patch to refactor common xfs_da3_blkinfo checks.
v1: https://marc.info/?l=linux-xfs&m=154878684317178&w=2
- Remove endian conversion from helper.
- Drop finobt bad magic mitigation patch.
- Additional verifier magic fixups.
- Add verifier name typo fixup.
rfcv2: https://marc.info/?l=linux-xfs&m=154868884311668&w=2
- Split off finobt verifier into separate patch, assign it appropriately.
- Created helpers for xfs_buf_ops magic value verification.
- Added error mitigation patch for problematic finobt blocks.
rfcv1: https://marc.info/?l=linux-xfs&m=154834528212262&w=2
Brian Foster (8):
xfs: always check magic values in on-disk byte order
xfs: create a separate finobt verifier
xfs: distinguish between inobt and finobt magic values
xfs: split up allocation btree verifier
xfs: distinguish between bnobt and cntbt magic values
xfs: use verifier magic field in dir2 leaf verifiers
xfs: miscellaneous verifier magic value fixups
xfs: factor xfs_da3_blkinfo verification into common helper
fs/xfs/libxfs/xfs_ag.c | 6 +- fs/xfs/libxfs/xfs_alloc.c | 12 ++-- fs/xfs/libxfs/xfs_alloc_btree.c | 74 ++++++++++----------- fs/xfs/libxfs/xfs_attr_leaf.c | 21 ++---- fs/xfs/libxfs/xfs_attr_remote.c | 8 ++- fs/xfs/libxfs/xfs_bmap_btree.c | 13 ++-- fs/xfs/libxfs/xfs_da_btree.c | 49 +++++++++----- fs/xfs/libxfs/xfs_da_format.h | 3 + fs/xfs/libxfs/xfs_dir2_block.c | 10 +-- fs/xfs/libxfs/xfs_dir2_data.c | 12 ++-- fs/xfs/libxfs/xfs_dir2_leaf.c | 100 ++++++----------------------- fs/xfs/libxfs/xfs_dir2_node.c | 10 +-- fs/xfs/libxfs/xfs_ialloc.c | 3 +- fs/xfs/libxfs/xfs_ialloc_btree.c | 25 +++++--- fs/xfs/libxfs/xfs_inode_buf.c | 2 +- fs/xfs/libxfs/xfs_refcount_btree.c | 3 +- fs/xfs/libxfs/xfs_rmap_btree.c | 3 +- fs/xfs/libxfs/xfs_sb.c | 5 +- fs/xfs/libxfs/xfs_shared.h | 4 +- fs/xfs/libxfs/xfs_symlink_remote.c | 3 +- fs/xfs/scrub/agheader_repair.c | 6 +- fs/xfs/xfs_buf.c | 19 ++++++ fs/xfs/xfs_buf.h | 2 + fs/xfs/xfs_log_recover.c | 12 ++-- fs/xfs/xfs_ondisk.h | 17 +++++ 25 files changed, 218 insertions(+), 204 deletions(-)
Signature · 1 line
2.17.2