From: Matt Bobrowski <mattbobrowski@google.com>
To: bpf@vger.kernel.org
Cc: ast@kernel.org, kpsingh@kernel.org, andrii@kernel.org,
jannh@google.com, brauner@kernel.org,
linux-fsdevel@vger.kernel.org, jolsa@kernel.org,
daniel@iogearbox.net, memxor@gmail.com,
Matt Bobrowski <mattbobrowski@google.com>
Subject: [PATCH v3 bpf-next 0/3] introduce new VFS based BPF kfuncs
Date: Fri, 26 Jul 2024 08:56:01 +0000 [thread overview]
Message-ID: <20240726085604.2369469-1-mattbobrowski@google.com> (raw)
G'day!
The original cover letter providing background context and motivating
factors around the needs for these new VFS related BPF kfuncs
introduced within this patch series can be found here [0]. Please do
reference that if needed.
The changes contained within this version of the patch series mainly
came at the back of discussions held with Christian at LSFMMBPF
recently. In summary, the primary difference within this patch series
when compared to the last [1] is that I've reduced the number of VFS
related BPF kfuncs being introduced, housed them under fs/, and added
more selftests.
Changes since v2 [1]:
* All new VFS related BPF kfuncs now reside in fs/bpf_fs_kfuncs.c
rather than kernel/trace/bpf_trace.c. This was something that was
explicitly requested by Christian after discussing these new VFS
related BPF kfuncs recently at LSFMMBPF.
* Dropped other initially proposed VFS related BPF kfuncs, including
bpf_get_mm_exe_file(), bpf_get_task_fs_root(),
bpf_get_task_fs_pwd(), and bpf_put_path().
* bpf_path_d_path() now makes use of __sz argument annotations such
that the BPF verifier can enforce relevant size checks on the
supplied buf that ends up being passed to d_path(). Relevant
selftests have been added to assert __sz checking semantics are
enforced.
[0] https://lore.kernel.org/bpf/cover.1708377880.git.mattbobrowski@google.com/
[1] https://lore.kernel.org/bpf/cover.1709675979.git.mattbobrowski@google.com/
Matt Bobrowski (3):
bpf: introduce new VFS based BPF kfuncs
selftests/bpf: add negative tests for new VFS based BPF kfuncs
selftests/bpf: add positive tests for new VFS based BPF kfuncs
fs/Makefile | 1 +
fs/bpf_fs_kfuncs.c | 133 ++++++++++++
.../testing/selftests/bpf/bpf_experimental.h | 26 +++
.../selftests/bpf/prog_tests/verifier.c | 4 +
.../selftests/bpf/progs/verifier_vfs_accept.c | 71 +++++++
.../selftests/bpf/progs/verifier_vfs_reject.c | 196 ++++++++++++++++++
6 files changed, 431 insertions(+)
create mode 100644 fs/bpf_fs_kfuncs.c
create mode 100644 tools/testing/selftests/bpf/progs/verifier_vfs_accept.c
create mode 100644 tools/testing/selftests/bpf/progs/verifier_vfs_reject.c
--
2.46.0.rc1.232.g9752f9e123-goog
next reply other threads:[~2024-07-26 8:56 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-26 8:56 Matt Bobrowski [this message]
2024-07-26 8:56 ` [PATCH v3 bpf-next 1/3] bpf: introduce new VFS based BPF kfuncs Matt Bobrowski
2024-07-26 13:18 ` Christian Brauner
2024-07-26 20:31 ` Matt Bobrowski
2024-07-26 20:43 ` Alexei Starovoitov
2024-07-28 20:35 ` Matt Bobrowski
2024-07-26 21:25 ` Song Liu
2024-07-26 21:49 ` Matt Bobrowski
2024-07-26 22:48 ` Song Liu
2024-07-28 20:29 ` Matt Bobrowski
2024-07-29 10:56 ` Christian Brauner
2024-07-29 11:11 ` Matt Bobrowski
2024-07-26 23:52 ` Song Liu
2024-07-28 19:52 ` Matt Bobrowski
2024-07-26 8:56 ` [PATCH v3 bpf-next 2/3] selftests/bpf: add negative tests for " Matt Bobrowski
2024-07-26 23:38 ` Song Liu
2024-07-28 19:34 ` Matt Bobrowski
2024-07-26 8:56 ` [PATCH v3 bpf-next 3/3] selftests/bpf: add positive " Matt Bobrowski
2024-07-26 23:44 ` Song Liu
2024-07-26 13:22 ` [PATCH v3 bpf-next 0/3] introduce " Christian Brauner
2024-07-26 20:22 ` Matt Bobrowski
2024-07-26 20:35 ` Alexei Starovoitov
2024-07-30 7:37 ` Christian Brauner
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=20240726085604.2369469-1-mattbobrowski@google.com \
--to=mattbobrowski@google.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=daniel@iogearbox.net \
--cc=jannh@google.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=memxor@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).