linux/tools
Daniel Müller c44fd84507 libbpf: Add support for attaching uprobes to shared objects in APKs
This change adds support for attaching uprobes to shared objects located
in APKs, which is relevant for Android systems where various libraries
may reside in APKs. To make that happen, we extend the syntax for the
"binary path" argument to attach to with that supported by various
Android tools:
  <archive>!/<binary-in-archive>

For example:
  /system/app/test-app/test-app.apk!/lib/arm64-v8a/libc++_shared.so

APKs need to be specified via full path, i.e., we do not attempt to
resolve mere file names by searching system directories.

We cannot currently test this functionality end-to-end in an automated
fashion, because it relies on an Android system being present, but there
is no support for that in CI. I have tested the functionality manually,
by creating a libbpf program containing a uretprobe, attaching it to a
function inside a shared object inside an APK, and verifying the sanity
of the returned values.

Signed-off-by: Daniel Müller <deso@posteo.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230301212308.1839139-4-deso@posteo.net
2023-03-01 16:05:35 -08:00
..
accounting
arch selftests/bpf: Remove not used headers 2023-02-22 13:01:34 -08:00
bootconfig
bpf tools: bpftool: Remove invalid \' json escape 2023-02-27 11:28:16 -08:00
build
certs
cgroup
counter
debugging
edid
firewire
firmware
gpio tools: gpio: fix -c option of gpio-event-mon 2023-01-27 14:05:46 +01:00
hv
iio
include bpf: Add bpf_dynptr_slice and bpf_dynptr_slice_rdwr 2023-03-01 09:55:24 -08:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Add support for attaching uprobes to shared objects in APKs 2023-03-01 16:05:35 -08:00
memory-model
net/ynl tools: net: use python3 explicitly 2023-01-31 20:36:03 -08:00
objtool xen: branch for v6.3-rc1 2023-02-21 17:07:39 -08:00
pci
pcmcia
perf perf test build-id: Fix test check for PE file 2023-01-18 10:52:06 -03:00
power platform-drivers-x86 for v6.3-1 2023-02-21 17:32:50 -08:00
rcu
scripts selftests/bpf: Fix cross compilation with CLANG_CROSS_FLAGS 2023-02-22 13:04:55 -08:00
spi
testing selftests/bpf: Support custom per-test flags and multiple expected messages 2023-03-01 11:13:42 -08:00
thermal
time
tracing rtla: Fix exit status when returning from calls to usage() 2022-12-09 18:06:24 -05:00
usb
verification Tracing fix for 6.2: 2022-12-21 19:03:42 -08:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-01-27 06:18:41 -05:00
vm MM patches for 6.2-rc1. 2022-12-13 19:29:45 -08:00
wmi
Makefile