[RFC PATCH 3/3] arm64: stacktrace: Implement reliable stacktrace

Miroslav Benes mbenes at suse.cz
Fri Oct 16 06:13:14 EDT 2020


On Thu, 15 Oct 2020, Mark Brown wrote:

> On Thu, Oct 15, 2020 at 03:33:44PM +0200, Miroslav Benes wrote:
> 
> > I think it would be nice to check if frame.pc is a valid text address here
> > before it is consumed next.
> 
> I'm wondering if it might be better to do have the generic code do this
> in consume_entry() or something, it doesn't seem arch specific?

Maybe. There is currently no special consume_entry() for the reliable 
interface, but I think there is no reason not to introduce one.

On the other hand, both x86 and s390x currently solve it in 
unwind_get_return_address() which is a part of the unwinding 
infrastructure and it would not fit well with the above.

powerpc solves it independently in __save_stack_trace_tsk_reliable() loop, 
which does not use consume_entry() and new stuff at all.

So I don't know if it is worth it.

Miroslav



More information about the linux-arm-kernel mailing list