]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 17:32:22 +0000 (10:32 -0700)
commitb8828d5eb9f31e40359e7c9d7998e54e6bd2fac1
treecc3db5649c63ec30c543e3e2131cf657d08d9b4d
parent8aff97e587de738baccdd9b6f3bf9902fad8fa63
net: bpf_jit: fix BPF_S_LDX_B_MSH compilation

[ Upstream commit dc72d99dabb870ca5bd6d9fff674be853bb4a88d ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/net/bpf_jit_comp.c