From: Christian Brauner <brauner@kernel.org>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: Juntong Deng <juntong.deng@outlook.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Eddy Z <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>,
Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
snorcht@gmail.com, bpf <bpf@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux-Fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH bpf-next v5 4/5] bpf: Make fs kfuncs available for SYSCALL and TRACING program types
Date: Tue, 17 Dec 2024 13:30:08 +0100 [thread overview]
Message-ID: <20241217-bespucken-beimischen-339f3cc03dc2@brauner> (raw)
In-Reply-To: <CAADnVQKdBrX6pSJrgBY0SvFZQLpu+CMSshwD=21NdFaoAwW_eg@mail.gmail.com>
On Tue, Dec 10, 2024 at 10:58:52AM -0800, Alexei Starovoitov wrote:
> On Tue, Dec 10, 2024 at 6:43 AM Christian Brauner <brauner@kernel.org> wrote:
> >
> > On Tue, Dec 10, 2024 at 02:03:53PM +0000, Juntong Deng wrote:
> > > Currently fs kfuncs are only available for LSM program type, but fs
> > > kfuncs are generic and useful for scenarios other than LSM.
> > >
> > > This patch makes fs kfuncs available for SYSCALL and TRACING
> > > program types.
> >
> > I would like a detailed explanation from the maintainers what it means
> > to make this available to SYSCALL program types, please.
>
> Sigh.
Hm? Was that directed at my question? I don't have the background to
judge this and this whole api looks like a giant footgun so far for
questionable purposes.
I have a hard time seeing parts of CRIU moved into bpf especially
because all of the userspace stuff exists.
> This is obviously not safe from tracing progs.
>
> From BPF_PROG_TYPE_SYSCALL these kfuncs should be safe to use,
> since those progs are not attached to anything.
> Such progs can only be executed via sys_bpf syscall prog_run command.
> They're sleepable, preemptable, faultable, in task ctx.
>
> But I'm not sure what's the value of enabling these kfuncs for
> BPF_PROG_TYPE_SYSCALL.
next prev parent reply other threads:[~2024-12-17 12:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-10 14:01 [PATCH bpf-next v5 0/5] bpf: Add open-coded style process file iterator and bpf_fget_task() kfunc Juntong Deng
2024-12-10 14:03 ` [PATCH bpf-next v5 1/5] bpf: Introduce task_file open-coded iterator kfuncs Juntong Deng
2024-12-10 14:03 ` [PATCH bpf-next v5 2/5] selftests/bpf: Add tests for open-coded style process file iterator Juntong Deng
2024-12-10 14:37 ` Christian Brauner
2024-12-10 16:23 ` Juntong Deng
2024-12-10 18:51 ` Alexei Starovoitov
2024-12-11 21:27 ` Juntong Deng
2024-12-10 14:03 ` [PATCH bpf-next v5 3/5] bpf: Add bpf_fget_task() kfunc Juntong Deng
2024-12-10 14:28 ` Christian Brauner
2024-12-10 16:21 ` Juntong Deng
2024-12-10 14:03 ` [PATCH bpf-next v5 4/5] bpf: Make fs kfuncs available for SYSCALL and TRACING program types Juntong Deng
2024-12-10 14:43 ` Christian Brauner
2024-12-10 18:58 ` Alexei Starovoitov
2024-12-11 21:29 ` Juntong Deng
2024-12-11 22:06 ` Song Liu
2024-12-13 18:44 ` Juntong Deng
2024-12-12 0:53 ` Alexei Starovoitov
2024-12-13 18:51 ` Juntong Deng
2024-12-14 0:41 ` Alexei Starovoitov
2024-12-16 23:08 ` Juntong Deng
2024-12-17 12:30 ` Christian Brauner [this message]
2024-12-17 14:11 ` Juntong Deng
2024-12-10 14:03 ` [PATCH bpf-next v5 5/5] selftests/bpf: Add tests for bpf_fget_task() kfunc Juntong Deng
2024-12-10 14:44 ` [PATCH bpf-next v5 0/5] bpf: Add open-coded style process file iterator and " Christian Brauner
2024-12-10 16:25 ` Juntong Deng
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=20241217-bespucken-beimischen-339f3cc03dc2@brauner \
--to=brauner@kernel.org \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=juntong.deng@outlook.com \
--cc=kpsingh@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=sdf@fomichev.me \
--cc=snorcht@gmail.com \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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