Re: [PATCH v2] dma-buf: set SB_I_NOEXEC and SB_I_NODEV on the pseudo filesystem

From: Christoph Hellwig

Date: Mon May 25 2026 - 01:55:35 EST


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.