android_packages_modules_Co.../staticlibs/native/bpf_headers
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maciej Żenczykowski f1416b5494 enforce bpf ring buffer size is a power of two
While at it enforce a min/max of 4 kiB and 256 MiB.

A bpf ringbuffer must be an integer multiple of page size
(which is at least 4kiB), so 4kB is forced.

256 MiB upper limit is probably higher than it should be,
but it's really only here to avoid the u32/s32 conversion
mess that happens for 2+ GiB.

Test: TreeHugger
Bug: 279819914
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I2216d2273b0956a86c4222dd6ecf7293e0bafd41
2023-06-17 11:26:21 +00:00
..
include/bpf enforce bpf ring buffer size is a power of two 2023-06-17 11:26:21 +00:00
Android.bp bpf_headers: Make bpf_headers available to libsysutils 2023-05-18 14:39:14 -07:00
BpfMapTest.cpp BpfMap.h - hide dangerous stuff behind #ifdef BPF_MAP_MAKE_VISIBLE_FOR_TESTING 2022-06-16 19:25:30 +00:00
BpfRingbufTest.cpp BpfRingbuf: Add support for 32 bit kernels 2023-05-18 14:08:37 -07:00
TEST_MAPPING Rename bpf_map_utils to bpf_headers 2021-12-21 16:16:20 +08:00