]> 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)
commit18fbda8f6075cc560501918baee9e24f69cd94ee
tree71943addcee05f7947ab107b74467d7637303aab
parent82b608e94b4b7ab01bcf6d0e1cdc76e66970b187
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