diff mbox series

[2/9] arm64: Add comment for stack_info::kr_cur

Message ID 20211117140737.44420-3-mark.rutland@arm.com (mailing list archive)
State New, archived
Headers show
Series arm64: stacktrace: unify unwind code | expand

Commit Message

Mark Rutland Nov. 17, 2021, 2:07 p.m. UTC
We added stack_info::kr_cur in commit:

  cd9bc2c9258816dc ("arm64: Recover kretprobe modified return address in stacktrace")

... but didn't add anything in the corresponding comment block.

For consistency, add a corresponding comment.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Will Deacon <will@kernel.org>
---
 arch/arm64/include/asm/stacktrace.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Mark Brown Nov. 17, 2021, 3:23 p.m. UTC | #1
On Wed, Nov 17, 2021 at 02:07:30PM +0000, Mark Rutland wrote:
> We added stack_info::kr_cur in commit:
> 
>   cd9bc2c9258816dc ("arm64: Recover kretprobe modified return address in stacktrace")
> 
> ... but didn't add anything in the corresponding comment block.

Reviwed-by: Mark Brown <broonie@kernel.org>
Masami Hiramatsu (Google) Nov. 18, 2021, 10:25 p.m. UTC | #2
On Wed, 17 Nov 2021 14:07:30 +0000
Mark Rutland <mark.rutland@arm.com> wrote:

> We added stack_info::kr_cur in commit:
> 
>   cd9bc2c9258816dc ("arm64: Recover kretprobe modified return address in stacktrace")
> 
> ... but didn't add anything in the corresponding comment block.

Thanks for adding the comment!

Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>

Regards,
> 
> For consistency, add a corresponding comment.
> 
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
> Cc: Will Deacon <will@kernel.org>
> ---
>  arch/arm64/include/asm/stacktrace.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/stacktrace.h b/arch/arm64/include/asm/stacktrace.h
> index 6564a01cc085..686731b9df05 100644
> --- a/arch/arm64/include/asm/stacktrace.h
> +++ b/arch/arm64/include/asm/stacktrace.h
> @@ -47,6 +47,10 @@ struct stack_info {
>   * @prev_type:   The type of stack this frame record was on, or a synthetic
>   *               value of STACK_TYPE_UNKNOWN. This is used to detect a
>   *               transition from one stack to another.
> + *
> + * @kr_cur:      When KRETPOLINES is selected, holds the kretprobe instance
> + *               associated with the most recently encountered replacement lr
> + *               value.
>   */
>  struct stackframe {
>  	unsigned long fp;
> -- 
> 2.11.0
>
Mark Rutland Nov. 23, 2021, 11:47 a.m. UTC | #3
On Wed, Nov 17, 2021 at 02:07:30PM +0000, Mark Rutland wrote:
> We added stack_info::kr_cur in commit:
> 
>   cd9bc2c9258816dc ("arm64: Recover kretprobe modified return address in stacktrace")
> 
> ... but didn't add anything in the corresponding comment block.
> 
> For consistency, add a corresponding comment.
> 
> Signed-off-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
> Cc: Will Deacon <will@kernel.org>
> ---
>  arch/arm64/include/asm/stacktrace.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/include/asm/stacktrace.h b/arch/arm64/include/asm/stacktrace.h
> index 6564a01cc085..686731b9df05 100644
> --- a/arch/arm64/include/asm/stacktrace.h
> +++ b/arch/arm64/include/asm/stacktrace.h
> @@ -47,6 +47,10 @@ struct stack_info {
>   * @prev_type:   The type of stack this frame record was on, or a synthetic
>   *               value of STACK_TYPE_UNKNOWN. This is used to detect a
>   *               transition from one stack to another.
> + *
> + * @kr_cur:      When KRETPOLINES is selected, holds the kretprobe instance

As peter pointed out on IRC, this should be KRETPROBES, not KRETPOLINES
(which does not exist as a Kconfig symbol).

I'll fix that for v2.

Mark.

> + *               associated with the most recently encountered replacement lr
> + *               value.
>   */
>  struct stackframe {
>  	unsigned long fp;
> -- 
> 2.11.0
>
diff mbox series

Patch

diff --git a/arch/arm64/include/asm/stacktrace.h b/arch/arm64/include/asm/stacktrace.h
index 6564a01cc085..686731b9df05 100644
--- a/arch/arm64/include/asm/stacktrace.h
+++ b/arch/arm64/include/asm/stacktrace.h
@@ -47,6 +47,10 @@  struct stack_info {
  * @prev_type:   The type of stack this frame record was on, or a synthetic
  *               value of STACK_TYPE_UNKNOWN. This is used to detect a
  *               transition from one stack to another.
+ *
+ * @kr_cur:      When KRETPOLINES is selected, holds the kretprobe instance
+ *               associated with the most recently encountered replacement lr
+ *               value.
  */
 struct stackframe {
 	unsigned long fp;