Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Christian Brauner <christian.brauner@ubuntu.com>
To: Yafang Shao <laoar.shao@gmail.com>
Cc: daniel@iogearbox.net, ast@kernel.org, andrii@kernel.org,
kafai@fb.com, songliubraving@fb.com, yhs@fb.com,
john.fastabend@gmail.com, kpsingh@kernel.org,
netdev@vger.kernel.org, bpf@vger.kernel.org,
David Howells <dhowells@redhat.com>,
Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH v2] bpf: fix mount source show for bpffs
Date: Mon, 10 Jan 2022 10:41:58 +0100 [thread overview]
Message-ID: <20220110094158.pjtc4adxoyujohcf@wittgenstein> (raw)
In-Reply-To: <20220108134623.32467-1-laoar.shao@gmail.com>
On Sat, Jan 08, 2022 at 01:46:23PM +0000, Yafang Shao wrote:
> We noticed our tc ebpf tools can't start after we upgrade our in-house
> kernel version from 4.19 to 5.10. That is because of the behaviour change
> in bpffs caused by commit
> d2935de7e4fd ("vfs: Convert bpf to use the new mount API").
>
> In our tc ebpf tools, we do strict environment check. If the enrioment is
> not match, we won't allow to start the ebpf progs. One of the check is
> whether bpffs is properly mounted. The mount information of bpffs in
> kernel-4.19 and kernel-5.10 are as follows,
>
> - kenrel 4.19
> $ mount -t bpf bpffs /sys/fs/bpf
> $ mount -t bpf
> bpffs on /sys/fs/bpf type bpf (rw,relatime)
>
> - kernel 5.10
> $ mount -t bpf bpffs /sys/fs/bpf
> $ mount -t bpf
> none on /sys/fs/bpf type bpf (rw,relatime)
>
> The device name in kernel-5.10 is displayed as none instead of bpffs,
> then our environment check fails. Currently we modify the tools to adopt to
> the kernel behaviour change, but I think we'd better change the kernel code
> to keep the behavior consistent.
>
> After this change, the mount information will be displayed the same with
> the behavior in kernel-4.19, for example,
>
> $ mount -t bpf bpffs /sys/fs/bpf
> $ mount -t bpf
> bpffs on /sys/fs/bpf type bpf (rw,relatime)
>
> Fixes: d2935de7e4fd ("vfs: Convert bpf to use the new mount API")
> Suggested-by: Daniel Borkmann <daniel@iogearbox.net>
> Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
>
> ---
> v1->v2:
> use the helper vfs_parse_fs_param_source() instead of open-coded (Daniel)
> ---
Looks good,
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
next prev parent reply other threads:[~2022-01-10 9:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-08 13:46 Yafang Shao
2022-01-10 9:41 ` Christian Brauner [this message]
2022-01-11 10:20 ` patchwork-bot+netdevbpf
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=20220110094158.pjtc4adxoyujohcf@wittgenstein \
--to=christian.brauner@ubuntu.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=dhowells@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=songliubraving@fb.com \
--cc=viro@zeniv.linux.org.uk \
--cc=yhs@fb.com \
--subject='Re: [PATCH v2] bpf: fix mount source show for bpffs' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).