linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 bpf-next 0/3] introduce new VFS based BPF kfuncs
@ 2024-07-26  8:56 Matt Bobrowski
  2024-07-26  8:56 ` [PATCH v3 bpf-next 1/3] bpf: " Matt Bobrowski
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Matt Bobrowski @ 2024-07-26  8:56 UTC (permalink / raw)
  To: bpf
  Cc: ast, kpsingh, andrii, jannh, brauner, linux-fsdevel, jolsa,
	daniel, memxor, Matt Bobrowski

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


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2024-07-30  7:37 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-26  8:56 [PATCH v3 bpf-next 0/3] introduce new VFS based BPF kfuncs Matt Bobrowski
2024-07-26  8:56 ` [PATCH v3 bpf-next 1/3] bpf: " 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

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).