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

Mark Brown broonie at kernel.org
Wed Jan 27 12:11:43 EST 2021


On Wed, Jan 27, 2021 at 04:40:56PM +0000, Mark Rutland wrote:
> On Wed, Jan 27, 2021 at 08:02:41AM -0600, Madhavan T. Venkataraman wrote:

> > My question is - for live patching, we would need to look at the task stack
> > as well, right?

> Ideally, we would be able to do this, but currently we cannot safely do
> so. IIUC this means that live patching is still possible, but is
> potentially much slower to apply updates.

That's my understanding, we should just retry until we find the stack to
be reliable.

> > May be, we need to pass a flag to the unwinder to check the
> > task stack in addition to the active task?

> The logic to unwind across stack and exception boundaries already
> exists, but to make this reliable we will need more invasive work,
> potentially changing trampolines and/or adding metadata for these,
> perhaps requiring objtool and/or toolchain changes.

This also requires additional work for shadow call stacks if we end up
using them since we always use a separate shadow call stack for
interrupts rather than nesting on the task shadow call stack, with the
code I've got locally we should just detect that the shadow and task
stacks aren't in sync and report that we can't generate a reliable
stacktrace.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210127/61c78951/attachment-0001.sig>


More information about the linux-arm-kernel mailing list