Re: [PATCH bpf] s390/bpf: fix lcgr instruction encoding

2019-08-12 Thread Daniel Borkmann
On 8/12/19 5:03 PM, Ilya Leoshkevich wrote: "masking, test in bounds 3" fails on s390, because BPF_ALU64_IMM(BPF_NEG, BPF_REG_2, 0) ignores the top 32 bits of BPF_REG_2. The reason is that JIT emits lcgfr instead of lcgr. The associated comment indicates that the code was intended to emit lcgr in

Re: [PATCH bpf] s390/bpf: fix lcgr instruction encoding

2019-08-12 Thread Vasily Gorbik
On Mon, Aug 12, 2019 at 05:03:32PM +0200, Ilya Leoshkevich wrote: > "masking, test in bounds 3" fails on s390, because > BPF_ALU64_IMM(BPF_NEG, BPF_REG_2, 0) ignores the top 32 bits of > BPF_REG_2. The reason is that JIT emits lcgfr instead of lcgr. > The associated comment indicates that the code

[PATCH bpf] s390/bpf: fix lcgr instruction encoding

2019-08-12 Thread Ilya Leoshkevich
"masking, test in bounds 3" fails on s390, because BPF_ALU64_IMM(BPF_NEG, BPF_REG_2, 0) ignores the top 32 bits of BPF_REG_2. The reason is that JIT emits lcgfr instead of lcgr. The associated comment indicates that the code was intended to emit lcgr in the first place, it's just that the wrong opc