Re: [PATCH bpf] bpf: fix tracking of stack size for var-off access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

[...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux