]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: net: make BPF_LD | BPF_IND instruction trigger r_X initialisation to 0.
authorNicolas Schichan <nschichan@freebox.fr>
Fri, 2 Oct 2015 13:39:12 +0000 (15:39 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Oct 2015 14:01:08 +0000 (07:01 -0700)
commit48da7a1eac080022833cdac3abe65e395c9c69c6
treea6e736739e26ec735f50272f079950c95e33365e
parentef3c74ba78f4a37e11fb9d2d4df0546a8accea94
ARM: net: make BPF_LD | BPF_IND instruction trigger r_X initialisation to 0.

Without this patch, if the only instructions using r_X are of the
BPF_LD | BPF_IND type, r_X would not be reset to 0, using whatever
value was there when entering the jited code. With this patch, r_X
will be correctly marked as used so it will be reset to 0 in the
prologue code.

This fix also makes the test "LD_IND byte default X" pass in the
test_bpf module when the ARM JIT is enabled.

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