netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eugene Syromiatnikov <esyr@redhat.com>
To: Jiri Olsa <jolsa@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>
Cc: Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	netdev@vger.kernel.org, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org, Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org
Subject: [PATCH bpf v4 0/3] Fix kprobe_multi interface issues for 5.18
Date: Thu, 19 May 2022 20:13:55 +0200	[thread overview]
Message-ID: <cover.1652982525.git.esyr@redhat.com> (raw)

Hello.

While [1] seems to require additional work[2] due to changes
in the interface (and it has already been re-targeted for bpf-next),
I would like to ask to consider the following three patches, that fix
possible out-of-bounds write, properly disable the interface
for 32-bit compat user space, and prepare the libbpf interface change,
for the 5.18 release.  Thank you.

[1] https://lore.kernel.org/lkml/cover.1652772731.git.esyr@redhat.com/
[2] https://lore.kernel.org/lkml/YoTXiAk1EpZ0rLKE@krava/i

v4:
 - Added additional size checks for INT_MAX, as suggested by Yonghong
   Song
 - Added the third patch for the user space kprobe_multi.addrs type
   change, split from the 4th bpf-next patch, as suggested by Yonghong
   Song and Andrii Nakryiko

v3: https://lore.kernel.org/lkml/cover.1652876187.git.esyr@redhat.com/
 - Split out patches for 5.18
 - Removed superfluous size assignments after overflow_mul_check,
   as suggested by Yonghong Song

v2: https://lore.kernel.org/lkml/20220516230441.GA22091@asgard.redhat.com/
 - Fixed the isses reported by CI

v1: https://lore.kernel.org/lkml/20220516182657.GA28596@asgard.redhat.com/

Eugene Syromiatnikov (3):
  bpf_trace: check size for overflow in bpf_kprobe_multi_link_attach
  bpf_trace: bail out from bpf_kprobe_multi_link_attach when in compat
  libbpf, selftests/bpf: pass array of u64 values in kprobe_multi.addrs

 kernel/trace/bpf_trace.c                                  | 15 +++++++++------
 tools/lib/bpf/bpf.h                                       |  2 +-
 tools/lib/bpf/libbpf.c                                    |  8 ++++----
 tools/lib/bpf/libbpf.h                                    |  2 +-
 tools/testing/selftests/bpf/prog_tests/bpf_cookie.c       |  2 +-
 .../testing/selftests/bpf/prog_tests/kprobe_multi_test.c  |  8 ++++----
 6 files changed, 20 insertions(+), 17 deletions(-)

-- 
2.1.4


             reply	other threads:[~2022-05-19 18:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19 18:13 Eugene Syromiatnikov [this message]
2022-05-19 18:14 ` [PATCH bpf v4 1/3] bpf_trace: check size for overflow in bpf_kprobe_multi_link_attach Eugene Syromiatnikov
2022-05-19 19:22   ` Yonghong Song
2022-05-19 18:14 ` [PATCH bpf v4 2/3] bpf_trace: bail out from bpf_kprobe_multi_link_attach when in compat Eugene Syromiatnikov
2022-05-19 18:14 ` [PATCH bpf v4 3/3] libbpf, selftests/bpf: pass array of u64 values in kprobe_multi.addrs Eugene Syromiatnikov
2022-05-19 19:43   ` Yonghong Song
2022-05-19 20:15     ` Jiri Olsa
2022-05-20 22:35 ` [PATCH bpf v4 0/3] Fix kprobe_multi interface issues for 5.18 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=cover.1652982525.git.esyr@redhat.com \
    --to=esyr@redhat.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=shuah@kernel.org \
    --cc=songliubraving@fb.com \
    --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).