diff options
author | Andrii Nakryiko <[email protected]> | 2024-01-26 14:09:44 -0800 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2024-01-29 16:17:44 +0100 |
commit | ad57654053805bf9a62602aaec74cc78edb6f235 (patch) | |
tree | d6f66e87082111583b271b5dff78a22745acb1c4 /arch/riscv/net/bpf_jit_comp64.c | |
parent | 29788f39a4171dd48a6d19eb78cf2ab168c4349a (diff) |
libbpf: Fix faccessat() usage on Android
Android implementation of libc errors out with -EINVAL in faccessat() if
passed AT_EACCESS ([0]), this leads to ridiculous issue with libbpf
refusing to load /sys/kernel/btf/vmlinux on Androids ([1]). Fix by
detecting Android and redefining AT_EACCESS to 0, it's equivalent on
Android.
[0] https://android.googlesource.com/platform/bionic/+/refs/heads/android13-release/libc/bionic/faccessat.cpp#50
[1] https://github.com/libbpf/libbpf-bootstrap/issues/250#issuecomment-1911324250
Fixes: 6a4ab8869d0b ("libbpf: Fix the case of running as non-root with capabilities")
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'arch/riscv/net/bpf_jit_comp64.c')
0 files changed, 0 insertions, 0 deletions