Re: [PATCH bpf 1/3] bpf, x32: Fix bug with ALU64 {LSH,RSH,ARSH} BPF_X shift by 0

2019-07-03 Thread Daniel Borkmann
On 06/29/2019 07:57 AM, Luke Nelson wrote: > The current x32 BPF JIT for shift operations is not correct when the > shift amount in a register is 0. The expected behavior is a no-op, whereas > the current implementation changes bits in the destination register. > > The following example demonstrat

[PATCH bpf 1/3] bpf, x32: Fix bug with ALU64 {LSH,RSH,ARSH} BPF_X shift by 0

2019-06-28 Thread Luke Nelson
The current x32 BPF JIT for shift operations is not correct when the shift amount in a register is 0. The expected behavior is a no-op, whereas the current implementation changes bits in the destination register. The following example demonstrates the bug. The expected result of this program is 1,