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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 8 Jun 2017 23:45:23 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Rasmus Villemoes <linux@...musvillemoes.dk>,
        Alexandre Belloni <alexandre.belloni@...e-electrons.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Rasmus Villemoes <rasmus.villemoes@...vas.dk>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Alessandro Zummo <a.zummo@...ertech.it>,
        linux-rtc@...r.kernel.org,
        Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        Guan Xuetao <gxt@...c.pku.edu.cn>,
        Ingo Molnar <mingo@...nel.org>,
        Jason Wessel <jason.wessel@...driver.com>,
        Jonathan Corbet <corbet@....net>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>
Subject: Re: [PATCH v1 04/25] lib/vsprintf: Print time and date in human
 readable format via %pt

On Thu, Jun 8, 2017 at 11:25 PM, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Thu, Jun 8, 2017 at 11:42 PM, Rasmus Villemoes
> <linux@...musvillemoes.dk> wrote:
>> On Thu, Jun 08 2017, Andy Shevchenko <andy.shevchenko@...il.com> wrote:
>>> On Thu, Jun 8, 2017 at 9:41 PM, Alexandre Belloni
>>> <alexandre.belloni@...e-electrons.com> wrote:
>>>> On 08/06/2017 at 20:57:05 +0300, Andy Shevchenko wrote:
>>>>> On Thu, Jun 8, 2017 at 6:05 PM, Alexandre Belloni
>>>>> <alexandre.belloni@...e-electrons.com> wrote:
>
>>> Yeah, but the problem is to pass the reference. All dances around will
>>> uglify the code.
>>> (Obviously we can't pass timespec64/time64_t or anything longer than
>>> 32 bits as is in %p extension)
>
>> I like that this gets rid of some mm/dd/yy and other more or less random
>> format and ends up standardizing yyyy-mm-dd HH:MM:SS. However, I do
>> think %pt should take either ktime_t or timespec64 (obviously by
>> reference),
>
> I will try to look in this direction.

sounds good.

>> Please don't give people the option of eliding either the time or the
>> date; I've spent too much time dealing with syslog files that don't
>> include the year in the timestamps.
>
> I understand that, but see above.

When we pretty-print a ktime_t, we probably want to leave out the high
fields as well, as this often refers to a time interval, e.g. a few seconds.
Even for absolute values, the start of ktime_t is usually not the 1970
epoch but system boot, so we may not necessarily want the higher
fields. I hoped to find some inspiration in the 'date' man page, which
contains a lot of formatting options, but it's hard to translate that into
a useful format string within the constraints of %p flags in printk.

     Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ