2022-07-26 07:46:40

by Kalesh Singh

[permalink] [raw]
Subject: [PATCH v6 06/17] arm64: stacktrace: Add description of stacktrace/common.h

Add brief description on how to use stacktrace/common.h to implement
a stack unwinder.

Signed-off-by: Kalesh Singh <[email protected]>
Reviewed-by: Fuad Tabba <[email protected]>
---

Changes in v6:
- Add Fuad’s Reviewed-by tag

Changes in v5:
- Add short description of each required function, per Fuad and Marc

arch/arm64/include/asm/stacktrace/common.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/arch/arm64/include/asm/stacktrace/common.h b/arch/arm64/include/asm/stacktrace/common.h
index 4b632141d91c..45474b383630 100644
--- a/arch/arm64/include/asm/stacktrace/common.h
+++ b/arch/arm64/include/asm/stacktrace/common.h
@@ -2,6 +2,21 @@
/*
* Common arm64 stack unwinder code.
*
+ * To implement a new arm64 stack unwinder:
+ * 1) Include this header
+ *
+ * 2) Provide implementations for the following functions:
+ * on_overflow_stack(): Returns true if SP is on the overflow
+ * stack.
+ * on_accessible_stack(): Returns true is SP is on any accessible
+ * stack.
+ * unwind_next(): Performs validation checks on the frame
+ * pointer, and transitions unwind_state
+ * to the next frame.
+ *
+ * See: arch/arm64/include/asm/stacktrace.h for reference
+ * implementations.
+ *
* Copyright (C) 2012 ARM Ltd.
*/
#ifndef __ASM_STACKTRACE_COMMON_H
--
2.37.1.359.gd136c6c3e2-goog


2022-07-26 15:07:49

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v6 06/17] arm64: stacktrace: Add description of stacktrace/common.h

On Tue, Jul 26, 2022 at 12:37:39AM -0700, Kalesh Singh wrote:

> Add brief description on how to use stacktrace/common.h to implement
> a stack unwinder.

Reviewed-by: Mark Brown <[email protected]>


Attachments:
(No filename) (206.00 B)
signature.asc (499.00 B)
Download all attachments