net: bpf_jit: fix an off-one bug in x86_64 cond jump target
commitb3c5fb8252b04ec02654f80988e68852f1a14cb5
authorMarkus Kötter <nepenthesdev@gmail.com>
Sat, 17 Dec 2011 11:39:08 +0000 (17 11:39 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 6 Jan 2012 22:14:05 +0000 (6 14:14 -0800)
tree78a9282fe0e11d9e9ef319d84aace7693fa5b59f
parent2a89fc8b91abf1ba56daa23b05e6572b30331837
net: bpf_jit: fix an off-one bug in x86_64 cond jump target

[ Upstream commit a03ffcf873fe0f2565386ca8ef832144c42e67fa ]

x86 jump instruction size is 2 or 5 bytes (near/long jump), not 2 or 6
bytes.

In case a conditional jump is followed by a long jump, conditional jump
target is one byte past the start of target instruction.

Signed-off-by: Markus Kötter <nepenthesdev@gmail.com>
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@suse.de>
arch/x86/net/bpf_jit_comp.c