OpenCloudOS-Kernel/arch
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
..
alpha vgacon: rework screen_info #ifdef checks 2024-06-27 13:49:15 +02:00
arc ARC: [plat-hsdk]: Remove misplaced interrupt-cells property 2024-05-02 16:32:33 +02:00
arm ARM: spitz: fix GPIO assignment for backlight 2024-08-03 08:53:34 +02:00
arm64 arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property 2024-08-03 08:53:34 +02:00
csky csky, hexagon: fix broken sys_sync_file_range 2024-07-05 09:34:02 +02:00
hexagon hexagon: fix fadvise64_64 calling conventions 2024-07-05 09:34:02 +02:00
ia64 vgacon: rework screen_info #ifdef checks 2024-06-27 13:49:15 +02:00
loongarch Revert "bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro()" 2024-07-09 11:44:29 +02:00
m68k m68k: cmpxchg: Fix return value for default case in __arch_xchg() 2024-08-03 08:53:34 +02:00
microblaze microblaze: Remove early printk call from cpuinfo-static.c 2024-06-12 11:12:23 +02:00
mips mips: fix compat_sys_lseek syscall 2024-07-25 09:50:48 +02:00
nios2 mm: Introduce flush_cache_vmap_early() 2024-02-16 19:10:52 +01:00
openrisc openrisc: traps: Don't send signals to kernel mode threads 2024-06-12 11:11:42 +02:00
parisc Revert "bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro()" 2024-07-09 11:44:29 +02:00
powerpc powerpc/configs: Update defconfig with now user-visible CONFIG_FSL_IFC 2024-08-03 08:53:19 +02:00
riscv riscv: stacktrace: fix usage of ftrace_graph_ret_addr() 2024-07-25 09:50:55 +02:00
s390 s390/uv: Don't call folio_wait_writeback() without a folio reference 2024-08-03 08:53:48 +02:00
sh sh: rework sync_file_range ABI 2024-07-05 09:34:02 +02:00
sparc Revert "bpf: Take return from set_memory_rox() into account with bpf_jit_binary_lock_ro()" 2024-07-09 11:44:29 +02:00
um ubd: untagle discard vs write zeroes not support handling 2024-08-03 08:53:20 +02:00
x86 x86/shstk: Make return uprobe work with shadow stack 2024-08-03 08:53:48 +02:00
xtensa xtensa: fix MAKE_PC_FROM_RA second argument 2024-05-17 12:02:32 +02:00
.gitignore
Kconfig Revert "mm: mmap: allow for the maximum number of bits for randomizing mmap_base by default" 2024-06-27 13:49:15 +02:00