OpenCloudOS-Kernel/arch/x86
Jiri Olsa 27465601ab x86/shstk: Make return uprobe work with shadow stack
[ Upstream commit 1713b63a07a28a475de94664f783b4cfd2e4fa90 ]

Currently the application with enabled shadow stack will crash
if it sets up return uprobe. The reason is the uretprobe kernel
code changes the user space task's stack, but does not update
shadow stack accordingly.

Adding new functions to update values on shadow stack and using
them in uprobe code to keep shadow stack in sync with uretprobe
changes to user stack.

Link: https://lore.kernel.org/all/20240611112158.40795-2-jolsa@kernel.org/

Acked-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Rick Edgecombe <rick.p.edgecombe@intel.com>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Fixes: 488af8ea71 ("x86/shstk: Wire in shadow stack interface")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-03 08:53:48 +02:00
..
boot x86/boot: Don't add the EFI stub to targets, again 2024-06-21 14:38:37 +02:00
coco x86/coco: Require seeding RNG with RDRAND on CoCo systems 2024-04-10 16:36:03 +02:00
configs - The first, cleanup part of the microcode loader reorg tglx has been 2023-08-28 15:55:20 -07:00
crypto crypto: x86/sha512-avx2 - add missing vzeroupper 2024-06-12 11:11:32 +02:00
entry x86/bhi: Avoid warning in #DB handler due to BHI mitigation 2024-07-18 13:21:27 +02:00
events perf/x86/intel/cstate: Fix Alderlake/Raptorlake/Meteorlake 2024-08-03 08:53:41 +02:00
hyperv x86/hyperv: Use per cpu initial stack for vtl context 2024-03-26 18:20:06 -04:00
ia32
include x86/shstk: Make return uprobe work with shadow stack 2024-08-03 08:53:48 +02:00
kernel x86/shstk: Make return uprobe work with shadow stack 2024-08-03 08:53:48 +02:00
kvm KVM: x86: Always sync PIR to IRR prior to scanning I/O APIC routes 2024-06-27 13:49:11 +02:00
lib x86/uaccess: Fix missed zeroing of ia32 u64 get_user() range checking 2024-06-21 14:38:34 +02:00
math-emu x86/fpu: Include asm/fpu/regset.h 2023-05-18 11:56:18 -07:00
mm mm: fix race between __split_huge_pmd_locked() and GUP-fast 2024-06-16 13:47:40 +02:00
net Revert "bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro()" 2024-07-09 11:44:29 +02:00
pci x86/pci/xen: Fix PCIBIOS_* return code handling 2024-08-03 08:53:21 +02:00
platform x86/platform/iosf_mbi: Convert PCIBIOS_* return codes to errnos 2024-08-03 08:53:21 +02:00
power mm/treewide: replace pud_large() with pud_leaf() 2024-04-10 16:35:46 +02:00
purgatory x86/purgatory: Switch to the position-independent small code model 2024-06-12 11:11:43 +02:00
ras
realmode x86/realmode: Make stack lock work in trampoline_compat() 2023-05-30 14:11:47 +02:00
tools x86/boot: Ignore relocations in .notes sections in walk_relocs() too 2024-06-12 11:11:36 +02:00
um um: Fix the -Wmissing-prototypes warning for get_thread_reg 2024-06-12 11:12:42 +02:00
video Merge drm/drm-next into drm-misc-next 2023-07-24 15:44:47 +02:00
virt/vmx/tdx
xen x86/xen: Convert comma to semicolon 2024-08-03 08:53:33 +02:00
.gitignore
Kbuild
Kconfig cpu: Ignore "mitigations" kernel parameter if CPU_MITIGATIONS=n 2024-06-12 11:11:24 +02:00
Kconfig.assembler x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS 2024-08-03 08:53:21 +02:00
Kconfig.cpu x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6 2024-02-23 09:25:10 +01:00
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-06-12 11:12:46 +02:00
Makefile kbuild: unify vdso_install rules 2024-06-12 11:12:32 +02:00
Makefile.postlink x86/build: Avoid relocation information in final vmlinux 2023-06-14 19:54:40 +02:00
Makefile.um um: Only disable SSE on clang to work around old GCC bugs 2023-04-04 09:57:05 +02:00
Makefile_32.cpu