]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: net: bpf: fix LDX instructions
authorRussell King <rmk+kernel@armlinux.org.uk>
Sat, 13 Jan 2018 21:06:16 +0000 (21:06 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Wed, 17 Jan 2018 19:38:21 +0000 (19:38 +0000)
commited745e39a3ea1a23f3c7f80fca01997b28aaf69f
treec631847a3e173367ef9ec46d38d1ebc4a4815278
parent9ad918034355988af99b6e1ada58b6105b977215
ARM: net: bpf: fix LDX instructions

When the source and destination register are identical, our JIT does not
generate correct code, which leads to kernel oopses.

Fix this by (a) generating more efficient code, and (b) making use of
the temporary earlier if we will overwrite the address register.

Fixes: 3b9837afcaa3 ("arm: eBPF JIT compiler")
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/net/bpf_jit_32.c