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]
Message-ID: <CALAqxLXRxXzdiRCmv1qDtdu5JQJxjAUuGVmzNwj9TJTFN_MnFw@mail.gmail.com>
Date:   Wed, 23 Aug 2017 11:56:18 -0700
From:   John Stultz <john.stultz@...aro.org>
To:     Prarit Bhargava <prarit@...hat.com>
Cc:     Petr Mladek <pmladek@...e.com>,
        lkml <linux-kernel@...r.kernel.org>,
        Mark Salyzyn <salyzyn@...roid.com>,
        Jonathan Corbet <corbet@....net>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Stephen Boyd <sboyd@...eaurora.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
        Christoffer Dall <cdall@...aro.org>,
        Deepa Dinamani <deepa.kernel@...il.com>,
        Ingo Molnar <mingo@...nel.org>,
        Joel Fernandes <joelaf@...gle.com>,
        Kees Cook <keescook@...omium.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Geert Uytterhoeven <geert+renesas@...der.be>,
        "Luis R. Rodriguez" <mcgrof@...nel.org>,
        Nicholas Piggin <npiggin@...il.com>,
        "Jason A. Donenfeld" <Jason@...c4.com>,
        Olof Johansson <olof@...om.net>,
        Josh Poimboeuf <jpoimboe@...hat.com>, linux-doc@...r.kernel.org
Subject: Re: [PATCH 2/2 v7] printk: Add monotonic, boottime, and realtime timestamps

On Wed, Aug 23, 2017 at 11:31 AM, Prarit Bhargava <prarit@...hat.com> wrote:
> On 08/23/2017 04:45 AM, Petr Mladek wrote:
>> I know that it would make the code more complicated. But
>> I really like the approach used by /sys/power/disk or
>> /sys/power/pm_test. They list all possible values
>> and put the selected one into [] brackets.
>>
>
> I like the idea too, however, I think that complicates things with userspace
> (which as you point out is something that we really need to be concerned
> with).  I am using /sys/modules/printk/parameters/time to indicate the
> timestamp to userspace.
>
> With my code, userspace would see "realtime" or "disabled".  With your
> suggested change they would see "disabled [realtime]".  I think that
> file needs to be a simple as possible and be a single entry for userspace
> to consume.  IMHO.
>
>> Well, this might be done in a separate patch.
>> I am not 100% sure that this actually does not break some
>> rules for sysfs.
>>
>
> I don't see anything that says I must list every available option
> but I only did a quick overview of the docs.

I think the issue is that sysfs uses a "one value per file" rule.  So
a value can be a list of possible options or the current option being
used, but mixing a list of options with some formatting to also
communicate the current option isn't strictly following the rule.
This is why we have available_clocksources and current_clocksource
entries.

That said, its not something that has been perfectly followed, so I'm
not sure how much of an issue it really is. I suspect GregKH would be
the gatekeeper on that.

thanks
-john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ