No description. Add one?
  • C 52.6%
  • Rust 25.3%
  • C++ 22.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maciej Żenczykowski 681f604b2e bpf loader - finish support for kernel version conditional loading
bpf program section names must be unique to prevent programs from
appending to each other, so instead the bpf loader will strip
everything past the final $ symbol when actually pinning
the program into the filesystem.

While at it add a little bit more logging.

Example on aosp cuttlefish 5.4.30 virtual device:
  D LibBpfLoader: bpf_prog_load lib call for /system/etc/bpf/offload.o (schedcls_ingress_tether_ether) returned fd: 8 (no error)
  D LibBpfLoader: cs[1].name:schedcls_ingress_tether_rawip$stub min_kver:0 .max_kver:40e00 (kvers:5041e)
  D LibBpfLoader: cs[2].name:schedcls_ingress_tether_rawip$4_14 min_kver:40e00 .max_kver:ffffffff (kvers:5041e)
  D LibBpfLoader: bpf_prog_load lib call for /system/etc/bpf/offload.o (schedcls_ingress_tether_rawip$4_14) returned fd: 9 (no error)
  I bpfloader: Attempted load object: /system/etc/bpf/offload.o, ret: Success

  $ adb shell ls -l /sys/fs/bpf | egrep offload
  -rw-rw---- 1 root network_stack 0 2020-04-22 01:27 map_offload_tether_ingress_map
  -rw-rw---- 1 root network_stack 0 2020-04-22 01:27 map_offload_tether_stats_map
  -r--r----- 1 root root          0 2020-04-22 01:27 prog_offload_schedcls_ingress_tether_ether
  -r--r----- 1 root root          0 2020-04-22 01:27 prog_offload_schedcls_ingress_tether_rawip

Test: builds, atest, proper program loaded on 5.4.30 aosp cuttlefish
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id3fcb8e2a6b0087f704e77726e9961efc6145739
2020-04-21 18:29:58 -07:00
bpfloader Remove bpfloader dependency on netd's ebpf programs. 2020-02-19 10:31:54 -08:00
libbpf_android bpf loader - finish support for kernel version conditional loading 2020-04-21 18:29:58 -07:00
progs Merge "Remove EXCLUDE_FS_CONFIG_STRUCTURES" 2020-04-03 14:36:58 +00:00
.clang-format Replace clang-format with symlink. 2019-01-18 14:26:33 -08:00
Android.bp C++17 is the default now. 2018-12-03 09:36:31 -08:00
MODULE_LICENSE_APACHE2 Fix the build problem with bpf project 2018-10-16 21:17:12 -07:00
NOTICE Fix the build problem with bpf project 2018-10-16 21:17:12 -07:00
OWNERS OWNERS: +smoreland +connoro -fengc -joelaf 2020-01-10 15:42:06 -08:00
PREUPLOAD.cfg Fix the build problem with bpf project 2018-10-16 21:17:12 -07:00