[PATCH RFC] bpf, x64: allow not-converged images when BPF_JIT_ALWAYS_ON is set

2020-11-13 Thread Gary Lin
The x64 bpf jit expects the bpf images converge within the given passes. However there is a corner case: l0: ldh [4] l1: jeq #0x537d, l2, l40 l2: ld [0] l3: jeq #0xfa163e0d, l4, l40 l4: ldh [12] l5: ldx #0xe l6: jeq #0x86dd, l41, l7 l7: jeq #0x800, l

Re: [PATCH RFC] bpf, x64: allow not-converged images when BPF_JIT_ALWAYS_ON is set

2020-11-13 Thread Alexei Starovoitov
On Fri, Nov 13, 2020 at 12:40 AM Gary Lin wrote: > > The x64 bpf jit expects the bpf images converge within the given passes. > However there is a corner case: > > l0: ldh [4] > l1: jeq #0x537d, l2, l40 > l2: ld [0] > l3: jeq #0xfa163e0d, l4, l40 > l4: ldh [12] > l5

Re: [PATCH RFC] bpf, x64: allow not-converged images when BPF_JIT_ALWAYS_ON is set

2020-11-15 Thread Gary Lin
On Fri, Nov 13, 2020 at 05:48:31PM -0800, Alexei Starovoitov wrote: > On Fri, Nov 13, 2020 at 12:40 AM Gary Lin wrote: > > > > The x64 bpf jit expects the bpf images converge within the given passes. > > However there is a corner case: > > > > l0: ldh [4] > > l1: jeq #0x537d, l2, l40 >