Re: [PATCH v5 02/21] lib/vsprintf: Print time and date in human readable format via %pt

From: Geert Uytterhoeven
Date: Tue Dec 04 2018 - 11:17:15 EST


Hi Andy,

On Tue, Dec 4, 2018 at 5:12 PM Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> On Tue, Dec 04, 2018 at 02:30:28PM +0100, Petr Mladek wrote:
> > On Thu 2018-11-29 12:59:40, Andy Shevchenko wrote:
> > > There are users which print time and date represented by content of
> > > struct rtc_time in human readable format.
> > >
> > > Instead of open coding that each time introduce %ptR[dt][r] specifier.
>
> > > +static void __init
> > > +struct_rtc_time(void)
> > > +{
> > > +}
> >
> > Just by chance, do you have any plans to add the test code? ;-)
> >
> > I understand that you did now want to spend time on it before
> > the real change was accepted.
>
> You see, there were several iterations with no consensus on everything:
> specifier format changed 3 times, for example.
>
> But it might be good idea to eventually add couple simple tests at some point.
>
> Is it a show stopper?

Can the user trigger formatting, and exploit a bug in the formatting code?

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds