Commit 27465601 authored by Jiri Olsa's avatar Jiri Olsa Committed by Greg Kroah-Hartman
Browse files

x86/shstk: Make return uprobe work with shadow stack

[ Upstream commit 1713b63a ]

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: default avatarAndrii Nakryiko <andrii@kernel.org>
Acked-by: default avatarRick Edgecombe <rick.p.edgecombe@intel.com>
Reviewed-by: default avatarOleg Nesterov <oleg@redhat.com>
Fixes: 488af8ea ("x86/shstk: Wire in shadow stack interface")
Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
Signed-off-by: default avatarMasami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1c109f23
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment