android_kernel_samsung_sm8650/arch
Alexander Duyck bb6ae775ff bpf, arm64: Fix BTI type used for freplace attached functions
[ Upstream commit a3f25d614bc73b45e8f02adc6769876dfd16ca84 ]

When running an freplace attached bpf program on an arm64 system w were
seeing the following issue:
  Unhandled 64-bit el1h sync exception on CPU47, ESR 0x0000000036000003 -- BTI

After a bit of work to track it down I determined that what appeared to be
happening is that the 'bti c' at the start of the program was somehow being
reached after a 'br' instruction. Further digging pointed me toward the
fact that the function was attached via freplace. This in turn led me to
build_plt which I believe is invoking the long jump which is triggering
this error.

To resolve it we can replace the 'bti c' with 'bti jc' and add a comment
explaining why this has to be modified as such.

Fixes: b2ad54e153 ("bpf, arm64: Implement bpf_arch_text_poke() for arm64")
Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
Acked-by: Xu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/r/168926677665.316237.9953845318337455525.stgit@ahduyck-xeon-server.home.arpa
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-07-27 08:50:44 +02:00
..
alpha mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
arc ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard 2023-07-19 16:21:42 +02:00
arm ARM: orion5x: fix d2net gpio initialization 2023-07-19 16:22:14 +02:00
arm64 bpf, arm64: Fix BTI type used for freplace attached functions 2023-07-27 08:50:44 +02:00
csky csky: fix up lock_mm_and_find_vma() conversion 2023-07-01 13:16:27 +02:00
hexagon mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
ia64 mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
loongarch mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
m68k mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
microblaze mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
mips MIPS: dec: prom: Address -Warray-bounds warning 2023-07-27 08:50:33 +02:00
nios2 mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
openrisc mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
parisc parisc: fix expand_stack() conversion 2023-07-01 13:16:26 +02:00
powerpc powerpc/64s: Fix native_hpte_remove() to be irq-safe 2023-07-23 13:49:33 +02:00
riscv riscv: mm: fix truncation warning on RV32 2023-07-23 13:49:26 +02:00
s390 s390/decompressor: fix misaligned symbol build error 2023-07-23 13:49:43 +02:00
sh sh: hd64461: Handle virq offset for offchip IRQ base and HD64461 IRQ 2023-07-19 16:22:18 +02:00
sparc sparc32: fix lock_mm_and_find_vma() conversion 2023-07-01 13:16:26 +02:00
um um: Use HOST_DIR for mrproper 2023-07-19 16:22:10 +02:00
x86 x86/cpu/amd: Add a Zenbleed fix 2023-07-24 18:55:35 +02:00
xtensa xtensa: ISS: fix call to split_if_spec 2023-07-23 13:49:45 +02:00
.gitignore
Kconfig ftrace: Allow WITH_ARGS flavour of graph tracer with shadow call stack 2022-12-31 13:32:45 +01:00