Re: [PATCH] dma-buf: add SB_I_NOEXEC flag to dmabuf pseudo-filesystem

From: Christoph Hellwig

Date: Mon Feb 02 2026 - 01:35:13 EST


On Sun, Feb 01, 2026 at 09:09:52AM -0800, Cong Wang wrote:
> From: Cong Wang <cwang@xxxxxxxxxxxxxx>
>
> The dmabuf filesystem uses alloc_anon_inode() to create anonymous inodes
> but does not set the SB_I_NOEXEC flag on its superblock. This triggers a
> VFS warning in path_noexec() when userspace mmaps a dma-buf:

As last time, I think it would be much preferable to set SB_I_NOEXEC and
SB_I_NODEV by default in init_pseudo and just clear it if needed.

I can't think of anything would need to clear them from a quick look.