linux/arch
Xu Kuohai 042152c27c bpf, arm64: Sign return address for JITed code
Sign return address for JITed code when the kernel is built with pointer
authentication enabled:

1. Sign LR with paciasp instruction before LR is pushed to stack. Since
   paciasp acts like landing pads for function entry, no need to insert
   bti instruction before paciasp.

2. Authenticate LR with autiasp instruction after LR is popped from stack.

For BPF tail call, the stack frame constructed by the caller is reused by
the callee. That is, the stack frame is constructed by the caller and
destructed by the callee. Thus LR is signed and pushed to the stack in the
caller's prologue, and poped from the stack and authenticated in the
callee's epilogue.

For BPF2BPF call, the caller and callee construct their own stack frames,
and sign and authenticate their own LRs.

Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://events.static.linuxfound.org/sites/events/files/slides/slides_23.pdf
Link: https://lore.kernel.org/bpf/20220402073942.3782529-1-xukuohai@huawei.com
2022-04-06 00:04:22 +02:00
..
alpha dma-mapping updates for Linux 5.18 2022-03-29 08:50:14 -07:00
arc ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
arm This push fixes the following issues: 2022-03-31 11:17:39 -07:00
arm64 bpf, arm64: Sign return address for JITed code 2022-04-06 00:04:22 +02:00
csky ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
h8300 ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
hexagon ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
ia64 ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
m68k ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
microblaze ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
mips ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
nios2 ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
openrisc ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
parisc More parisc architecture updates & fixes for kernel v5.18-rc1 2022-03-30 15:11:26 -07:00
powerpc libnvdimm for 5.18 2022-03-30 10:04:11 -07:00
riscv There's one large change in the core clk framework here. We change how 2022-03-30 10:11:04 -07:00
s390 ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
sh ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
sparc dma-mapping updates for Linux 5.18 2022-03-29 08:50:14 -07:00
um ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
x86 Networking fixes for 5.18-rc1 and rethook patches. 2022-03-31 11:23:31 -07:00
xtensa dma-mapping updates for Linux 5.18 2022-03-29 08:50:14 -07:00
.gitignore
Kconfig Networking fixes for 5.18-rc1 and rethook patches. 2022-03-31 11:23:31 -07:00