linux/arch/loongarch
Christophe Leroy 044da7ae7a bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro()
[ Upstream commit e60adf5132 ]

set_memory_rox() can fail, leaving memory unprotected.

Check return and bail out when bpf_jit_binary_lock_ro() returns
an error.

Link: https://github.com/KSPP/linux/issues/7
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: linux-hardening@vger.kernel.org <linux-hardening@vger.kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Puranjay Mohan <puranjay12@gmail.com>
Reviewed-by: Ilya Leoshkevich <iii@linux.ibm.com>  # s390x
Acked-by: Tiezhu Yang <yangtiezhu@loongson.cn>  # LoongArch
Reviewed-by: Johan Almbladh <johan.almbladh@anyfinetworks.com> # MIPS Part
Message-ID: <036b6393f23a2032ce75a1c92220b2afcb798d5d.1709850515.git.christophe.leroy@csgroup.eu>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 09:37:57 +02:00
..
boot LoongArch: Update dts for Loongson-2K2000 to support GMAC/GNET 2024-04-10 21:08:51 +08:00
configs LoongArch changes for v6.8 2024-01-19 13:30:49 -08:00
crypto LoongArch/crypto: Clean up useless assignment operations 2024-03-19 15:50:34 +08:00
include LoongArch: Trigger user-space watchpoints correctly 2024-06-27 13:52:27 +02:00
kernel LoongArch: Fix multiple hardware watchpoint issues 2024-06-27 13:52:27 +02:00
kvm LoongArch changes for v6.9 2024-03-22 10:22:45 -07:00
lib LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
mm LoongArch: Fix access error when read fault on a write-only VMA 2024-04-24 12:36:07 +08:00
net bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro() 2024-07-05 09:37:57 +02:00
pci LoongArch: Add FDT booting support from efi system table 2022-12-14 08:41:53 +08:00
power LoongArch: Export some arch-specific pm interfaces 2023-06-29 20:58:44 +08:00
vdso LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
Kbuild LoongArch: Allow device trees be built into the kernel 2024-01-17 12:43:00 +08:00
Kconfig LoongArch: Only allow OBJTOOL & ORC unwinder if toolchain supports -mthin-add-sub 2024-06-27 13:52:26 +02:00
Kconfig.debug LoongArch: Only allow OBJTOOL & ORC unwinder if toolchain supports -mthin-add-sub 2024-06-27 13:52:26 +02:00
Makefile LoongArch changes for v6.9 2024-03-22 10:22:45 -07:00