From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Theodore Tso <tytso@mit.edu>
Cc: David Laight <david.laight.linux@gmail.com>,
Andreas Dilger <adilger.kernel@dilger.ca>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
Masami Hiramatsu <mhiramat@kernel.org>,
Petr Mladek <pmladek@suse.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Steven Rostedt <rostedt@goodmis.org>,
Sergey Senozhatsky <senozhatsky@chromium.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH next] ext4: Fix diagnostic printf formats
Date: Sun, 29 Mar 2026 14:37:13 +0300 [thread overview]
Message-ID: <ackO6fL5l2xQxfLN@ashevche-desk.local> (raw)
In-Reply-To: <20260327171414.GF4383@macsyma.local>
On Fri, Mar 27, 2026 at 12:14:14PM -0500, Theodore Tso wrote:
> On Fri, Mar 27, 2026 at 04:12:38PM +0200, Andy Shevchenko wrote:
> > > > I'm not sure how your patch helps with all that, but apparently the
> > > > printed data has to be NUL-terminated, otherwise I have no idea how
> > > > it was ever working without crashes.
> > >
> > > I noticed that as well.
> > > I suspect it way have worked for the person that wrote it because the
> > > name strings all happened to be NUL terminated.
> > > There is certainly likely to be a '\0' before you 'fall off' mapped
> > > memory and crash - so maybe they just ignored the extra characters.
> > >
> > > Clearly the other option is to delete it all.
> >
> > I would go for the history of the change and if it's old enough and not
> > mentioned in any Documentation or not-so-old email thread, kill all that
> > for good. But better to hear the ext4 maintainers first.
>
> This is code that can only be manually enabled by adding a
>
> #define DX_DEBUG
>
> to the sources; it's not anything that users can configure using
> Kconfig. It *has* been used relatively recently, when developers
> added support for three level htree directories. I'm not sure why
> they didn't run into the NULL termination issue, but since it is handy
> to have the debugging code for developers' use, my preference would be
> to keep the code and fix it up the problems.
Good to know!
But what is expected input here, i.o.w. should we assume it's always
NUL-terminated, or use fixed-length strings? If the latter one is correct
the current patch may be applied as is then.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-03-29 11:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-26 20:18 david.laight.linux
2026-03-27 10:48 ` Andy Shevchenko
2026-03-27 12:54 ` David Laight
2026-03-27 14:12 ` Andy Shevchenko
2026-03-27 16:08 ` David Laight
2026-03-27 17:14 ` Theodore Tso
2026-03-29 11:37 ` Andy Shevchenko [this message]
2026-04-10 15:18 ` Theodore Ts'o
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=ackO6fL5l2xQxfLN@ashevche-desk.local \
--to=andriy.shevchenko@linux.intel.com \
--cc=adilger.kernel@dilger.ca \
--cc=akpm@linux-foundation.org \
--cc=david.laight.linux@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=mhiramat@kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.org \
--cc=tytso@mit.edu \
/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
all inboxes | Powered by JetHome®