Re: [PATCH v2 bpf-next] bpf: improve the general precision of tnum_mul

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

 



On Wed, Aug 20, 2025 at 3:48 AM Nandakumar Edamana
<nandakumar@xxxxxxxxxxxxxxxx> wrote:
>
> On 20/08/25 11:45, Harishankar Vishwanathan wrote:

[...]

> > If I understand the idea correctly, when the multiplier's (i.e. tnum a) bit is
> > unknown, it can either be 0 or 1. If it is 0, then we add nothing to
> > accumulator, i.e. TNUM(0, 0). If it is 1, we can add b to the accumulator
> > (appropriately shifted). The main idea is to take the union of these two
> > possible partial products, and add that to the accumulator. If so, could we also
> > do the following?
> >
> > acc = tnum_add(acc, tnum_union(TNUM(0, 0), b));
>
> But tnum_union(TNUM(0, 0), b) would introduce a concrete 0 to the set,
> right?

That makes sense, the above would be imprecise.

[...]

Best,
Harishankar Vishwanathan





[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