summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Deacon <will@kernel.org>2020-05-18 14:01:01 +0100
committerWill Deacon <will@kernel.org>2020-05-18 17:47:50 +0100
commit258c3d628fe9e7512d98a0000709773457c66ef1 (patch)
tree66eddaa2ffbf37ff1201948278d85154eaff6f39
parent871e100e432c651c9c46fb9c3184b4577e0de3ae (diff)
downloadlinux-258c3d628fe9e7512d98a0000709773457c66ef1.tar.bz2
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 <mark.rutland@arm.com> Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r--arch/arm64/kernel/entry-ftrace.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm64/kernel/entry-ftrace.S b/arch/arm64/kernel/entry-ftrace.S
index 833d48c9acb5..a338f40e64d3 100644
--- a/arch/arm64/kernel/entry-ftrace.S
+++ b/arch/arm64/kernel/entry-ftrace.S
@@ -23,8 +23,9 @@
*
* ... where <entry> is either ftrace_caller or ftrace_regs_caller.
*
- * Each instrumented function follows the AAPCS, so here x0-x8 and x19-x30 are
- * live, and x9-x18 are safe to clobber.
+ * Each instrumented function follows the AAPCS, so here x0-x8 and x18-x30 are
+ * live (x18 holds the Shadow Call Stack pointer), and x9-x17 are safe to
+ * clobber.
*
* We save the callsite's context into a pt_regs before invoking any ftrace
* callbacks. So that we can get a sensible backtrace, we create a stack record