linux/fs/hfs
Linus Torvalds dd7b15aeac hfs/hfsplus updates for v7.4
- hfs: handle extent B-tree write errors
 - hfsplus: add KUnit coverage for canonical reordering and legacy fixups
 - hfsplus: canonicalize decomposed catalog names like fsck_hfs expects
 - hfsplus: add Unicode combining-class and legacy decomposition data
 - hfs/hfsplus: serialize B-tree close against folio release
 - hfs: return -EPERM for unsupported setattr changes
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQT4wVoLCG92poNnMFAhI4xTh21NnQUCatKcPQAKCRAhI4xTh21N
 neWQAP0eW63MZp/7GJL/yLOHfxQYGGCf90rqOhYqzlbvXiK5VgEAznpnjbP1hy3x
 SIAEJ/1kn8uPaQWYqOPwgkNrBtqgPAk=
 =ovZs
 -----END PGP SIGNATURE-----

Merge tag 'hfs-v7.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs

Pull hfs/hfsplus updates from Viacheslav Dubeyko:
 "Fix {hfs,hfsplus}_btree_close() (Bruno Produit):
   - B-tree nodes with a zero reference count remain in the node hash
     until folio reclaim or tree teardown frees them. The folio release
     callbacks remove nodes while holding hash_lock, but
     hfs_btree_close() walks and frees the same hash without that lock.
     Reclaim can therefore unhash and free a node after close has loaded
     its pointer, causing a use-after-free or double-free. Detach each
     node with hfs_bnode_unhash() while holding hash_lock before
     inspecting and freeing it. Drop the lock before hfs_bnode_free() so
     a large tree is not freed while holding a spinlock.

  Fix hfs_inode_setattr() and hfs_brec_insert() (Davy Felipe):
   - hfs_inode_setattr() rejects unsupported UID, GID and mode changes,
     but returns the value stored in error when the filesystem is not
     mounted with the quiet option. At this point error is zero, as
     execution has already passed a successful setattr_prepare() call.
     As a result, unsupported attribute changes are incorrectly reported
     to userspace as successful even though the inode remains unchanged.
     Return -EPERM for these operations while preserving the existing
     behavior for quiet mounts.
   - hfs_brec_insert() may fail while inserting a new extent record, but
     __hfs_ext_write_extent() currently ignores its return value and
     clears HFS_FLG_EXT_DIRTY and HFS_FLG_EXT_NEW as if the insertion
     had succeeded. Use a reusable B-tree node range helper that takes
     the find data and the expected record size. The helper validates
     the bnode and tree pointers, entry offset and entry length, and
     ensures that the write range fits within the node.

  Fix failure in xfstests generic/339 (Viacheslav Dubeyko):
   - The test left an HFS+ volume corrupted and, as a result,
     fsck.hfsplus reported a long run of "Illegal name". The root cause
     is that fs/hfsplus/unicode.c's decomposition table (Apple Technote
     #1150) decomposes each source character entirely on its own and
     never does anything further with the result. Real fsck_hfs has
     carried a permanent "FixDecomps" fixup in CatalogCheck.c for
     exactly what that leaves unhandled. The fix makes hfsplus store,
     hash and compare names the same way current macOS does"

* tag 'hfs-v7.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs:
  hfs: handle extent B-tree write errors
  hfsplus: add KUnit coverage for canonical reordering and legacy fixups
  hfsplus: canonicalize decomposed catalog names like fsck_hfs expects
  hfsplus: add Unicode combining-class and legacy decomposition data
  hfs/hfsplus: serialize B-tree close against folio release
  hfs: return -EPERM for unsupported setattr changes
2026-10-20 16:06:21 -10:00
..
.kunitconfig hfs: introduce KUnit tests for HFS string operations 2025-11-19 14:53:59 -08:00
attr.c fs: port xattr to const mnt_idmap 2026-09-23 09:19:49 +02:00
bfind.c hfs/hfsplus: prevent getting negative values of offset/length 2025-11-13 15:02:52 -08:00
bitmap.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
bnode.c treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
brec.c hfs/hfsplus: prevent getting negative values of offset/length 2025-11-13 15:02:52 -08:00
btree.c hfs/hfsplus: serialize B-tree close against folio release 2026-09-25 12:21:29 -07:00
btree.h hfs: handle extent B-tree write errors 2026-09-30 11:11:14 -07:00
catalog.c hfs: validate catalog CNIDs before instantiating inodes 2026-07-14 10:22:16 -07:00
dir.c fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
extent.c hfs: handle extent B-tree write errors 2026-09-30 11:11:14 -07:00
hfs_fs.h fs: port ->setattr() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
hfs.h hfs: rework hfsplus_readdir() logic 2026-05-27 11:24:05 -07:00
inode.c hfs/hfsplus updates for v7.4 2026-10-20 16:06:21 -10:00
Kconfig hfs: introduce KUnit tests for HFS string operations 2025-11-19 14:53:59 -08:00
Makefile hfs: introduce KUnit tests for HFS string operations 2025-11-19 14:53:59 -08:00
mdb.c hfs: rework MDB locking scheme 2026-07-27 20:25:30 -07:00
part_tbl.c
string_test.c hfs: introduce KUnit tests for HFS string operations 2025-11-19 14:53:59 -08:00
string.c hfs: introduce KUnit tests for HFS string operations 2025-11-19 14:53:59 -08:00
super.c hfs/hfsplus updates for v7.3 2026-08-17 18:14:32 -07:00
sysdep.c Pass parent directory inode and expected name to ->d_revalidate() 2025-01-27 19:25:23 -05:00
trans.c hfs: Fix OOB Write in hfs_asc2mac 2022-12-11 19:30:19 -08:00