linux/arch/arm64
Jean-Philippe Brucker 8008342853 bpf, arm64: Add BPF exception tables
When a tracing BPF program attempts to read memory without using the
bpf_probe_read() helper, the verifier marks the load instruction with
the BPF_PROBE_MEM flag. Since the arm64 JIT does not currently recognize
this flag it falls back to the interpreter.

Add support for BPF_PROBE_MEM, by appending an exception table to the
BPF program. If the load instruction causes a data abort, the fixup
infrastructure finds the exception table and fixes up the fault, by
clearing the destination register and jumping over the faulting
instruction.

To keep the compact exception table entry format, inspect the pc in
fixup_exception(). A more generic solution would add a "handler" field
to the table entry, like on x86 and s390.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Song Liu <songliubraving@fb.com>
Link: https://lore.kernel.org/bpf/20200728152122.1292756-2-jean-philippe@linaro.org
2020-07-31 00:43:40 +02:00
..
boot Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net into master 2020-07-25 11:50:59 -07:00
configs arm64: defconfig: Enable CONFIG_PCIE_RCAR_HOST 2020-07-13 10:45:50 +02:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2020-06-01 12:00:10 -07:00
include bpf, arm64: Add BPF exception tables 2020-07-31 00:43:40 +02:00
kernel arm64 fix for -rc7 2020-07-24 14:16:12 -07:00
kvm KVM: arm64: Stop clobbering x0 for HVC_SOFT_RESTART 2020-07-06 11:47:02 +01:00
lib Merge branch 'rwonce/rework' of git://git.kernel.org/pub/scm/linux/kernel/git/will/linux 2020-06-10 14:46:54 -07:00
mm bpf, arm64: Add BPF exception tables 2020-07-31 00:43:40 +02:00
net bpf, arm64: Add BPF exception tables 2020-07-31 00:43:40 +02:00
xen arm64: xen: Use modern annotations for assembly functions 2020-01-09 16:09:42 +00:00
Kbuild arm64: add arch/arm64/Kbuild 2019-08-21 18:47:15 +01:00
Kconfig arm64 fixes for -rc3 2020-06-27 08:47:18 -07:00
Kconfig.debug arm64: remove TEXT_OFFSET randomization 2020-06-15 13:10:59 +01:00
Kconfig.platforms This time around we have 4 lines of diff in the core framework, removing a 2020-06-10 11:42:19 -07:00
Makefile Various EFI fixes: 2020-07-25 13:18:42 -07:00