From: Thomas Gleixner <tglx@linutronix.de>
To: Prarit Bhargava <prarit@redhat.com>
Cc: linux-kernel@vger.kernel.org, Mark Salyzyn <salyzyn@android.com>,
Jonathan Corbet <corbet@lwn.net>, Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
John Stultz <john.stultz@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>,
Andrew Morton <akpm@linux-foundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Christoffer Dall <cdall@linaro.org>,
Deepa Dinamani <deepa.kernel@gmail.com>,
Ingo Molnar <mingo@kernel.org>,
Joel Fernandes <joelaf@google.com>,
Kees Cook <keescook@chromium.org>,
Peter Zijlstra <peterz@infradead.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
"Luis R. Rodriguez" <mcgrof@kernel.org>,
Nicholas Piggin <npiggin@gmail.com>,
"Jason A. Donenfeld" <Jason@zx2c4.com>,
Olof Johansson <olof@lixom.net>,
Josh Poimboeuf <jpoimboe@redhat.com>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH 2/2 v9] printk: Add monotonic, boottime, and realtime timestamps
Date: Fri, 25 Aug 2017 21:01:02 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.20.1708252054070.2124@nanos> (raw)
In-Reply-To: <1503681619-5326-3-git-send-email-prarit@redhat.com>
On Fri, 25 Aug 2017, Prarit Bhargava wrote:
> +
> + if (printk_time_source == PRINTK_TIME_UNDEFINED)
> + printk_time_source = _printk_time;
> +#ifndef CONFIG_PRINTK_TIME_DEBUG
> + else if ((printk_time_source != _printk_time) &&
> + (_printk_time != PRINTK_TIME_DISABLED)) {
You can avoid the #ifdef ugliness by writing this as:
} else if (IS_ENABLED(CONFIG_PRINTK_DEBUG) &&
printk_time_source != _prinkt_time &&
_printk_time != PRINTK_TIME_DISABLED) {
Aside of that I'm not too fond of that extra config switch. Why shouldn't
we allow the admin to switch between time sources as he sees fit by
default? It's not Joe user who is allowed to do that and in general we give
admins the biggest guns we have to shoot themself in the foot.
Seriously, switching it is not making anything explode, insecure or
whatever dangerous. It's merily changing the time stamp source so dmesg and
syslog get harder to parse.
Thanks,
tglx
prev parent reply other threads:[~2017-08-25 19:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 17:20 [PATCH 0/2 v9] printk: Add new timestamps Prarit Bhargava
2017-08-25 17:20 ` [PATCH 1/2 v9] time: Make fast functions return 0 before timekeeping is initialized Prarit Bhargava
2017-08-25 17:20 ` [PATCH 2/2 v9] printk: Add monotonic, boottime, and realtime timestamps Prarit Bhargava
2017-08-25 19:01 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1708252054070.2124@nanos \
--to=tglx@linutronix.de \
--cc=Jason@zx2c4.com \
--cc=akpm@linux-foundation.org \
--cc=cdall@linaro.org \
--cc=corbet@lwn.net \
--cc=deepa.kernel@gmail.com \
--cc=geert+renesas@glider.be \
--cc=gregkh@linuxfoundation.org \
--cc=joelaf@google.com \
--cc=john.stultz@linaro.org \
--cc=jpoimboe@redhat.com \
--cc=keescook@chromium.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=mingo@kernel.org \
--cc=npiggin@gmail.com \
--cc=olof@lixom.net \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=prarit@redhat.com \
--cc=rostedt@goodmis.org \
--cc=salyzyn@android.com \
--cc=sboyd@codeaurora.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®