From: John Hubbard <jhubbard@nvidia.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "Sumit Semwal" <sumit.semwal@linaro.org>,
"Christian König" <christian.koenig@amd.com>,
"Christian Brauner" <brauner@kernel.org>,
"Jens Axboe" <axboe@kernel.dk>,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org,
LKML <linux-kernel@vger.kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH v2] dma-buf: set SB_I_NOEXEC and SB_I_NODEV on the pseudo filesystem
Date: Wed, 27 May 2026 19:39:17 -0700 [thread overview]
Message-ID: <97aa8ce9-e965-4f2a-8719-c5e586688878@nvidia.com> (raw)
In-Reply-To: <ahPkQgCg_52sxkYH@infradead.org>
On 5/24/26 10:55 PM, Christoph Hellwig wrote:
> On Fri, May 22, 2026 at 06:11:17PM -0700, John Hubbard wrote:
>> The dma-buf pseudo filesystem dispenses S_ANON_INODE inodes via
>> alloc_anon_inode() but never sets SB_I_NOEXEC on its superblock.
>> Since commit 1e7ab6f67824 ("anon_inode: rework assertions") in 6.17,
>> path_noexec() warns on exactly that combination, so an mmap() on any
>> dma-buf fd trips the warning:
>
> Just as last time this came up, we really should set this higher up.
> There isn't really a reason why pseudofses should not set SB_I_NOEXEC
> by default.
>
Ha, I see now that there is some history to this.
After looking at the email history and the code, it does seem like
the time is right to do that. I'm testing out a tiny series to set
these flags in init_pseudo(), and then to *not* redundantly set them
elsewhere, I'll post it shortly.
thanks,
--
John Hubbard
prev parent reply other threads:[~2026-05-28 2:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 1:11 John Hubbard
2026-05-25 5:55 ` Christoph Hellwig
2026-05-28 2:39 ` John Hubbard [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=97aa8ce9-e965-4f2a-8719-c5e586688878@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=axboe@kernel.dk \
--cc=brauner@kernel.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hch@infradead.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=sumit.semwal@linaro.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®