)]}'
{
  "commit": "4eb559dd15671cca355a61a4164e8f19e3952637",
  "tree": "4dc628d17aa96b5dea6aaedd233a9e37716cdbdc",
  "parents": [
    "9f187ba0d5170b242561133724188142b62dc34c",
    "8b972158afcaa66c538c3ee1d394f096fcd238a8"
  ],
  "author": {
    "name": "Darrick J. Wong",
    "email": "djwong@kernel.org",
    "time": "Tue Nov 01 09:52:13 2022 -0700"
  },
  "committer": {
    "name": "Darrick J. Wong",
    "email": "djwong@kernel.org",
    "time": "Tue Nov 01 09:52:13 2022 -0700"
  },
  "message": "Merge tag \u0027refcount-cow-domain-6.1_2022-10-31\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux into xfs-6.1-fixesA\n\nxfs: improve runtime refcountbt corruption detection\n\nFuzz testing of the refcount btree demonstrated a weakness in validation\nof refcount btree records during normal runtime.  The idea of using the\nupper bit of the rc_startblock field to separate the refcount records\ninto one group for shared space and another for CoW staging extents was\nadded at the last minute.  The incore struct left this bit encoded in\nthe upper bit of the startblock field, which makes it all too easy for\narithmetic operations to overflow if we don\u0027t detect the cowflag\nproperly.\n\nWhen I ran a norepair fuzz tester, I was able to crash the kernel on one\nof these accidental overflows by fuzzing a key record in a node block,\nwhich broke lookups.  To fix the problem, make the domain (shared/cow) a\nseparate field in the incore record.\n\nUnfortunately, a customer also hit this once in production.  Due to bugs\nin the kernel running on the VM host, writes to the disk image would\noccasionally be lost.  Given sufficient memory pressure on the VM guest,\na refcountbt xfs_buf could be reclaimed and later reloaded from the\nstale copy on the virtual disk.  The stale disk contents were a refcount\nbtree leaf block full of records for the wrong domain, and this caused\nan infinite loop in the guest VM.\n\nv2: actually include the refcount adjust loop invariant checking patch;\n    move the deferred refcount continuation checks earlier in the series;\n    break up the megapatch into smaller pieces; fix an uninitialized list\n    error.\nv3: in the continuation check patch, verify the per-ag extent before\n    converting it to a fsblock\n\nSigned-off-by: Darrick J. Wong \u003cdjwong@kernel.org\u003e\n\n* tag \u0027refcount-cow-domain-6.1_2022-10-31\u0027 of git://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux:\n  xfs: rename XFS_REFC_COW_START to _COWFLAG\n  xfs: fix uninitialized list head in struct xfs_refcount_recovery\n  xfs: fix agblocks check in the cow leftover recovery function\n  xfs: check record domain when accessing refcount records\n  xfs: remove XFS_FIND_RCEXT_SHARED and _COW\n  xfs: refactor domain and refcount checking\n  xfs: report refcount domain in tracepoints\n  xfs: track cow/shared record domains explicitly in xfs_refcount_irec\n  xfs: refactor refcount record usage in xchk_refcountbt_rec\n  xfs: move _irec structs to xfs_types.h\n  xfs: check deferred refcount op continuation parameters\n  xfs: create a predicate to verify per-AG extents\n  xfs: make sure aglen never goes negative in xfs_refcount_adjust_extents\n",
  "tree_diff": []
}
