]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: net: bpf: avoid 'bx' instruction on non-Thumb capable CPUs
authorRussell King <rmk+kernel@armlinux.org.uk>
Sat, 13 Jan 2018 11:35:15 +0000 (11:35 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Wed, 17 Jan 2018 19:35:22 +0000 (19:35 +0000)
commit01c0702b883be574a823b20a1bd8fe1faf4b67a1
tree9eb1a903130c504a325c754051c6be9c27c8088c
parentec0c6bf95cb511735f460aad9bdcf46268277518
ARM: net: bpf: avoid 'bx' instruction on non-Thumb capable CPUs

Avoid the 'bx' instruction on CPUs that have no support for Thumb and
thus do not implement this instruction by moving the generation of this
opcode to a separate function that selects between:

bx reg

and

mov pc, reg

according to the capabilities of the CPU.

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