lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 1 Oct 2019 17:41:24 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Thierry Reding <thierry.reding@...il.com>
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Petr Mladek <pmladek@...e.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Mathias Nyman <mathias.nyman@...el.com>,
        Jonathan Hunter <jonathanh@...dia.com>
Subject: Re: [PATCH v1 4/4] usb: host: xhci-tegra: Switch to use %ptT

On Tue, Oct 1, 2019 at 4:33 PM Thierry Reding <thierry.reding@...il.com> wrote:
> On Fri, Jan 04, 2019 at 09:30:09PM +0200, Andy Shevchenko wrote:
> > Use %ptT instead of open coded variant to print content of
> > time64_t type in human readable format.

> > -     dev_info(dev, "Firmware timestamp: %ld-%02d-%02d %02d:%02d:%02d UTC\n",
> > -              time.tm_year + 1900, time.tm_mon + 1, time.tm_mday,
> > -              time.tm_hour, time.tm_min, time.tm_sec);
> > +     dev_info(dev, "Firmware timestamp: %ptT UTC\n", &timestamp);
>
> If I understand correctly, this will now print:
>
>         Firmware timestamp: YYYY-mm-ddTHH:MM:SS UTC
>
> whereas it earlier printed:
>
>         Firmware timestamp: YYYY-mm-dd HH:MM:SS UTC
>
> So the 'T' character is different now.

>  Could we make this something
> along the lines of:
>
>         dev_info(dev, "Firmware timestamp: %ptTd %ptTt UTC\n", &timestamp,
>                  &timestamp);
>
> To keep the output identical?

Yes, we can...

> It's possible that there are some scripts
> that parse the log to find out which firmware was loaded.

...but if you have scripts parsing kernel log, something is odd.
As far as I understand kernel log isn't ABI, no-one should rely on its output.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ