[lkml]   [2021]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/9] arm64: stacktrace: unify unwind code
For historical reasons arm64 has a number of open-coded unwind functions. We'd
like to unify these to reduce the amount of unwind code we have to expose, and
to make it easier for subsequent patches to rework the unwind code for

These patches unify the various unwinders using arch_stack_walk(). So that we
can use arch_stack_walk() without having to expose /proc/${PID}/stack, I've
picked Peter's patch decoupling ARCH_STACKWALK from STACKTRACE, which was
previously posted at:

As the direction of travel seems to be to not unify the get_wchan()
implementations, Peter suggested I pick the patch for now. This is the only
patch in the series touching other architectures.

The bulk of the series was perviously posted in Madhavan's series adding
reliability checks to the unwinder:

I have made some minor tweaks and updated each commit message to explain why
the transformation is safe. Largely the changes should have no functional
effect, but in a couple of cases there is a (benign and/or desirable)
functional change, which is described in the relevant commit message.

To make it possible for get_wchan() to use arch_stack_walk(), and to correct
the expected behaviour of stack_trace_consume_entry_nosched() and
stack_trace_save_tsk(), we need to mark arm64's __switch_to() as __sched, for
which I've added a preparatory patch.

Currently this is based on the arm64 for-next/fixes branch, as the series
depends on a patch making arm64 using HAVE_FUNCTION_GRAPH_RET_ADDR_PTR:

I expect that this will be part of v5.16-rc2, and intend to rebase the series
once that's tagged.


Madhavan T. Venkataraman (5):
arm64: Make perf_callchain_kernel() use arch_stack_walk()
arm64: Make __get_wchan() use arch_stack_walk()
arm64: Make return_address() use arch_stack_walk()
arm64: Make profile_pc() use arch_stack_walk()
arm64: Make dump_backtrace() use arch_stack_walk()

Mark Rutland (3):
arm64: Add comment for stack_info::kr_cur
arm64: Mark __switch_to() as __sched
arm64: Make some stacktrace functions private

Peter Zijlstra (1):
arch: Make ARCH_STACKWALK independent of STACKTRACE

arch/arm64/include/asm/stacktrace.h | 10 +++----
arch/arm64/kernel/perf_callchain.c | 13 ++------
arch/arm64/kernel/process.c | 44 ++++++++++++++++-----------
arch/arm64/kernel/return_address.c | 6 +---
arch/arm64/kernel/stacktrace.c | 60 ++++++++-----------------------------
arch/arm64/kernel/time.c | 23 +++++++-------
arch/powerpc/kernel/Makefile | 3 +-
arch/riscv/kernel/stacktrace.c | 4 ---
arch/s390/kernel/Makefile | 3 +-
arch/x86/kernel/Makefile | 2 +-
include/linux/stacktrace.h | 35 +++++++++++-----------
11 files changed, 79 insertions(+), 124 deletions(-)


 \ /
  Last update: 2021-11-17 15:08    [W:0.126 / U:22.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site