]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86/uprobes: Keep shadow stack in sync for emulated CALLs
authorDavid Windsor <dwindsor@gmail.com>
Tue, 30 Jun 2026 00:13:33 +0000 (20:13 -0400)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 2 Jul 2026 11:21:49 +0000 (13:21 +0200)
commitabf08854d224085e2ebb3ba660e7995909f47d6a
treef48461ec6a6eae8d75f739a4689cefb4200ce24b
parent037a3c43edfb597665dd34457cd22b14692f2ba3
x86/uprobes: Keep shadow stack in sync for emulated CALLs

Uprobe CALL emulation updates the normal user stack, but not the CET user
shadow stack. The subsequent RET then sees a stale shadow stack entry and
raises #CP.

Update the relative CALL emulation and XOL CALL fixup paths to keep the
shadow stack in sync.

Fixes: 488af8ea7131 ("x86/shstk: Wire in shadow stack interface")
Signed-off-by: David Windsor <dwindsor@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Jiri Olsa <jolsa@kernel.org>
Link: https://patch.msgid.link/8b5b1c7407b98f31664ad7b6a6faf20d2d4a6cad.1782777969.git.dwindsor@gmail.com
arch/x86/kernel/uprobes.c