]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: net: handle negative offsets in BPF JIT.
authorNicolas Schichan <nschichan@freebox.fr>
Tue, 21 Jul 2015 12:14:13 +0000 (14:14 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Jul 2015 05:19:55 +0000 (22:19 -0700)
commite3d69a55dcaad8d14cf4fd22c7b0463421246aaa
tree71943addcee05f7947ab107b74467d7637303aab
parent38a9cd6ec369eeeb0eff6fbce77973701a6e6a65
ARM: net: handle negative offsets in BPF JIT.

Previously, the JIT would reject negative offsets known during code
generation and mishandle negative offsets provided at runtime.

Fix that by calling bpf_internal_load_pointer_neg_helper()
appropriately in the jit_get_skb_{b,h,w} slow path helpers and by forcing
the execution flow to the slow path helpers when the offset is
negative.

Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/arm/net/bpf_jit_32.c