[PATCH v2 6/6] powerpc/64: Add tests for out-of-line static calls

Christophe Leroy christophe.leroy at csgroup.eu
Tue Sep 27 16:05:17 AEST 2022



Le 27/09/2022 à 05:31, Benjamin Gray a écrit :
> On Mon, 2022-09-26 at 14:55 +0000, Christophe Leroy wrote:
>>> +config PPC_STATIC_CALL_KUNIT_TEST
>>> +       tristate "KUnit tests for PPC64 ELF ABI V2 static calls"
>>> +       default KUNIT_ALL_TESTS
>>> +       depends on HAVE_STATIC_CALL && PPC64_ELF_ABI_V2 && KUNIT &&
>>> m
>>
>> Is there a reason why it is dedicated to PPC64 ? In that case, can
>> you
>> make it explicit with the name of the config option, and with the
>> name
>> of the file below ?
> 
> The tests were written to make sure the TOC stays correct, so in theory
> PPC64_ELF_ABI_V2 (and potentially PPC64_ELF_ABI_V1) is the only ABI
> that should need them. I was thinking other tests should probably go in
> static_call_selftest.c
> 
> Thinking now though, I suppose runtime modules are out-of-range for
> branches on 32-bit as well? I can see it being useful for just testing
> the indirect branch fallback in that case, without trying to make some
> generic test suite that needs to work on other arches. The TOC specific
> checks can be conditionally enabled per ABI.
> 

Yes it may happen that runtime modules are out-of-range, allthough we 
are doing our best to keep it as close as possible to kernel text, see 
commit 2ec13df16704 ("powerpc/modules: Load modules closer to kernel text")


More information about the Linuxppc-dev mailing list