linux/fs/hfsplus
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 hfsplus: introduce KUnit tests for HFS+ string operations 2025-11-24 16:12:51 -08:00
attributes.c hfs/hfsplus updates for v7.1 2026-04-13 16:50:38 -07:00
bfind.c hfsplus: validate B-tree record offset table 2026-08-11 16:22:26 -07:00
bitmap.c hfs/hfsplus: rework debug output subsystem 2025-09-24 16:30:34 -07:00
bnode.c hfsplus: validate B-tree record offset table 2026-08-11 16:22:26 -07:00
brec.c hfsplus: validate B-tree record offset table 2026-08-11 16:22:26 -07:00
btree.c hfs/hfsplus: serialize B-tree close against folio release 2026-09-25 12:21:29 -07:00
catalog.c hfsplus: validate thread record before delete key rebuild 2026-07-14 10:23:20 -07:00
dir.c fs: port ->create() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
extents.c hfsplus: validate extent record length before writing it back 2026-08-11 16:37:16 -07:00
hfsplus_fs.h hfs/hfsplus updates for v7.4 2026-10-20 16:06:21 -10:00
hfsplus_raw.h hfs/hfsplus: move on-disk layout declarations into hfs_common.h 2025-11-25 15:16:03 -08:00
inode.c fs: port ->setattr() to pass const mnt_idmap 2026-09-23 09:19:51 +02:00
ioctl.c vfs: rename parent_ino to d_parent_ino and make it use RCU 2024-06-27 18:34:21 +02:00
Kconfig hfsplus: introduce KUnit tests for HFS+ string operations 2025-11-24 16:12:51 -08:00
Makefile hfsplus: introduce KUnit tests for HFS+ string operations 2025-11-24 16:12:51 -08:00
options.c fs: inline current_umask() and move it to fs_struct.h 2025-11-05 22:51:23 +01:00
part_tbl.c fs/hfsplus: Use the enum req_op and blk_opf_t types 2022-07-14 12:14:32 -06:00
super.c hfsplus: Move long delayed work on system_dfl_long_wq 2026-07-31 10:09:07 +02:00
tables.c hfsplus: canonicalize decomposed catalog names like fsck_hfs expects 2026-09-25 12:36:04 -07:00
unicode_test.c hfsplus: add KUnit coverage for canonical reordering and legacy fixups 2026-09-25 12:36:04 -07:00
unicode.c hfsplus: canonicalize decomposed catalog names like fsck_hfs expects 2026-09-25 12:36:04 -07:00
unicode.h hfsplus: canonicalize decomposed catalog names like fsck_hfs expects 2026-09-25 12:36:04 -07:00
wrapper.c hfsplus: use bdev_rw_virt in hfsplus_submit_bio 2025-05-07 07:31:08 -06:00
xattr_security.c fs: port xattr to const mnt_idmap 2026-09-23 09:19:49 +02:00
xattr_trusted.c fs: port xattr to const mnt_idmap 2026-09-23 09:19:49 +02:00
xattr_user.c fs: port xattr to const mnt_idmap 2026-09-23 09:19:49 +02:00
xattr.c fs: port xattr to const mnt_idmap 2026-09-23 09:19:49 +02:00
xattr.h hfsplus: move hfsplus_xattr_handlers to .rodata 2023-10-09 16:24:19 +02:00