Re: [PATCH 2/2 v9] printk: Add monotonic, boottime, and realtime timestamps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux