netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: "Joel Fernandes (Google)" <joel@joelfernandes.org>,
	linux-kernel@vger.kernel.org
Cc: Michal Gregorczyk <michalgr@live.com>,
	Adrian Ratiu <adrian.ratiu@collabora.com>,
	Mohammad Husain <russoue@gmail.com>,
	Qais Yousef <qais.yousef@arm.com>,
	Srinivas Ramana <sramana@codeaurora.org>,
	duyuchao <yuchao.du@unisoc.com>,
	Manjo Raja Rao <linux@manojrajarao.com>,
	Karim Yaghmour <karim.yaghmour@opersys.com>,
	Tamir Carmeli <carmeli.tamir@gmail.com>,
	Yonghong Song <yhs@fb.com>, Alexei Starovoitov <ast@kernel.org>,
	Brendan Gregg <brendan.d.gregg@gmail.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Peter Ziljstra <peterz@infradead.org>,
	Andrii Nakryiko <andrii.nakryiko@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Kees Cook <keescook@chromium.org>,
	kernel-team@android.com, bpf@vger.kernel.org,
	Ingo Molnar <mingo@redhat.com>, Martin KaFai Lau <kafai@fb.com>,
	netdev@vger.kernel.org, Song Liu <songliubraving@fb.com>
Subject: Re: [PATCH v2 1/4] bpf: Add support for reading user pointers
Date: Mon, 6 May 2019 21:11:19 +0200	[thread overview]
Message-ID: <3c6b312c-5763-0d9c-7c2c-436ee41f9be1@iogearbox.net> (raw)
In-Reply-To: <20190506183116.33014-1-joel@joelfernandes.org>

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 <michalgr@live.com>
> Cc: Adrian Ratiu <adrian.ratiu@collabora.com>
> Cc: Mohammad Husain <russoue@gmail.com>
> Cc: Qais Yousef <qais.yousef@arm.com>
> Cc: Srinivas Ramana <sramana@codeaurora.org>
> Cc: duyuchao <yuchao.du@unisoc.com>
> Cc: Manjo Raja Rao <linux@manojrajarao.com>
> Cc: Karim Yaghmour <karim.yaghmour@opersys.com>
> Cc: Tamir Carmeli <carmeli.tamir@gmail.com>
> Cc: Yonghong Song <yhs@fb.com>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Peter Ziljstra <peterz@infradead.org>
> Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: kernel-team@android.com
> Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
> ---
> 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. This series here should
also fix up all current probe read usage under samples/bpf/ and
tools/testing/selftests/bpf/.

Thanks,
Daniel

  parent reply	other threads:[~2019-05-06 19:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 18:31 [PATCH v2 1/4] bpf: Add support for reading user pointers Joel Fernandes (Google)
2019-05-06 18:31 ` [PATCH v2 2/4] bpf: Add support for reading kernel pointers Joel Fernandes (Google)
2019-05-06 18:31 ` [PATCH v2 3/4] bpf: Add warning when program uses deprecated bpf_probe_read Joel Fernandes (Google)
2019-05-06 18:31 ` [PATCH v2 4/4] tools: Sync uapi headers with new bpf function calls Joel Fernandes (Google)
2019-05-06 19:11 ` Daniel Borkmann [this message]
2019-05-06 19:57   ` [PATCH v2 1/4] bpf: Add support for reading user pointers Joel Fernandes
2019-05-06 23:10     ` Daniel Borkmann
2019-05-07  9:47       ` Joel Fernandes
2019-05-08 12:39       ` Masami Hiramatsu
2019-05-06 22:24 ` Qais Yousef

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c6b312c-5763-0d9c-7c2c-436ee41f9be1@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=adrian.ratiu@collabora.com \
    --cc=andrii.nakryiko@gmail.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brendan.d.gregg@gmail.com \
    --cc=carmeli.tamir@gmail.com \
    --cc=joel@joelfernandes.org \
    --cc=kafai@fb.com \
    --cc=karim.yaghmour@opersys.com \
    --cc=keescook@chromium.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@manojrajarao.com \
    --cc=mhiramat@kernel.org \
    --cc=michalgr@live.com \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    --cc=rostedt@goodmis.org \
    --cc=russoue@gmail.com \
    --cc=songliubraving@fb.com \
    --cc=sramana@codeaurora.org \
    --cc=yhs@fb.com \
    --cc=yuchao.du@unisoc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).