From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Hou Tao <houtao@huaweicloud.com>
Cc: bpf@vger.kernel.org, Martin KaFai Lau <martin.lau@linux.dev>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Andrii Nakryiko <andrii@kernel.org>, Song Liu <song@kernel.org>,
Hao Luo <haoluo@google.com>,
Yonghong Song <yonghong.song@linux.dev>,
Daniel Borkmann <daniel@iogearbox.net>,
KP Singh <kpsingh@kernel.org>,
Stanislav Fomichev <sdf@fomichev.me>,
Jiri Olsa <jolsa@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
houtao1@huawei.com, xukuohai@huawei.com
Subject: Re: [PATCH bpf] bpf: Extend the size of scratched_stack_slots to 128 bits
Date: Wed, 23 Oct 2024 10:13:09 -0700 [thread overview]
Message-ID: <31d0895a217388dfe6bfa5b74c4b346705f894e4.camel@gmail.com> (raw)
In-Reply-To: <42a4ec6bccc867d18033583b1dfea0736ac1afb0.camel@gmail.com>
On Wed, 2024-10-23 at 09:17 -0700, Eduard Zingerman wrote:
[...]
> > We have other places where we assume that 64 bits is enough to specify
> > stack slot index (linked regs, for instance). Do we need to update all
> > of those now as well? If yes, maybe then it's better to make sure
> > valid programs can never go beyond 512 bytes of stack even for
> > bpf_fastcall?..
>
> Specifically function frames.
> This is a huge blunder from my side.
The following places are problematic:
- bpf_jmp_history_entry->flags
- backtrack_state->stack_masks
The following should be fine:
- bpf_func_state->stack
Not sure if anything else is affected (excluding scratched_stack_slots).
I agree that we either need to update backtracking logic,
or drop this stack extension logic.
next prev parent reply other threads:[~2024-10-23 17:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-23 2:27 [PATCH bpf] bpf: Extend the size of scratched_stack_slots to 128 bits Hou Tao
2024-10-23 16:15 ` Andrii Nakryiko
2024-10-23 16:17 ` Eduard Zingerman
2024-10-23 17:13 ` Eduard Zingerman [this message]
2024-10-23 17:33 ` Andrii Nakryiko
2024-10-23 17:37 ` Eduard Zingerman
2024-10-23 17:44 ` Andrii Nakryiko
2024-10-23 18:02 ` Eduard Zingerman
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=31d0895a217388dfe6bfa5b74c4b346705f894e4.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=alexei.starovoitov@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=haoluo@google.com \
--cc=houtao1@huawei.com \
--cc=houtao@huaweicloud.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=xukuohai@huawei.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox