2020-09-14 15:43:18

by Mark Brown

[permalink] [raw]
Subject: [PATCH v3 0/3] arm64: Convert to ARCH_STACKWALK

This series updates the arm64 stacktrace code to use the newer and much
simpler arch_stack_walk() interface, the main benefit being a single
entry point to the arch code with no need for the arch code to worry
about skipping frames. Along the way I noticed that the reliable
parameter to the arch_stack_walk() callback appears to be redundant
so there's also a patch here removing that from the existing code to
simplify the interface.

This is preparatory work for implementing reliable stack trace for
arm64.

v3:
- Rebase onto v5.9-rc3.
- Fix handling of task == current.
- Flip the sense of the walk_stackframe() callback.
v2:
- Rebase onto v5.9-rc1.

Mark Brown (3):
stacktrace: Remove reliable argument from arch_stack_walk() callback
arm64: stacktrace: Make stack walk callback consistent with generic
code
arm64: stacktrace: Convert to ARCH_STACKWALK

arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/stacktrace.h | 2 +-
arch/arm64/kernel/perf_callchain.c | 6 +--
arch/arm64/kernel/return_address.c | 8 +--
arch/arm64/kernel/stacktrace.c | 84 +++++------------------------
arch/s390/kernel/stacktrace.c | 4 +-
arch/x86/kernel/stacktrace.c | 10 ++--
include/linux/stacktrace.h | 5 +-
kernel/stacktrace.c | 8 ++-
9 files changed, 32 insertions(+), 96 deletions(-)


base-commit: f75aef392f869018f78cfedf3c320a6b3fcfda6b
--
2.20.1


2020-09-16 20:56:49

by Miroslav Benes

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] arm64: Convert to ARCH_STACKWALK

On Mon, 14 Sep 2020, Mark Brown wrote:

> This series updates the arm64 stacktrace code to use the newer and much
> simpler arch_stack_walk() interface, the main benefit being a single
> entry point to the arch code with no need for the arch code to worry
> about skipping frames. Along the way I noticed that the reliable
> parameter to the arch_stack_walk() callback appears to be redundant
> so there's also a patch here removing that from the existing code to
> simplify the interface.
>
> This is preparatory work for implementing reliable stack trace for
> arm64.
>
> v3:
> - Rebase onto v5.9-rc3.
> - Fix handling of task == current.
> - Flip the sense of the walk_stackframe() callback.
> v2:
> - Rebase onto v5.9-rc1.
>
> Mark Brown (3):
> stacktrace: Remove reliable argument from arch_stack_walk() callback
> arm64: stacktrace: Make stack walk callback consistent with generic
> code
> arm64: stacktrace: Convert to ARCH_STACKWALK

The patches look good to me.

Reviewed-by: Miroslav Benes <[email protected]>

M

2020-09-18 16:19:06

by Will Deacon

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] arm64: Convert to ARCH_STACKWALK

On Mon, 14 Sep 2020 16:34:06 +0100, Mark Brown wrote:
> This series updates the arm64 stacktrace code to use the newer and much
> simpler arch_stack_walk() interface, the main benefit being a single
> entry point to the arch code with no need for the arch code to worry
> about skipping frames. Along the way I noticed that the reliable
> parameter to the arch_stack_walk() callback appears to be redundant
> so there's also a patch here removing that from the existing code to
> simplify the interface.
>
> [...]

Applied to arm64 (for-next/stacktrace), thanks!

[1/3] stacktrace: Remove reliable argument from arch_stack_walk() callback
https://git.kernel.org/arm64/c/264c03a245de
[2/3] arm64: stacktrace: Make stack walk callback consistent with generic code
https://git.kernel.org/arm64/c/baa2cd417053
[3/3] arm64: stacktrace: Convert to ARCH_STACKWALK
https://git.kernel.org/arm64/c/5fc57df2f6fd

Cheers,
--
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev