Re: [bpf PATCH v3] bpf: verifier, do_refine_retval_range may clamp umin to 0 incorrectly

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

 



On Thu, Jan 30, 2020 at 04:44:09PM -0800, John Fastabend wrote:
> > 
> > But verifier seems handling <<= and >>= correctly, right?
> > Even we have it, the verifier should reach the same conclusion
> > compared to not having it, right?
> > 
> 
> No, verifier marks it unknown and doesn't track it fully. We
> can perhaps improve the verifier but the above is a nice
> fix/improvement for the backend imo regardless.

I don't see how the verifier can be taught to carry smax information after <<32
shift. The verifier has to do dst_reg->smax_value = S64_MAX.
The only way to carry smax is to recognize a sequence of <<32 s>>32.
While at it we can recognize both <<32 >>32 and <<32 s>32 as pseudo insns.



[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