Re: [dpdk-dev] [PATCH v8 03/12] bpf: allow self-xor operation

2021-09-15 Thread Ananyev, Konstantin
> When doing BPF filter program conversion, a common way > to zero a register in single instruction is: > xor r7,r7 > The BPF validator would not allow this because the value of > r7 was undefined. But after this operation it always zero. > > Signed-off-by: Stephen Hemminger > --- > lib/

[dpdk-dev] [PATCH v8 03/12] bpf: allow self-xor operation

2021-09-13 Thread Stephen Hemminger
When doing BPF filter program conversion, a common way to zero a register in single instruction is: xor r7,r7 The BPF validator would not allow this because the value of r7 was undefined. But after this operation it always zero. Signed-off-by: Stephen Hemminger --- lib/bpf/bpf_validate.c |