public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Dynptr Verifier Adjustments
@ 2023-04-06  0:40 Daniel Rosenberg
  2023-04-06  0:40 ` [PATCH 1/3] bpf: verifier: Accept dynptr mem as mem in helpers Daniel Rosenberg
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Daniel Rosenberg @ 2023-04-06  0:40 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Daniel Borkmann, John Fastabend,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Shuah Khan,
	Jonathan Corbet, Joanne Koong, Mykola Lysenko, linux-kernel,
	linux-kselftest, kernel-team, Daniel Rosenberg

These patches relax a few verifier requirements around dynptrs.

I was unable to test the patch in 0003 due to unrelated issues compiling the
bpf selftests, but did run an equivalent local test program.

This is the issue I was running into:
progs/cgrp_ls_attach_cgroup.c:17:15: error: use of undeclared identifier 'BPF_MAP_TYPE_CGRP_STORAGE'; did you mean 'BPF_MAP_TYPE_CGROUP_STORAGE'?
        __uint(type, BPF_MAP_TYPE_CGRP_STORAGE);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~
                     BPF_MAP_TYPE_CGROUP_STORAGE
/ssd/kernel/fuse-bpf/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:13:39: note: expanded from macro '__uint'
#define __uint(name, val) int (*name)[val]
                                      ^
/ssd/kernel/fuse-bpf/tools/testing/selftests/bpf/tools/include/vmlinux.h:27892:2: note: 'BPF_MAP_TYPE_CGROUP_STORAGE' declared here
        BPF_MAP_TYPE_CGROUP_STORAGE = 19,
        ^
1 error generated.

Daniel Rosenberg (3):
  bpf: verifier: Accept dynptr mem as mem in helpers
  bpf: Allow NULL buffers in bpf_dynptr_slice(_rw)
  selftests/bpf: Test allowing NULL buffer in dynptr slice

 Documentation/bpf/kfuncs.rst                  | 23 ++++++++++++-
 kernel/bpf/helpers.c                          | 32 ++++++++++++-------
 kernel/bpf/verifier.c                         | 21 ++++++++++++
 .../testing/selftests/bpf/prog_tests/dynptr.c |  1 +
 .../selftests/bpf/progs/dynptr_success.c      | 21 ++++++++++++
 5 files changed, 85 insertions(+), 13 deletions(-)


base-commit: 5af607a861d43ffff830fc1890033e579ec44799
-- 
2.40.0.577.gac1e443424-goog


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

end of thread, other threads:[~2023-05-03 18:39 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06  0:40 [PATCH 0/3] Dynptr Verifier Adjustments Daniel Rosenberg
2023-04-06  0:40 ` [PATCH 1/3] bpf: verifier: Accept dynptr mem as mem in helpers Daniel Rosenberg
2023-04-06 20:55   ` Andrii Nakryiko
2023-04-06 22:13     ` Alexei Starovoitov
2023-05-02  1:12       ` Daniel Rosenberg
2023-05-03 18:39         ` Andrii Nakryiko
2023-04-06 22:35     ` Daniel Rosenberg
2023-04-06  0:40 ` [PATCH 2/3] bpf: Allow NULL buffers in bpf_dynptr_slice(_rw) Daniel Rosenberg
2023-04-06 21:09   ` Andrii Nakryiko
2023-04-06 22:25     ` Daniel Rosenberg
2023-04-06 23:54       ` Andrii Nakryiko
2023-04-29  1:57     ` Daniel Rosenberg
2023-05-03 18:34       ` Andrii Nakryiko
2023-04-06  0:40 ` [PATCH 3/3] selftests/bpf: Test allowing NULL buffer in dynptr slice Daniel Rosenberg
2023-04-06 20:48 ` [PATCH 0/3] Dynptr Verifier Adjustments Andrii Nakryiko
2023-04-26 22:07   ` Daniel Rosenberg
2023-04-26 23:39     ` Andrii Nakryiko
2023-04-27 23:36       ` Daniel Rosenberg
2023-04-27 23:42         ` Andrii Nakryiko
2023-04-28  9:03           ` Jose E. Marchesi
2023-04-28 17:20             ` Andrii Nakryiko
2023-05-03 18:27               ` Jose E. Marchesi

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