Re: [PATCH bpf-next 04/15] bpf: Make bpf_for_each_spilled_reg consider narrow spills

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

 



On Wed, 2023-12-20 at 23:40 +0200, Maxim Mikityanskiy wrote:
> > From: Maxim Mikityanskiy <maxim@xxxxxxxxxxxxx>
> > 
> > Adjust the check in bpf_get_spilled_reg to take into account spilled
> > registers narrower than 64 bits. That allows find_equal_scalars to
> > properly adjust the range of all spilled registers that have the same
> > ID. Before this change, it was possible for a register and a spilled
> > register to have the same IDs but different ranges if the spill was
> > narrower than 64 bits and a range check was performed on the register.
> > 
> > Signed-off-by: Maxim Mikityanskiy <maxim@xxxxxxxxxxxxx>
> > ---

Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>

I double checked, all uses of bpf_for_each_reg_in_vstate() except
in find_equal_scalars() operate on 64-bit values (pointers),
so this change is ok.





[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