arm64: entry-ftrace.S: Update comment to indicate that x18 is live
authorWill Deacon <will@kernel.org>
Mon, 18 May 2020 13:01:01 +0000 (14:01 +0100)
committerWill Deacon <will@kernel.org>
Mon, 18 May 2020 16:47:50 +0000 (17:47 +0100)
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>
arch/arm64/kernel/entry-ftrace.S

index 833d48c..a338f40 100644 (file)
@@ -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