mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] isofs: simplify the level 3 directory record walk
@ 2026-09-22 14:01 Matthias Goergens
  2026-09-22 14:01 ` [PATCH 1/2] isofs: validate directory records in isofs_read_level3_size() Matthias Goergens
  2026-09-22 14:01 ` [PATCH 2/2] isofs: drop support for level 3 records straddling blocks Matthias Goergens
  0 siblings, 2 replies; 6+ messages in thread
From: Matthias Goergens @ 2026-09-22 14:01 UTC (permalink / raw)
  To: Jan Kara; +Cc: Christian Brauner, Yichong Chen, linux-fsdevel, linux-kernel

You mentioned isofs_read_level3_size() deserves the same treatment as
commit b2eb2e288604, so here it is: validate every record with
isofs_dir_record_valid() first, then drop the straddling-record
reassembly and the scratch buffer it needed.

The one thing to watch is that the code being removed did two jobs.  It
ran on "offset >= bufsize", so as well as reassembling a straddling
record it advanced the block for a record ending exactly at the end of
one.  Only the first job is dead now, so I folded the second into the
zero-length check, the way you did in bda8d8d49ca1 ("isofs: Fix
handling of directories with tight blocks").

I left isofs_read_inode() alone.  Its condition is
"offset + de_len > bufsize", so it only ever reassembled and never did
the block advance.  Cleaning that one up is a separate patch.

Both patches touch only fs/isofs/inode.c, so they apply on top of
bda8d8d49ca1, and they list the same entries on every image I tested.

I ran bda8d8d49ca1 on its own against them too.  Entries listed,
driving fs/isofs from a userspace harness:

  image                                     before  bda8d8d49ca1
  xorrisofs -iso-level 1, 65 files              46            65
  same, one boundary record marked assoc        45            64
  Debian 13.7.0 amd64 DVD-1 (directories)     9340          9460
  Joliet, Rock Ridge + Joliet                    2             2

Tested-by: Matthias Goergens <matthias.goergens@gmail.com>

Unrelated, and only because you are a VFS maintainer.  Two regressions
I have chased this month were introduced by patches sent to
linux-fsdevel without a linux-kernel copy, and linux-fsdevel is not
among the lists Sashiko monitors, so it never saw either of them.
Enabling it for the list was proposed in July and seems to have
stalled.

For what it's worth, I'm in favour of adding Sashiko reviews.  Sashiko
ain't perfect, but I find its signal-to-noise ratio good enough to be a
net positive.  In fact I find it useful enough that I often run it
locally before sending patches out, despite the high token costs.

Matthias Goergens (2):
  isofs: validate directory records in isofs_read_level3_size()
  isofs: drop support for level 3 records straddling blocks

 fs/isofs/inode.c | 44 +++++++++++++-------------------------------
 1 file changed, 13 insertions(+), 31 deletions(-)


base-commit: 40288c9206c17eb66a603262e06a58d300d0f279
-- 
2.55.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-09-23 17:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22 14:01 [PATCH 0/2] isofs: simplify the level 3 directory record walk Matthias Goergens
2026-09-22 14:01 ` [PATCH 1/2] isofs: validate directory records in isofs_read_level3_size() Matthias Goergens
2026-09-23 13:37   ` Jan Kara
2026-09-23 15:32     ` Matthias Goergens
2026-09-23 17:01       ` Jan Kara
2026-09-22 14:01 ` [PATCH 2/2] isofs: drop support for level 3 records straddling blocks Matthias Goergens

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®