lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 15 Oct 2021 21:51:29 +0900
From:   Masami Hiramatsu <>
To:     Steven Rostedt <>
Cc:     "Naveen N . Rao" <>,
        Ananth N Mavinakayanahalli <>,
        Ingo Molnar <>,,, Sven Schnelle <>,
        Catalin Marinas <>,
        Will Deacon <>,
        Russell King <>,
        Nathan Chancellor <>,
        Nick Desaulniers <>,
Subject: [PATCH 05/10] arm64: kprobes: Make a frame pointer on __kretprobe_trampoline

Make a frame pointer (make the x29 register points the
address of pt_regs->regs[29]) on __kretprobe_trampoline.

This frame pointer will be used by the stacktracer when it is
called from the kretprobe handlers. In this case, the stack
tracer will unwind stack to trampoline_probe_handler() and
find the next frame pointer in the stack frame of the

Signed-off-by: Masami Hiramatsu <>
Acked-by: Will Deacon <>
 arch/arm64/kernel/probes/kprobes_trampoline.S |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/kernel/probes/kprobes_trampoline.S b/arch/arm64/kernel/probes/kprobes_trampoline.S
index 520ee8711db1..9a6499bed58b 100644
--- a/arch/arm64/kernel/probes/kprobes_trampoline.S
+++ b/arch/arm64/kernel/probes/kprobes_trampoline.S
@@ -66,6 +66,9 @@ SYM_CODE_START(__kretprobe_trampoline)
+	/* Setup a frame pointer. */
+	add x29, sp, #S_FP
 	mov x0, sp
 	bl trampoline_probe_handler
@@ -74,6 +77,7 @@ SYM_CODE_START(__kretprobe_trampoline)
 	mov lr, x0
+	/* The frame pointer (x29) is restored with other registers. */
 	add sp, sp, #PT_REGS_SIZE

Powered by blists - more mailing lists