* [GIT PULL] hfs/hfsplus changes for 7.4-rc1
@ 2026-10-16 23:24 Viacheslav Dubeyko
0 siblings, 0 replies; only message in thread
From: Viacheslav Dubeyko @ 2026-10-16 23:24 UTC (permalink / raw)
To: torvalds
Cc: linux-fsdevel, linux-kernel, glaubitz, frank.li, vdubeyko,
bruno.produit, davyfelipe34
Hello Linus,
Bruno Produit has fixed issue in {hfs,hfsplus}_btree_close()
method. 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.
Davy Felipe has fixed issues in hfs_inode_setattr() and
hfs_brec_insert():
- 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.
Viacheslav Dubeyko has fixed the failure in xfstests generic/339
case. The xfstests generic/339 leaves an HFS+ volume corrupted and,
as a result, fsck.hfsplus reports 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. Fix makes hfsplus store, hash and
compare names the same way current macOS does.
The following changes since commit
cee9395acd8043be0644b25c34bfa86623f2b935:
Linux 7.3-rc1 (2026-08-30 13:34:40 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/hfs.git
tags/hfs-v7.4-tag1
for you to fetch changes up to
f278d04be3acfd3a9eccf045b9eb180007cceccc:
hfs: handle extent B-tree write errors (2026-09-30 11:11:14 -0700)
----------------------------------------------------------------
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
----------------------------------------------------------------
Bruno Produit (1):
hfs/hfsplus: serialize B-tree close against folio release
Davy Felipe (2):
hfs: return -EPERM for unsupported setattr changes
hfs: handle extent B-tree write errors
Viacheslav Dubeyko (3):
hfsplus: add Unicode combining-class and legacy decomposition
data
hfsplus: canonicalize decomposed catalog names like fsck_hfs
expects
hfsplus: add KUnit coverage for canonical reordering and legacy
fixups
fs/hfs/btree.c | 7 +-
fs/hfs/btree.h | 19 ++
fs/hfs/extent.c | 10 +-
fs/hfs/inode.c | 2 +-
fs/hfsplus/btree.c | 7 +-
fs/hfsplus/hfsplus_fs.h | 6 +-
fs/hfsplus/tables.c | 496
++++++++++++++++++++++++++++++++++++++++++++++
fs/hfsplus/unicode.c | 390 ++++++++++++++++++++++++------------
fs/hfsplus/unicode.h | 63 ++++++
fs/hfsplus/unicode_test.c | 309 +++++++++++++++++++++++++++++
10 files changed, 1165 insertions(+), 144 deletions(-)
create mode 100644 fs/hfsplus/unicode.h
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-16 23:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-16 23:24 [GIT PULL] hfs/hfsplus changes for 7.4-rc1 Viacheslav Dubeyko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®