[PATCH 6/6] uprobes/x86: Add SLS mitigation to the trampolines

Peter Zijlstra posted 6 patches 1 month, 1 week ago
[PATCH 6/6] uprobes/x86: Add SLS mitigation to the trampolines
Posted by Peter Zijlstra 1 month, 1 week ago
It is trivial; no reason not to.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
 arch/x86/kernel/uprobes.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -336,6 +336,7 @@ asm (
 	 * call ret.
 	 */
 	"ret\n"
+	"int3\n"
 	".global uretprobe_trampoline_end\n"
 	"uretprobe_trampoline_end:\n"
 	".popsection\n"
@@ -891,6 +892,7 @@ asm (
 	"pop %r11\n"
 	"pop %rcx\n"
 	"ret\n"
+	"int3\n"
 	".balign " __stringify(PAGE_SIZE) "\n"
 	".popsection\n"
 );
Re: [PATCH 6/6] uprobes/x86: Add SLS mitigation to the trampolines
Posted by Masami Hiramatsu (Google) 3 weeks, 3 days ago
On Thu, 21 Aug 2025 14:28:28 +0200
Peter Zijlstra <peterz@infradead.org> wrote:

> It is trivial; no reason not to.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>

Looks good to me :)

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

> ---
>  arch/x86/kernel/uprobes.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- a/arch/x86/kernel/uprobes.c
> +++ b/arch/x86/kernel/uprobes.c
> @@ -336,6 +336,7 @@ asm (
>  	 * call ret.
>  	 */
>  	"ret\n"
> +	"int3\n"
>  	".global uretprobe_trampoline_end\n"
>  	"uretprobe_trampoline_end:\n"
>  	".popsection\n"
> @@ -891,6 +892,7 @@ asm (
>  	"pop %r11\n"
>  	"pop %rcx\n"
>  	"ret\n"
> +	"int3\n"
>  	".balign " __stringify(PAGE_SIZE) "\n"
>  	".popsection\n"
>  );
> 
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>
[tip: perf/core] uprobes/x86: Add SLS mitigation to the trampolines
Posted by tip-bot2 for Peter Zijlstra 1 month, 1 week ago
The following commit has been merged into the perf/core branch of tip:

Commit-ID:     354492a0e1bc4a408e26ebe14166bd1064182439
Gitweb:        https://git.kernel.org/tip/354492a0e1bc4a408e26ebe14166bd1064182439
Author:        Peter Zijlstra <peterz@infradead.org>
AuthorDate:    Wed, 20 Aug 2025 19:49:56 +02:00
Committer:     Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 21 Aug 2025 20:09:22 +02:00

uprobes/x86: Add SLS mitigation to the trampolines

It is trivial; no reason not to.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20250821123657.277506098@infradead.org
---
 arch/x86/kernel/uprobes.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index 643027e..0a8c0a4 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -336,6 +336,7 @@ asm (
 	 * call ret.
 	 */
 	"ret\n"
+	"int3\n"
 	".global uretprobe_trampoline_end\n"
 	"uretprobe_trampoline_end:\n"
 	".popsection\n"
@@ -891,6 +892,7 @@ asm (
 	"pop %r11\n"
 	"pop %rcx\n"
 	"ret\n"
+	"int3\n"
 	".balign " __stringify(PAGE_SIZE) "\n"
 	".popsection\n"
 );