diff options
author | Schichan Nicolas <nschichan@freebox.fr> | 2012-12-10 17:49:40 +0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-12-11 04:19:29 +0400 |
commit | fe15f3f1067c56820da44aa92659f2f908fd3caa (patch) | |
tree | 908f939cbcbe48459d4b57fcae5c5f2a21082b56 /scripts/diffconfig | |
parent | 89c2e00978ada02a5b84b361faee954cbc7a0386 (diff) | |
download | linux-fe15f3f1067c56820da44aa92659f2f908fd3caa.tar.xz |
ARM: 7598/1: net: bpf_jit_32: fix sp-relative load/stores offsets.
The offset must be multiplied by 4 to be sure to access the correct
32bit word in the stack scratch space.
For instance, a store at scratch memory cell #1 was generating the
following:
st r4, [sp, #1]
While the correct code for this is:
st r4, [sp, #4]
To reproduce the bug (assuming your system has a NIC with the mac
address 52:54:00:12:34:56):
echo 0 > /proc/sys/net/core/bpf_jit_enable
tcpdump -ni eth0 "ether[1] + ether[2] - ether[3] * ether[4] - ether[5] \
== -0x3AA" # this will capture packets as expected
echo 1 > /proc/sys/net/core/bpf_jit_enable
tcpdump -ni eth0 "ether[1] + ether[2] - ether[3] * ether[4] - ether[5] \
== -0x3AA" # this will not.
This bug was present since the original inclusion of bpf_jit for ARM
(ddecdfce: ARM: 7259/3: net: JIT compiler for packet filters).
Signed-off-by: Nicolas Schichan <nschichan@freebox.fr>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'scripts/diffconfig')
0 files changed, 0 insertions, 0 deletions