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
1 file changed
tree: f70438acd823c06962cd5ed935c067c52d74a689
  1. staticlibs/