From: Eduard Zingerman <eddyz87@gmail.com>
To: Andrii Nakryiko <andrii.nakryiko@gmail.com>,
Andrei Matei <andreimatei1@gmail.com>
Cc: Hao Sun <sunhao.th@gmail.com>,
bpf@vger.kernel.org, ast@kernel.org,
kernel-team@dataexmachina.dev
Subject: Re: [PATCH bpf] bpf: fix tracking of stack size for var-off access
Date: Wed, 22 Nov 2023 14:38:34 +0200 [thread overview]
Message-ID: <58e347045bb81f667f037f124d4dcfe9a2d3f336.camel@gmail.com> (raw)
In-Reply-To: <CAEf4BzaJ41MJKk71Ex_HmLyhcoe9a_2jhvLiYxcXNSvK=6oNmg@mail.gmail.com>
On Tue, 2023-11-21 at 13:55 -0800, Andrii Nakryiko wrote:
[...]
> > So, assuming that this tests (and a few others) are sane, Andrii's suggestion
> > of calling grow_stack_state()/update_stack_depth() in
> > check_stack_access_within_bounds() does not immediately work: doing so
> > would change
> > the behavior in check_stack_range_initialized() and allow the access.
> >
> > On the other hand, perhaps the test is not sane and the access should be
> > permitted, in the spirit of allowing reads of uninitialized stack? Perhaps the
> > different treatment of slots beyond state->allocated_stack and STACK_INVALID
>
> yes, I think this divergence is not intentional, but maybe Eduard
> remembers some other quirks and why it is what it is, let's see.
Yes, this is probably an overlook from my side.
I should have allowed reads beyond allocated stack in this case when
doing changes for STACK_INVALID.
Sorry for delayed response.
[...]
next prev parent reply other threads:[~2023-11-22 12:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-13 23:50 [PATCH bpf] bpf: fix tracking of stack size for var-off access Andrei Matei
2023-11-21 0:46 ` Andrii Nakryiko
2023-11-21 17:16 ` Hao Sun
2023-11-21 20:29 ` Andrei Matei
2023-11-21 21:55 ` Andrii Nakryiko
2023-11-22 12:38 ` Eduard Zingerman [this message]
2023-11-22 12:46 ` Eduard Zingerman
2023-11-21 20:34 ` Andrei Matei
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=58e347045bb81f667f037f124d4dcfe9a2d3f336.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andreimatei1@gmail.com \
--cc=andrii.nakryiko@gmail.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=kernel-team@dataexmachina.dev \
--cc=sunhao.th@gmail.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