[RFC PATCH 0/3] arm64: Implement reliable stack trace

Madhavan T. Venkataraman madvenka at linux.microsoft.com
Wed Jan 27 12:24:43 EST 2021



On 1/27/21 8:02 AM, Madhavan T. Venkataraman wrote:
> 
> 
> On 10/12/20 12:26 PM, Mark Brown wrote:
>> This patch series aims to implement reliable stacktrace for arm64. 
>> Reliable stacktrace exists mainly to support live patching, it provides
>> a version of stacktrace that checks for consistency problems in the
>> traces it generates and provides an error code to callers indicating if
>> any problems were detected.      
>>
>> This is a first cut of support for arm64, I've not really even started
>> testing it meaningfully at this point.  The main thing I'm looking for
>> here is that I'm not sure if there are any more potential indicators of
>> unrelabile stacks that I'm missing tests for or anything about the
>> interfaces that I've misunderstood.
>>
>> There's more work that can be done here, mainly that we could sync our
>> unwinder more with what's done on S/390 and x86 which should if nothing
>> else help with keeping up to date with generic changes, but this should 
>> be what's needed to allow reliable stack trace.
>>
>> Mark Brown (2):
>>   arm64: stacktrace: Report when we reach the end of the stack
>>   arm64: stacktrace: Implement reliable stacktrace
>>
>> Mark Rutland (1):
>>   arm64: remove EL0 exception frame record
>>
>>  arch/arm64/Kconfig             |  1 +
>>  arch/arm64/kernel/entry.S      | 10 +++----
>>  arch/arm64/kernel/stacktrace.c | 55 ++++++++++++++++++++++++++++------
>>  3 files changed, 52 insertions(+), 14 deletions(-)
>>
> 
> This is mostly a question to improve my understanding of the current ARM64
> unwinder.
> 
> Currently, ARM64 defines different stack types - task stack, IRQ stack, etc.
> When it unwinds, it appears to unwind only the currently active stack.
> Specifically, if an interrupt has happened and the IRQ stack is the one that
> is active, only the IRQ stack is unwound. The task stack is not. Is this
> accurate?
> 
> My question is - for live patching, we would need to look at the task stack
> as well, right? May be, we need to pass a flag to the unwinder to check the
> task stack in addition to the active task?

Typo - I meant to say "active stack" at the end of the question.
Sorry about that.

Madhavan



More information about the linux-arm-kernel mailing list