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)
commit6d715e301e950e3314d590bdbabf0c26e4fed94b
tree71943addcee05f7947ab107b74467d7637303aab
parent7aed35cb65348fc8b9ce0c2394ff675e5fc750da
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