RE: [PATCH 1/1] arch:hexagon/powerpc: use KSYM_NAME_LEN in array size

From: Maninder Singh
Date: Mon May 29 2023 - 07:09:02 EST


Hi,

>>
>> kallsyms_lookup which in turn calls for kallsyms_lookup_buildid()
>> writes on index "KSYM_NAME_LEN - 1".
>>
>> Thus array size should be KSYM_NAME_LEN.
>>
>> for powerpc and hexagon it was defined as "128" directly.
>> and commit '61968dbc2d5d' changed define value to 512,
>> So both were missed to update with new size.
>>
>> Fixes: 61968dbc2d5d ("kallsyms: increase maximum kernel symbol length to 512")
>> Signed-off-by: Onkarnath <onkarnath.1@xxxxxxxxxxx>
>> Signed-off-by: Maninder Singh <maninder1.s@xxxxxxxxxxx>

> Thanks for this!
>
> There is no `From:` at the top. Since I cannot locate the patch in
> Lore, did you mean to put both of you as authors perhaps? In that
> case, please use a `Co-developed-by` as needed.
>

I Will add co-developed-by` tag.
because this change was identified while we were working on kallsyms some time back.
https://lore.kernel.org/lkml/YonTOL4zC4CytVrn@xxxxxxxxxxxxx/t/

this patch set is pending and we will start working on that again, so i thought better
to send bugfix first.

> Perhaps it is a good idea to submit each arch independently, too.
>

ok, I will share 2 separate patches.

> The changes themselves look fine on a quick inspection, though the
> `xmon.c` one is a global buffer (and there is another equally-sized
> buffer in `xmon.c` with a hard-coded `128` constant that would be nice
> to clarify).

Yes, I think second buffer was not related to kallsyms, so I have not touched that.

Thanks,
Maninder Singh