diff options
author | Martin Kelly <martin.kelly@crowdstrike.com> | 2023-09-25 14:50:33 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2023-09-25 16:22:42 -0700 |
commit | ef3b82003e6ca9554a144a9f42e7239ba39f0b97 (patch) | |
tree | f99cf2ce197ce003f301eeb50d3c00948f1d03e8 /tools/testing/selftests/bpf/prog_tests/stacktrace_map_skip.c | |
parent | 4448f64c549c28175dd9af4e8f9a2e0c62ef6d38 (diff) | |
download | linux-ef3b82003e6ca9554a144a9f42e7239ba39f0b97.tar.gz linux-ef3b82003e6ca9554a144a9f42e7239ba39f0b97.tar.bz2 linux-ef3b82003e6ca9554a144a9f42e7239ba39f0b97.zip |
libbpf: Switch rings to array of pointers
Switch rb->rings to be an array of pointers instead of a contiguous
block. This allows for each ring pointer to be stable after
ring_buffer__add is called, which allows us to expose struct ring * to
the user without gotchas. Without this change, the realloc in
ring_buffer__add could invalidate a struct ring *, making it unsafe to
give to the user.
Signed-off-by: Martin Kelly <martin.kelly@crowdstrike.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230925215045.2375758-3-martin.kelly@crowdstrike.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/stacktrace_map_skip.c')
0 files changed, 0 insertions, 0 deletions