On 2023/10/02 13:10, Daisuke Hatayama (Fujitsu) wrote:
Hagio-san,
Sorry for the delayed response.
> ________________________________________
> From: HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab(a)nec.com>
> Sent: Thursday, September 28, 2023 9:03
> To: Hatayama, Daisuke/畑山 大輔
> Cc: crash-utility(a)redhat.com
> Subject: Re: About referring to struct load_module from extension modules
>
> On 2023/09/26 19:21, Daisuke Hatayama (Fujitsu) wrote:
...snip...
>> On the other hand, is it OK to refer to struct load_module directly
>> from extension modules?
>
> Yes, I think it's ok.
>
>>
>> I'm not the original author of crash trace command. I've just found
>> crash trace doing like this for the first time.
>>
>> - If it is OK to refer to struct load_module directly from extension
>> modules, should it be backward compatible on it? Or extension
>> modules should absorb the incompatibility?
>
> The crash-utility considers extension modules somewhat (e.g. [1]), but
> AFAIK there is no other strict rule about the compatibility. We cannot
> know what is used by extension modules. If crash has to keep their
> backward-compatibility, all global variables and functions have to be
> compatible. That will make crash development inefficient or maybe
> sometimes impossible depending on a kernel change. So I think that
> crash changes should be handled by extension modules, same as kernel
> changes.
>
> [1]
https://github.com/crash-utility/crash/wiki#writing-patches
>
> Thanks,
> Kazu
Thank you for your suggestion.
I agree to you because:
- The bad effect for development and maintenance of crash utility is
not preferable also for extension modules.
- Module layout changes that affect crash utility thus far appears
rare according to the source code; the module layout change is v3.
- It is easy for crash trace to deal with the module layout change
this time.
Thank you for understanding.
On the other hand, there could be the change in crash utility where
it's difficult for extension modules to deal with in the future. In
that case, I'll discuss them as necessary.
Yes, sure, there will be some cases where crash has to have changes so
that extension modules can work, like commit 2f1085df4dc9 ("EPPIC
extension support for crash-8.x + gdb-10.x").
Thanks,
Kazu