Subject: Re: [PATCH v2 1/4] bpf: Add support for reading user pointers

From: Joel Fernandes <[email-masked]>
Date: Mon, 6 May 2019 15:57:11 -0400

On Mon, May 06, 2019 at 09:11:19PM +0200, Daniel Borkmann wrote:
> On 05/06/2019 08:31 PM, 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
> > which calls the recently proposed probe_user_read function [1].
> > Using this function call from opensnoop fixes the issue on arm64.
> > 
> > [1] https://lore.kernel.org/patchwork/patch/1051588/
> > 
> > Cc: Michal Gregorczyk <[email-masked]>
> > Cc: Adrian Ratiu <[email-masked]>
> > Cc: Mohammad Husain <[email-masked]>
> > Cc: Qais Yousef <[email-masked]>
> > Cc: Srinivas Ramana <[email-masked]>
> > Cc: duyuchao <[email-masked]>
> > Cc: Manjo Raja Rao <[email-masked]>
> > Cc: Karim Yaghmour <[email-masked]>
> > Cc: Tamir Carmeli <[email-masked]>
> > Cc: Yonghong Song <[email-masked]>
> > Cc: Alexei Starovoitov <[email-masked]>
> > Cc: Brendan Gregg <[email-masked]>
> > Cc: Masami Hiramatsu <[email-masked]>
> > Cc: Peter Ziljstra <[email-masked]>
> > Cc: Andrii Nakryiko <[email-masked]>
> > Cc: Steven Rostedt <[email-masked]>
> > Cc: Kees Cook <[email-masked]>
> > Cc: [email-masked]
> > Signed-off-by: Joel Fernandes (Google) <[email-masked]>
> > ---
> > Masami, could you carry these patches in the series where are you add
> > probe_user_read function?
> > 
> > Previous submissions is here:
> > https://lore.kernel.org/patchwork/patch/1069552/
> > v1->v2: split tools uapi sync into separate commit, added deprecation
> > warning for old bpf_probe_read function.
> 
> Please properly submit this series to bpf tree once the base
> infrastructure from Masami is upstream.

Could you clarify what do you mean by "properly submit this series to bpf
tree" mean? [email-masked] is CC'd.

> This series here should
> also fix up all current probe read usage under samples/bpf/ and
> tools/testing/selftests/bpf/.

Ok. Agreed, will do that.

thanks,

- Joel