mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dominique Martinet <asmadeus@codewreck.org>
To: Christian Schoenebeck <linux_oss@crudebyte.com>
Cc: ericvh@kernel.org, lucho@ionkov.net, v9fs@lists.linux.dev,
	Haobin Wu <853555@gmail.com>,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, horms@kernel.org,
	aneesh.kumar@linux.vnet.ibm.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	jack@suse.cz, willy@infradead.org, dhowells@redhat.com,
	viro@zeniv.linux.org.uk, brauner@kernel.org
Subject: Re: [PATCH v2 2/2] 9p: skip directory entries with names longer than NAME_MAX
Date: Thu, 17 Sep 2026 07:45:26 +0900	[thread overview]
Message-ID: <aqscBuQli__0XUv4@codewreck.org> (raw)
In-Reply-To: <3910569.MHq7AAxBmi@weasel>

Christian Schoenebeck wrote on Wed, Sep 16, 2026 at 10:02:08PM +0200:
> > +			if (namelen > NAME_MAX) {
> > +				p9_debug(P9_DEBUG_VFS,
> > +					 "skipping entry with %zu byte name\n",
> > +					 namelen);
> 
> Fair to say why:
> 
>   "skip dentry: name length %zu > NAME_MAX"

Agreed.

I'd also say to keep this as P9_DEBUG_ERROR rather than VFS: it should
be rare enough and nobody will enable DEBUG_VFS immediately, this keeps
the message at the same log level as it was previously

(P9_DEBUG_ERROR is not printed by default, but I've been meaning to
try to change that eventually... Someday™)

> This is only handled for 9p2000.L so far. For legacy 9p2000(.u) this should
> then also be limited in v9fs_dir_readdir() IMO.

In practice this was already the case because of the processing in
p9dirent_read(), so I have no strong opinion here, but I do agree it
makes more sense to be symetrical yes.
If done it should be noted as a behavior change in the commit message
(or split in yet another commit) though

-- 
Dominique Martinet | Asmadeus

      reply	other threads:[~2026-09-16 22:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 13:54 [PATCH v2 0/2] 9p: handle long directory entry names in readdir Haobin Wu
2026-09-16 13:54 ` [PATCH v2 1/2] 9p: skip intermediate directory entry name copy in p9dirent_read() Haobin Wu
2026-09-16 13:54 ` [PATCH v2 2/2] 9p: skip directory entries with names longer than NAME_MAX Haobin Wu
2026-09-16 20:02   ` Christian Schoenebeck
2026-09-16 22:45     ` Dominique Martinet [this message]

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=aqscBuQli__0XUv4@codewreck.org \
    --to=asmadeus@codewreck.org \
    --cc=853555@gmail.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=brauner@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=ericvh@kernel.org \
    --cc=horms@kernel.org \
    --cc=jack@suse.cz \
    --cc=kuba@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux_oss@crudebyte.com \
    --cc=lucho@ionkov.net \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=v9fs@lists.linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /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®