]> git.baikalelectronics.ru Git - kernel.git/commit
net: bpf_jit: fix an off-one bug in x86_64 cond jump target
authorMarkus Kötter <nepenthesdev@gmail.com>
Sat, 17 Dec 2011 11:39:08 +0000 (11:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Dec 2011 20:47:29 +0000 (15:47 -0500)
commitcec11c205338984c65229363f7f688c21fa5f22b
treefd83a7eefe03946bba72c5a087d6c9aabb7aadb8
parentc9f59672b77f3b016ef02aeb20776aec015e1f90
net: bpf_jit: fix an off-one bug in x86_64 cond jump target

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>
arch/x86/net/bpf_jit_comp.c