Re: [PATCH v5 2/2] kallsyms: Don't leak pointers for unresolved symbols

From: Andy Shevchenko

Date: Sun Oct 25 2026 - 10:52:04 EST


On Sat, Oct 24, 2026 at 06:10:29PM +0200, Sebastian Andrzej Siewior wrote:
> On 2026-10-24 13:07:09 [+0300], Andy Shevchenko wrote:

...

> > > - return sprintf(buffer, "0x%lx", address - symbol_offset);
> > > + return sprintf(buffer, "0x%p", address - symbol_offset);
> >
> > Hmm... Do we need a 0x here? I believe it's embedded into %p output, no?
>
> No, it does not. The %p does a fix digit size (different between 64 and
> 32 bit) without the 0x prefix.

Thanks for checking that. I dunno why my memory is weak in this sense...

--
With Best Regards,
Andy Shevchenko