All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v4 0/3] Introduce kfuncs for memory reads into dynptrs
@ 2025-05-08 22:06 Mykyta Yatsenko
  2025-05-08 22:06 ` [PATCH bpf-next v4 1/3] helpers: make few bpf helpers public Mykyta Yatsenko
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Mykyta Yatsenko @ 2025-05-08 22:06 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 (3):
  helpers: make few bpf helpers public
  bpf: implement dynptr copy kfuncs
  selftests/bpf: introduce tests for dynptr copy kfuncs

 include/linux/bpf.h                           |  14 ++
 kernel/bpf/helpers.c                          |  22 +-
 kernel/trace/bpf_trace.c                      | 193 +++++++++++++++
 tools/testing/selftests/bpf/DENYLIST          |   1 +
 .../testing/selftests/bpf/prog_tests/dynptr.c |  13 +
 .../selftests/bpf/progs/dynptr_success.c      | 230 ++++++++++++++++++
 6 files changed, 461 insertions(+), 12 deletions(-)

-- 
2.49.0


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

end of thread, other threads:[~2025-05-09 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08 22:06 [PATCH bpf-next v4 0/3] Introduce kfuncs for memory reads into dynptrs Mykyta Yatsenko
2025-05-08 22:06 ` [PATCH bpf-next v4 1/3] helpers: make few bpf helpers public Mykyta Yatsenko
2025-05-08 22:06 ` [PATCH bpf-next v4 2/3] bpf: implement dynptr copy kfuncs Mykyta Yatsenko
2025-05-09 15:50   ` Alexei Starovoitov
2025-05-09 15:56     ` Mykyta Yatsenko
2025-05-08 22:06 ` [PATCH bpf-next v4 3/3] selftests/bpf: introduce tests for " Mykyta Yatsenko

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.