public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: dhowells@redhat.com, linux-fsdevel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	NeilBrown <neil@brown.name>,
	linux-security-module@vger.kernel.org,
	Namjae Jeon <linkinjeon@kernel.org>
Subject: Re: [PATCHES] simple part of ->d_name stuff
Date: Thu, 11 Sep 2025 06:59:44 +0100	[thread overview]
Message-ID: <1910271.1757570384@warthog.procyon.org.uk> (raw)
In-Reply-To: <20250911050149.GW31600@ZenIV>

Al Viro <viro@zeniv.linux.org.uk> wrote:

> 	Rules for ->d_name access are rather unpleasant and so's
> verifying that they are followed.  There is a relatively simple part,
> though - nobody outside of fs/dcache.c has any business modifying
> that thing.
> 
> 	So let's make sure that all functions we are passing
> &dentry->d_name are taking const struct qstr * and replace
> ->d_name with an anon union of struct qstr *__d_name and
> const struct qstr *d_name.
> 
> 	It is *not* enough to guarantee that another thread will
> not call __d_move() right under you - checking the requirements
> for that is the hard part.  It does make it easy to verify that
> nothing else accidentally starts changing it.
> 
> 	This stuff lives in
> git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #work.qstr
> Branch is -rc4-based, individual patches in followups.
> 
> 	Please, review.  If nobody objects, I'll put that in #for-next.

Reviewed-by: David Howells <dhowells@redhat.com>


  parent reply	other threads:[~2025-09-11  5:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11  5:01 [PATCHES] simple part of ->d_name stuff Al Viro
2025-09-11  5:05 ` [PATCH 1/6] security_dentry_init_security(): constify qstr argument Al Viro
2025-09-11  5:05   ` [PATCH 2/6] exfat_find(): " Al Viro
2025-09-11  6:02     ` Namjae Jeon
2025-09-15 12:45     ` Christian Brauner
2025-09-11  5:05   ` [PATCH 3/6] afs_edit_dir_{add,remove}(): " Al Viro
2025-09-15 12:45     ` Christian Brauner
2025-09-11  5:05   ` [PATCH 4/6] afs_dir_search: " Al Viro
2025-09-15 12:46     ` Christian Brauner
2025-09-11  5:05   ` [PATCH 5/6] generic_ci_validate_strict_name(): constify name argument Al Viro
2025-09-15 12:46     ` Christian Brauner
2025-09-11  5:05   ` [PATCH 6/6] make it easier to catch those who try to modify ->d_name Al Viro
2025-09-15 12:46     ` Christian Brauner
2025-09-11 14:30   ` [PATCH 1/6] security_dentry_init_security(): constify qstr argument Casey Schaufler
2025-09-11 20:54   ` Paul Moore
2025-09-15 12:45   ` Christian Brauner
2025-09-11  5:59 ` David Howells [this message]
2025-09-11 16:56 ` [PATCHES] simple part of ->d_name stuff Linus Torvalds

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=1910271.1757570384@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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