lkml.org 
[lkml]   [2017]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2 v9] printk: Add monotonic, boottime, and realtime timestamps
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


\
 
 \ /
  Last update: 2017-08-25 21:03    [W:0.034 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site