public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/7] bpf: Add probe_read_{kernel,user}_dynptr and copy_from_user_dynptr
@ 2025-01-25  8:29 Levi Zim via B4 Relay
  2025-01-25  8:29 ` [PATCH bpf-next v2 1/7] bpf: Implement bpf_probe_read_kernel_dynptr helper Levi Zim via B4 Relay
                   ` (6 more replies)
  0 siblings, 7 replies; 21+ messages in thread
From: Levi Zim via B4 Relay @ 2025-01-25  8:29 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Eduard Zingerman, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Matt Bobrowski, Steven Rostedt, Masami Hiramatsu,
	Mathieu Desnoyers, Mykola Lysenko, Shuah Khan
  Cc: bpf, linux-kernel, linux-trace-kernel, linux-kselftest,
	Andrii Nakryiko, Levi Zim

This series introduce the dynptr counterpart of the
bpf_probe_read_{kernel,user} helpers and bpf_copy_from_user helper.

These helpers are helpful for reading variable-length data from kernel
memory into dynptr without going through an intermediate buffer.

Link: https://lore.kernel.org/bpf/MEYP282MB2312CFCE5F7712FDE313215AC64D2@MEYP282MB2312.AUSP282.PROD.OUTLOOK.COM/
Suggested-by: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Signed-off-by: Levi Zim <rsworktech@outlook.com>
---
Changes in v2:
- Add missing bpf-next prefix. I forgot it in the initial series. Sorry
  about that.
- Link to v1: https://lore.kernel.org/r/20250125-bpf_dynptr_probe-v1-0-c3cb121f6951@outlook.com

---
Levi Zim (7):
      bpf: Implement bpf_probe_read_kernel_dynptr helper
      bpf: Implement bpf_probe_read_user_dynptr helper
      bpf: Implement bpf_copy_from_user_dynptr helper
      tools headers UAPI: Update tools's copy of bpf.h header
      selftests/bpf: probe_read_kernel_dynptr test
      selftests/bpf: probe_read_user_dynptr test
      selftests/bpf: copy_from_user_dynptr test

 include/linux/bpf.h                                |   3 +
 include/uapi/linux/bpf.h                           |  49 ++++++++++
 kernel/bpf/helpers.c                               |  53 ++++++++++-
 kernel/trace/bpf_trace.c                           |  72 ++++++++++++++
 tools/include/uapi/linux/bpf.h                     |  49 ++++++++++
 tools/testing/selftests/bpf/prog_tests/dynptr.c    |  45 ++++++++-
 tools/testing/selftests/bpf/progs/dynptr_success.c | 106 +++++++++++++++++++++
 7 files changed, 374 insertions(+), 3 deletions(-)
---
base-commit: d0d106a2bd21499901299160744e5fe9f4c83ddb
change-id: 20250124-bpf_dynptr_probe-ab483c554f1a

Best regards,
-- 
Levi Zim <rsworktech@outlook.com>



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

end of thread, other threads:[~2025-01-31  6:15 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-25  8:29 [PATCH bpf-next v2 0/7] bpf: Add probe_read_{kernel,user}_dynptr and copy_from_user_dynptr Levi Zim via B4 Relay
2025-01-25  8:29 ` [PATCH bpf-next v2 1/7] bpf: Implement bpf_probe_read_kernel_dynptr helper Levi Zim via B4 Relay
2025-01-25 16:58   ` Alexei Starovoitov
2025-01-26  1:05     ` Levi Zim
2025-01-27 22:04       ` Alexei Starovoitov
2025-01-27 22:53         ` Andrei Matei
2025-01-27 23:09           ` Andrii Nakryiko
2025-01-28  0:31             ` Levi Zim
2025-01-28  2:57             ` Alexei Starovoitov
2025-01-28 11:22               ` Levi Zim
2025-01-31  6:14               ` Levi Zim
2025-01-28 11:13         ` Levi Zim
2025-01-27 22:05       ` Andrii Nakryiko
2025-01-25  8:29 ` [PATCH bpf-next v2 2/7] bpf: Implement bpf_probe_read_user_dynptr helper Levi Zim via B4 Relay
2025-01-27 12:27   ` kernel test robot
2025-01-25  8:29 ` [PATCH bpf-next v2 3/7] bpf: Implement bpf_copy_from_user_dynptr helper Levi Zim via B4 Relay
2025-01-25  8:29 ` [PATCH bpf-next v2 4/7] tools headers UAPI: Update tools's copy of bpf.h header Levi Zim via B4 Relay
2025-01-27 22:08   ` Andrii Nakryiko
2025-01-25  8:29 ` [PATCH bpf-next v2 5/7] selftests/bpf: probe_read_kernel_dynptr test Levi Zim via B4 Relay
2025-01-25  8:29 ` [PATCH bpf-next v2 6/7] selftests/bpf: probe_read_user_dynptr test Levi Zim via B4 Relay
2025-01-25  8:29 ` [PATCH bpf-next v2 7/7] selftests/bpf: copy_from_user_dynptr test Levi Zim via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox