[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC v3 09/44] bpf: use fc_init_pseudo() for bpffs
- To: Christian Brauner <brauner@xxxxxxxxxx>
- From: Andrii Nakryiko <andrii.nakryiko@xxxxxxxxx>
- Date: Mon, 16 Nov 2026 12:03:57 -0800
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=FEtpE65JhLGyAYaL/FOW2ebUIws2WwBZ/4Zy8VNXUuw=; fh=frq2Wzn0iQg3cXh9oDaaiTcrknmdL2uNu8alNe8QCjU=; b=X//rvuDXvE7h3CM3CIQfG+Pmn7gTi0UiNw0vNPfaPorDQ6GoDGhxeGrA81xPVPFEiz 4E6qqnYt12f9dDIgiiB8mrV2QMeCFOA8zDtJt/fnt/LTcJZcoI7U6KbTSe1I9zH1UKkM cDD50iZ5RxoTwkf9hgKr3ot5va9kCmWZYb+NaQ4EgMYQufzMsa4MZFlL65nLOBiW86fI ic6NdcVkhvgY63dIVwqlcwadNRZcBJdaw0o8BAR/6nPLt9rtV30/0nBNXB/fwQq+3tz+ oMZsDl9TfW7CJcCc6BLml83bPG9BLoSBOC/zGonlCCxlyhprRo0q0IrUuOUIbGb/K7nH Snag==; darn=lists.xenproject.org
- Arc-seal: i=1; a=rsa-sha256; t=1794859448; cv=none; d=google.com; s=arc-20260327; b=mGY2r3R/0mKLELg9FTtu0lWZkJM9vGtNzcX+IppNQEjE2/RzajT41sdKEFS8nyxATP dLJ7zNwjTjhayTTRAFNGFZp/UufXq4aHPZGsZ01ZHeJt4gIUKYPAV7723XYWOqDXiKHx BwatyME0VSo5w7HTvpW7PRllAh49Bmy8upp0nDEa/JYpcfP8Up+7db9LtdNV9sm8xUZd c1ihGpvQYjQ0uGdE30ASI+Rj8hSr9XBS4TX25ktd6+s9TtG6lUethJQ4XVgur1HqLmCA dnHvyiajzrjie6o7zC2kN5tejLM8cAH0A+3/W/WBk6xSeaT1WW3pA/CutoiinZQYGocO 8UQg==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20260707 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
- Cc: linux-fsdevel@xxxxxxxxxxxxxxx, Jann Horn <jannh@xxxxxxxxxx>, Chris Mason <mason@xxxxxxxxxx>, Josef Bacik <josef@xxxxxxxxxxxxxx>, Christoph Hellwig <hch@xxxxxx>, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, linux-scsi@xxxxxxxxxxxxxxx, target-devel@xxxxxxxxxxxxxxx, driver-core@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, bpf@xxxxxxxxxxxxxxx, linux-security-module@xxxxxxxxxxxxxxx, selinux@xxxxxxxxxxxxxxx, apparmor@xxxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, fuse-devel@xxxxxxxxxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, ocfs2-devel@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-usb@xxxxxxxxxxxxxxx, Amir Goldstein <amir73il@xxxxxxxxx>, linux-erofs@xxxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx, Alexander Mikhalitsyn <alex@xxxxxxxxxxxx>, Chris Down <chris@xxxxxxxxxxxxxx>
- Delivery-date: Mon, 16 Nov 2026 23:19:58 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Nov 16, 2026 at 3:21 AM Christian Brauner <brauner@xxxxxxxxxx> wrote:
>
> Initialize bpffs as a pseudo filesystem instead of raising
> SB_I_NOEXEC and SB_I_NODEV by hand. This adds SB_I_PSEUDO.
>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> Reviewed-by: Alexander Mikhalitsyn <alex@xxxxxxxxxxxx>
> Reviewed-by: Chris Down <chris@xxxxxxxxxxxxxx>
> Signed-off-by: Christian Brauner (Amutable) <brauner@xxxxxxxxxx>
> ---
> kernel/bpf/inode.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
Acked-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
> diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c
> index c6f328e4752e1..57cf3775c0766 100644
> --- a/kernel/bpf/inode.c
> +++ b/kernel/bpf/inode.c
> @@ -15,6 +15,7 @@
> #include <linux/namei.h>
> #include <linux/fs.h>
> #include <linux/fs_context.h>
> +#include <linux/pseudo_fs.h>
> #include <linux/fs_parser.h>
> #include <linux/kdev_t.h>
> #include <linux/filter.h>
> @@ -1197,8 +1198,6 @@ static int bpf_fill_super(struct super_block *sb,
> struct fs_context *fc)
> sb->s_magic = BPF_FS_MAGIC;
> sb->s_op = &bpf_super_ops;
> sb->s_xattr = bpf_fs_xattr_handlers;
> - sb->s_iflags |= SB_I_NOEXEC;
> - sb->s_iflags |= SB_I_NODEV;
> sb->s_time_gran = 1;
>
> inode = bpf_get_inode(sb, NULL, S_IFDIR | 0777);
> @@ -1261,6 +1260,7 @@ static int bpf_init_fs_context(struct fs_context *fc)
> opts->delegate_attachs = 0;
>
> fc->s_fs_info = opts;
> + fc_init_pseudo(fc);
> fc->ops = &bpf_context_ops;
> return 0;
> }
>
> --
> 2.53.0
>
>
|