From: Daniel Borkmann <daniel@iogearbox.net>
To: ast@kernel.org
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
torvalds@linux-foundation.org, mhiramat@kernel.org,
brendan.d.gregg@gmail.com, hch@lst.de, john.fastabend@gmail.com,
yhs@fb.com, Daniel Borkmann <daniel@iogearbox.net>
Subject: [PATCH bpf v2 0/3] Restrict bpf_probe_read{,str}() and bpf_trace_printk()'s %s
Date: Fri, 15 May 2020 12:11:15 +0200 [thread overview]
Message-ID: <20200515101118.6508-1-daniel@iogearbox.net> (raw)
Small set of fixes in order to restrict BPF helpers for tracing which are
broken on archs with overlapping address ranges as per discussion in [0].
I've targetted this for -bpf tree so they can be routed as fixes. Thanks!
v1 -> v2:
- switch to reusable %pks, %pus format specifiers (Yonghong)
- fixate %s on kernel_ds probing for archs with overlapping addr space
[0] https://lore.kernel.org/bpf/CAHk-=wjJKo0GVixYLmqPn-Q22WFu0xHaBSjKEo7e7Yw72y5SPQ@mail.gmail.com/T/
Daniel Borkmann (3):
bpf: restrict bpf_probe_read{,str}() only to archs where they work
bpf: add bpf_probe_read_{user, kernel}_str() to do_refine_retval_range
bpf: restrict bpf_trace_printk()'s %s usage and add %pks, %pus specifier
Documentation/core-api/printk-formats.rst | 14 +++
arch/arm/Kconfig | 1 +
arch/arm64/Kconfig | 1 +
arch/x86/Kconfig | 1 +
init/Kconfig | 3 +
kernel/bpf/verifier.c | 4 +-
kernel/trace/bpf_trace.c | 100 ++++++++++++++--------
lib/vsprintf.c | 12 +++
8 files changed, 101 insertions(+), 35 deletions(-)
--
2.21.0
next reply other threads:[~2020-05-15 10:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 10:11 Daniel Borkmann [this message]
2020-05-15 10:11 ` [PATCH bpf v2 1/3] bpf: restrict bpf_probe_read{,str}() only to archs where they work Daniel Borkmann
2020-05-15 10:11 ` [PATCH bpf v2 2/3] bpf: add bpf_probe_read_{user, kernel}_str() to do_refine_retval_range Daniel Borkmann
2020-05-15 10:11 ` [PATCH bpf v2 3/3] bpf: restrict bpf_trace_printk()'s %s usage and add %pks, %pus specifier Daniel Borkmann
2020-05-15 15:18 ` [PATCH bpf v2 0/3] Restrict bpf_probe_read{,str}() and bpf_trace_printk()'s %s Alexei Starovoitov
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=20200515101118.6508-1-daniel@iogearbox.net \
--to=daniel@iogearbox.net \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brendan.d.gregg@gmail.com \
--cc=hch@lst.de \
--cc=john.fastabend@gmail.com \
--cc=mhiramat@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=yhs@fb.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).