android_kernel_samsung_sm8650/arch/arm64
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
..
boot arm64: dts: mediatek: mt8192: Fix CPUs capacity-dmips-mhz 2023-07-19 16:21:31 +02:00
configs This update includes the following changes: 2022-10-10 13:04:25 -07:00
crypto crypto: arm64/aes-neonbs - fix crash with CFI enabled 2023-05-11 23:03:02 +09:00
hyperv hyperv: simplify and rename generate_guest_id 2022-09-28 13:36:56 +00:00
include arm64: sme: Use STR P to clear FFR context field in streaming SVE mode 2023-07-19 16:21:45 +02:00
kernel arm64/fpsimd: Ensure SME storage is allocated after SVE VL changes 2023-07-27 08:50:27 +02:00
kvm KVM: arm64: Restore GICv2-on-GICv3 functionality 2023-06-28 11:12:40 +02:00
lib Networking changes for 6.0. 2022-08-03 16:29:08 -07:00
mm arm64/mm: Convert to using lock_mm_and_find_vma() 2023-07-01 13:16:24 +02:00
net bpf, arm64: Fix BTI type used for freplace attached functions 2023-07-27 08:50:44 +02:00
tools arm64/sysreg: Fix typo in SCTR_EL1.SPINTMASK 2022-10-07 14:30:11 +01:00
xen
Kbuild
Kconfig arm64/mm: Convert to using lock_mm_and_find_vma() 2023-07-01 13:16:24 +02:00
Kconfig.debug
Kconfig.platforms ARM: SoC code changes for 6.1 2022-10-06 11:22:25 -07:00
Makefile Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00