Re: [PATCH 1/2] vsprintf: Don't leak pointers for %ps without KALLSYMS enabled
From: Petr Mladek
Date: Thu Aug 20 2026 - 11:48:52 EST
On Thu 2026-08-20 16:24:26, Sebastian Andrzej Siewior wrote:
> On 2026-08-15 11:58:03 [+0300], Andy Shevchenko wrote:
> > On Fri, Aug 14, 2026 at 04:48:53PM +0200, Sebastian Andrzej Siewior wrote:
> > > The "%ps" format modifier prints the name of the symbol which is more
> > > valuable in terms of debugging and does not leak the actual pointer.
> > >
> > > Without KALLSYMS it will leak the pointer which is not intended. The
> > > default policy for pointers is to print a hashed value and not to leak
> > > the actual pointer.
> > >
> > > Print "(unknown)" for any symbol resolution witout KALLSYMS enabled.
> >
> > Hmm... I would expect some test cases to be added/modified.
>
> No bot complained so far, so maybe not ;)
It seems that we really do not have test cases for this. I guess
that it is because it is so tricky with the various fallbacks, ...
The existing test cases for %p are tricky as well. As a result
they are an infinite source of problems ;-)
Best Regards,
Petr