Re: [RFC PATCH 7/7] objtool: Make unwind_hints available for all architectures

From: Julien Thierry
Date: Thu Jun 11 2020 - 03:20:42 EST


Hi Miroslav,

On 6/10/20 2:20 PM, Miroslav Benes wrote:
Hi Julien,

On Mon, 8 Jun 2020, Julien Thierry wrote:

Unwind hints are useful to give some information about the call frame
or stack states in non-standard code.

Despite unwind hints being used in arch-independent code, the
unwind_hint structure type itself is define in x86 kernel headers.

This is because what an unwind hint will describe is very architecture
specific, both regarding the state and the affected registers.

To get to share this concept, expose the unwind_hint structure across
architecutres. However, the hint types remain defined by the
architecture code. Objtool then needs it's arch specific code to
"decode" the unwind hint into a cfi_state.

I think it would be nice to split the patch. Something like.

1. current include/linux/frame.h mixes assembly and non-assembly
definitions, so introduce ASSEMBLY ifdef first seems like a good idea to
me.

2. move the relevant definitions to frame.h and add the file to
sync-check

3. the rest of the patch

Would it make sense?


Yes, I think your approach will make it simpler to review. I wasn't sure how to split it but I like your suggestion, thank you for it.

I'll probably post the split patch separately if the rest of the series gets picked.

Cheers,

--
Julien Thierry