[RFC PATCH 3/3] objtool/mcount: Add powerpc specific functions

Naveen N. Rao naveen.n.rao at linux.vnet.ibm.com
Thu Mar 31 05:40:20 AEDT 2022


Christophe Leroy wrote:
> 
> 
> Le 29/03/2022 à 14:01, Michael Ellerman a écrit :
>> Josh Poimboeuf <jpoimboe at redhat.com> writes:
>>> On Sun, Mar 27, 2022 at 09:09:20AM +0000, Christophe Leroy wrote:
>>>> What are current works in progress on objtool ? Should I wait Josh's
>>>> changes before starting looking at all this ? Should I wait for anything
>>>> else ?
>>>
>>> I'm not making any major changes to the code, just shuffling things
>>> around to make the interface more modular.  I hope to have something
>>> soon (this week).  Peter recently added a big feature (Intel IBT) which
>>> is already in -next.
>>>
>>> Contributions are welcome, with the understanding that you'll help
>>> maintain it ;-)
>>>
>>> Some years ago Kamalesh Babulal had a prototype of objtool for ppc64le
>>> which did the full stack validation.  I'm not sure what ever became of
>>> that.
>> 
>>  From memory he was starting to clean the patches up in late 2019, but I
>> guess that probably got derailed by COVID. AFAIK he never posted
>> anything. Maybe someone at IBM has a copy internally (Naveen?).

Kamalesh had a WIP series to enable stack validation on powerpc. From 
what I recall, he was waiting on and/or working with the arm64 folks 
around some of the common changes needed in objtool.

>> 
>>> FWIW, there have been some objtool patches for arm64 stack validation,
>>> but the arm64 maintainers have been hesitant to get on board with
>>> objtool, as it brings a certain maintenance burden.  Especially for the
>>> full stack validation and ORC unwinder.  But if you only want inline
>>> static calls and/or mcount then it'd probably be much easier to
>>> maintain.
>> 
>> I would like to have the stack validation, but I am also worried about
>> the maintenance burden.
>> 
>> I guess we start with mcount, which looks pretty minimal judging by this
>> series, and see how we go from there.
>> 
> 
> I'm not sure mcount is really needed as we have recordmcount, but at 
> least it is an easy one to start with and as we have recordmount we can 
> easily compare the results and check it works as expected.

On the contrary, I think support for mcount in objtool is something we 
want to get going soon (hopefully, in time for v5.19) given the issues 
we are seeing with recordmcount:
- https://github.com/linuxppc/issues/issues/388
- https://lore.kernel.org/all/20220211014313.1790140-1-aik@ozlabs.ru/


- Naveen



More information about the Linuxppc-dev mailing list