Skip to content

Commit 258c3d6

Browse files
committed
arm64: entry-ftrace.S: Update comment to indicate that x18 is live
The Shadow Call Stack pointer is held in x18, so update the ftrace entry comment to indicate that it cannot be safely clobbered. Reported-by: Mark Rutland <[email protected]> Signed-off-by: Will Deacon <[email protected]>
1 parent 871e100 commit 258c3d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/arm64/kernel/entry-ftrace.S

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
*
2424
* ... where <entry> is either ftrace_caller or ftrace_regs_caller.
2525
*
26-
* Each instrumented function follows the AAPCS, so here x0-x8 and x19-x30 are
27-
* live, and x9-x18 are safe to clobber.
26+
* Each instrumented function follows the AAPCS, so here x0-x8 and x18-x30 are
27+
* live (x18 holds the Shadow Call Stack pointer), and x9-x17 are safe to
28+
* clobber.
2829
*
2930
* We save the callsite's context into a pt_regs before invoking any ftrace
3031
* callbacks. So that we can get a sensible backtrace, we create a stack record

0 commit comments

Comments
 (0)