From: Palla Raghunath <raghunathpalla.0209@gmail.com>
To: Jan Kara <jack@suse.cz>
Cc: Shuah Khan <shuah@kernel.org>,
Brigham Campbell <me@brighamcampbell.com>,
linux-kernel-mentees@lists.linux.dev,
raghunathpalla.0209@gmail.com, linux-kernel@vger.kernel.org,
Christian Brauner <brauner@kernel.org>,
David Howells <dhowells@redhat.com>,
linux-fsdevel@vger.kernel.org,
syzbot+e8ebfecec06a009dd2d3@syzkaller.appspotmail.com,
kudo3228@gmail.com, Mateusz Guzik <mjguzik@gmail.com>,
Deepanshu Kartikey <kartikey406@gmail.com>
Subject: Re: [PATCH RESEND] romfs: reject directory entry chains that do not move forward
Date: Wed, 30 Sep 2026 18:33:28 +0100 [thread overview]
Message-ID: <20260930173328.79017-1-raghunathpalla.0209@gmail.com> (raw)
In-Reply-To: <34t4huzelgho3zelar7vp332rwerth7nso6e76jrfced4chtrt@7q2cjbeymwov>
On Tue, Sep 22, 2026 at 11:58:35AM +0200, Jan Kara wrote:
> I doubt these bugs have any practical relevance so I wouldn't CC stable.
> But I guess that's for Christian.
Fair enough. I'll drop the stable tag if there is a v2.
> The patch looks good, I'm just not sure we are guaranteed ROMFS directories
> are indeed following monotonically increasing disk offset (although that's
> the most logical thing to do) - added Dave to CC for that.
Thanks for the review, Jan.
Documentation/filesystems/romfs.rst doesn't state it, but genromfs
always lays directories out that way. processdir() hands each entry the
current offset, which only ever grows, and it places a subdirectory's
contents straight after the subdirectory's own header, before the next
sibling. Entries are added to the directory list in that same order,
and dumpnode() writes each next pointer from that list, so within one
directory every next pointer points forward. I don't know of any other
tool that builds romfs images.
If you'd rather not rely on that, I can bound the walk by the number of
16-byte header slots in the image instead. That stops a cycle without
assuming any particular order. Happy to send a v2 either way.
Thanks,
Palla
next prev parent reply other threads:[~2026-09-30 17:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 16:46 [PATCH RESEND] romfs: reject directory entry chains that do not move forward Palla Raghunath
2026-09-22 9:58 ` Jan Kara
2026-09-30 17:33 ` Palla Raghunath [this message]
2026-10-01 9:29 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260930173328.79017-1-raghunathpalla.0209@gmail.com \
--to=raghunathpalla.0209@gmail.com \
--cc=brauner@kernel.org \
--cc=dhowells@redhat.com \
--cc=jack@suse.cz \
--cc=kartikey406@gmail.com \
--cc=kudo3228@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=me@brighamcampbell.com \
--cc=mjguzik@gmail.com \
--cc=shuah@kernel.org \
--cc=syzbot+e8ebfecec06a009dd2d3@syzkaller.appspotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox