android_system_bpf/libbpf_android
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maciej Żenczykowski 30af4b5487 KVER macro - support 4.9.256+ kernel
Instead of doing 16/8/8 bits for major/minor/subver macro,
switch to 8/8/16 bits, since this gives plenty of space:
  - major versions are bumped every few years, so 256 last forever
  - minor versions are bumped every few months (~5-6 per year),
    so 256 lasts for decades, additionally Linus Torvalds doesn't
    like big numbers, and eventually bumps the major instead
  - sub versions are the problematic ones, because they're bumped
    on every LTS security release, however even at one release per day,
    16 bits lasts for 180 years

Note: before this change 4.9.256 was treated as equivalent to 4.10.0.

Luckily all our tests were only ever (by chance) against the LTS release
bases (ie. 4.9.0, 4.14.0, 4.19.0, 5.4.0) and thus we wouldn't have hit
an actually failure until 4.9.(5*256) === 4.14.0 which would have caused
the bpfloader to attempt to load bpf code requiring 4.14 on a 4.9 kernel,
and resulted in failure of device to successfully boot.

Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0535ce081967af092f3342c0abfd05a1e5028eb6
2021-02-11 16:05:21 -08:00
..
include KVER macro - support 4.9.256+ kernel 2021-02-11 16:05:21 -08:00
Android.bp [LSC] Add LOCAL_LICENSE_KINDS to system/bpf 2021-02-05 01:28:19 -08:00
BpfLoadTest.cpp SKIP_IF_BPF_NOT_SUPPORTED is a no-op 2021-01-12 02:08:55 +00:00
BpfMapTest.cpp SKIP_IF_BPF_NOT_SUPPORTED is a no-op 2021-01-12 02:08:55 +00:00
BpfUtils.cpp remove BpfLevel and getBpfSupportLevel in favour of isAtLeastKernelVersion 2021-01-19 23:48:01 -08:00
Loader.cpp move waitForProgsLoaded() to header file 2021-01-21 17:39:33 -08:00
TEST_MAPPING TEST_MAPPING += libbpf_android_test 2020-01-15 08:28:44 +00:00