From: Eduard Zingerman <eddyz87@gmail.com>
To: Arthur Fabre <afabre@cloudflare.com>, bpf@vger.kernel.org
Cc: Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>,
Hao Luo <haoluo@google.com>, Jiri Olsa <jolsa@kernel.org>,
kernel-team@cloudflare.com
Subject: Re: [PATCH bpf v2 2/2] selftests/bpf: Test r0 bounds after BPF to BPF call with abnormal return
Date: Mon, 16 Dec 2024 10:50:25 -0800 [thread overview]
Message-ID: <10d47bb5c43f58cbbcbcdf5f47961daa08ce04d3.camel@gmail.com> (raw)
In-Reply-To: <D6DB4NCLQZC9.I7DUNKR9RORW@bobby>
On Mon, 2024-12-16 at 18:39 +0100, Arthur Fabre wrote:
[...]
> It might not be possible to do them both entirely: clang also doesn't
> know that bpf_tail_call() can return, so it assumes the callee() will
> return a constant r0. It sometimes optimizes branches / loads out
> because of this.
Hm, haven't thought about this.
You would need assembly to hide the r0 indeed.
next prev parent reply other threads:[~2024-12-16 18:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-13 21:27 [PATCH bpf v2 0/2] Don't trust r0 bounds after BPF to BPF calls with abnormal returns Arthur Fabre
2024-12-13 21:27 ` [PATCH bpf v2 1/2] bpf: " Arthur Fabre
2024-12-13 23:52 ` Eduard Zingerman
2024-12-13 21:27 ` [PATCH bpf v2 2/2] selftests/bpf: Test r0 bounds after BPF to BPF call with abnormal return Arthur Fabre
2024-12-13 23:55 ` Eduard Zingerman
2024-12-16 17:39 ` Arthur Fabre
2024-12-16 18:05 ` Alexei Starovoitov
2024-12-16 18:50 ` Eduard Zingerman
2024-12-16 19:47 ` Alexei Starovoitov
2024-12-16 20:45 ` Arthur Fabre
2024-12-16 18:50 ` Eduard Zingerman [this message]
2024-12-16 17:45 ` [PATCH bpf v2 0/2] Don't trust r0 bounds after BPF to BPF calls with abnormal returns Arthur Fabre
2024-12-16 18:03 ` 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=10d47bb5c43f58cbbcbcdf5f47961daa08ce04d3.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=afabre@cloudflare.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kernel-team@cloudflare.com \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=yonghong.song@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.