lkml.org 
[lkml]   [2019]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] bpf: Add support for reading user pointers
Hi Joel

On 05/02/19 16:49, Joel Fernandes (Google) wrote:
> The eBPF based opensnoop tool fails to read the file path string passed
> to the do_sys_open function. This is because it is a pointer to
> userspace address and causes an -EFAULT when read with
> probe_kernel_read. This is not an issue when running the tool on x86 but
> is an issue on arm64. This patch adds a new bpf function call based

I just did an experiment and if I use Android 4.9 kernel I indeed fail to see
PATH info when running opensnoop. But if I run on 5.1-rc7 opensnoop behaves
correctly on arm64.

My guess either a limitation that was fixed on later kernel versions or Android
kernel has some strict option/modifications that make this fail?




root@buildroot:/# uname -a
Linux buildroot 5.1.0-rc7-00164-ga00214620959-dirty #41 SMP PREEMPT Thu May 2 16:33:00 BST 2019 aarch64 GNU/Linux
root@buildroot:/# opensnoop
PID COMM FD ERR PATH
5180 default.script -1 2 /etc/ld.so.cache
5180 default.script -1 2 /lib/tls/v8l/neon/vfp/libresolv.so.2
5180 default.script -1 2 /lib/tls/v8l/neon/libresolv.so.2
5180 default.script -1 2 /lib/tls/v8l/vfp/libresolv.so.2
5180 default.script -1 2 /lib/tls/v8l/libresolv.so.2
5180 default.script -1 2 /lib/tls/neon/vfp/libresolv.so.2
5180 default.script -1 2 /lib/tls/neon/libresolv.so.2
5180 default.script -1 2 /lib/tls/vfp/libresolv.so.2
5180 default.script -1 2 /lib/tls/libresolv.so.2
5180 default.script -1 2 /lib/v8l/neon/vfp/libresolv.so.2
5180 default.script -1 2 /lib/v8l/neon/libresolv.so.2
5180 default.script -1 2 /lib/v8l/vfp/libresolv.so.2
5180 default.script -1 2 /lib/v8l/libresolv.so.2
5180 default.script -1 2 /lib/neon/vfp/libresolv.so.2
5180 default.script -1 2 /lib/neon/libresolv.so.2
5180 default.script -1 2 /lib/vfp/libresolv.so.2
5180 default.script 3 0 /lib/libresolv.so.2
5180 default.script 3 0 /lib/libc.so.6
5180 default.script 3 0 /usr/share/udhcpc/default.script
5180 default.script 3 0 /usr/share/udhcpc/default.script.d/




--
Qais Yousef

\
 
 \ /
  Last update: 2019-05-03 14:13    [W:0.198 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site