All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/4] Introduce kfuncs for memory reads into dynptrs
@ 2025-04-25 12:58 Mykyta Yatsenko
  2025-04-25 12:58 ` [PATCH bpf-next 1/4] helpers: make few bpf helpers public Mykyta Yatsenko
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Mykyta Yatsenko @ 2025-04-25 12:58 UTC (permalink / raw)
  To: bpf, ast, andrii, daniel, kafai, kernel-team, eddyz87; +Cc: Mykyta Yatsenko

From: Mykyta Yatsenko <yatsenko@meta.com>

This patch adds new kfuncs that enable reading variable-length
user or kernel data directly into dynptrs.
These kfuncs provide a way to perform dynamically-sized reads
while maintaining memory safety. Unlike existing
`bpf_probe_read_{user|kernel}` APIs, which are limited to constant-sized
reads, these new kfuncs allow for more flexible data access.

Mykyta Yatsenko (4):
  helpers: make few bpf helpers public
  bpf: implement dynptr copy kfuncs
  selftests/bpf: introduce tests for dynptr copy kfuncs
  selftests/bpf: disable test_probe_read_user_str_dynptr

 include/linux/bpf.h                           |   7 +
 kernel/bpf/helpers.c                          |  14 +-
 kernel/trace/bpf_trace.c                      | 199 +++++++++++++++++
 tools/testing/selftests/bpf/DENYLIST          |   1 +
 .../testing/selftests/bpf/prog_tests/dynptr.c |  13 ++
 .../selftests/bpf/progs/dynptr_success.c      | 201 ++++++++++++++++++
 6 files changed, 432 insertions(+), 3 deletions(-)

-- 
2.49.0


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

end of thread, other threads:[~2025-04-25 21:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-25 12:58 [PATCH bpf-next 0/4] Introduce kfuncs for memory reads into dynptrs Mykyta Yatsenko
2025-04-25 12:58 ` [PATCH bpf-next 1/4] helpers: make few bpf helpers public Mykyta Yatsenko
2025-04-25 18:10   ` Andrii Nakryiko
2025-04-25 12:58 ` [PATCH bpf-next 2/4] bpf: implement dynptr copy kfuncs Mykyta Yatsenko
2025-04-25 18:20   ` Andrii Nakryiko
2025-04-25 21:03     ` Mykyta Yatsenko
2025-04-25 12:58 ` [PATCH bpf-next 3/4] selftests/bpf: introduce tests for " Mykyta Yatsenko
2025-04-25 18:21   ` Andrii Nakryiko
2025-04-25 12:58 ` [PATCH bpf-next 4/4] selftests/bpf: disable test_probe_read_user_str_dynptr Mykyta Yatsenko
2025-04-25 18:22   ` Andrii Nakryiko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.