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

Madhavan T. Venkataraman madvenka at linux.microsoft.com
Thu Feb 4 21:36:01 EST 2021

Hi Mark,

Could you please answer the two questions below? You are the expert.
Help me understand the exact problems. Even if the proposal is not
considered, I want to understand what is wrong with it.

On 2/3/21 1:03 PM, Madhavan T. Venkataraman wrote:
> On 2/3/21 10:53 AM, Mark Rutland wrote:

>> The epilog you propose is also unsound in the face of asynchronous
>> exceptions, so I suspect you haven't thought as hard about this as you
>> need to.

Can you elaborate? I understand that an exception can happen right in the
middle of the prolog or epilog. What extra problem is caused by the changed
prolog and epilog?

>> Even if the compiler uses a different prologue/epilogue sequence, we
>> still need to verify that the rest of the function does nothing to
>> undermine that.

The epilog corrects the frame pointer even if it is modified by the
function. It also restores the stack pointer correctly even if the
function does not.

What else can go wrong?

Thanks in advance for the info.


More information about the linux-arm-kernel mailing list