]> git.baikalelectronics.ru Git - kernel.git/commit
net: bpf_jit: fix BPF_S_LDX_B_MSH compilation
authorEric Dumazet <eric.dumazet@gmail.com>
Sun, 18 Mar 2012 02:40:48 +0000 (02:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Mar 2012 21:41:44 +0000 (17:41 -0400)
commitf974f9248794f08dc527828c8063e33e6afb3f7e
tree20fbc871a5f19e4e243425d78c5a2e50cbb66912
parentad611e8113d58a02738a70013cbc9e944bd249af
net: bpf_jit: fix BPF_S_LDX_B_MSH compilation

Matt Evans spotted that x86 bpf_jit was incorrectly handling negative
constant offsets in BPF_S_LDX_B_MSH instruction.

We need to abort JIT compilation like we do in common_load so that
filter uses the interpreter code and can call __load_pointer()

Reference: http://lists.openwall.net/netdev/2011/07/19/11

Thanks to Indan Zupancic to bring back this issue.

Reported-by: Matt Evans <matt@ozlabs.org>
Reported-by: Indan Zupancic <indan@nul.nu>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/x86/net/bpf_jit_comp.c