[RFC PATCH v2 3/8] arm64: Terminate the stack trace at TASK_FRAME and EL0_FRAME
Mark Brown
broonie at kernel.org
Thu Mar 18 18:26:07 GMT 2021
On Mon, Mar 15, 2021 at 11:57:55AM -0500, madvenka at linux.microsoft.com wrote:
> + /* Terminal record, nothing to unwind */
> + if (fp == (unsigned long) regs->stackframe) {
> + if (regs->frame_type == TASK_FRAME ||
> + regs->frame_type == EL0_FRAME)
> + return -ENOENT;
> return -EINVAL;
> + }
This is conflating the reliable stacktrace checks (which your series
will later flag up with frame->reliable) with verifying that we found
the bottom of the stack by looking for this terminal stack frame record.
For the purposes of determining if the unwinder got to the bottom of the
stack we don't care what stack type we're looking at, we just care if it
managed to walk to this defined final record.
At the minute nothing except reliable stack trace has any intention of
checking the specific return code but it's clearer to be consistent.
-------------- 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/20210318/c683f2ad/attachment.sig>
More information about the linux-arm-kernel
mailing list