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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1415227284.6634.26.camel@perches.com>
Date:	Wed, 05 Nov 2014 14:41:24 -0800
From:	Joe Perches <joe@...ches.com>
To:	Steven Honeyman <stevenhoneyman@...il.com>
Cc:	Borislav Petkov <bp@...en8.de>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Jiri Kosina <trivial@...nel.org>,
	x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3] x86, cpu: trivial printk formatting fixes

On Wed, 2014-11-05 at 22:28 +0000, Steven Honeyman wrote:
> dmesg (from util-linux) currently has two methods for reading the
> kernel message ring buffer: /dev/kmsg and syslog(2). Since kernel
> 3.5.0 kmsg has been the default, which escapes control characters
> (e.g. new lines) before they are shown.
> 
> This change means that when dmesg is using /dev/kmsg, a 2 line printk
> makes the output messy, because the second line does not get a
> timestamp.
> For example:
> 
> [    0.012863] CPU0: Thermal monitoring enabled (TM1)
> [    0.012869] Last level iTLB entries: 4KB 1024, 2MB 1024, 4MB 1024
> Last level dTLB entries: 4KB 1024, 2MB 1024, 4MB 1024, 1GB 4
> [    0.012958] Freeing SMP alternatives memory: 28K (ffffffff81d86000
> - ffffffff81d8d000)
> [    0.014961] dmar: Host address width 39
> 
> Because printk.c intentionally escapes control characters, they should
> not be there in the first place.
> This patch fixes two occurrences of this.
> 
> V2: Revert change to log level, only fix the newline formatting issue
> V3: Expand patch description

The log level change is back...

> diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c
[]
> @@ -487,10 +487,8 @@ static void init_intel(struct cpuinfo_x86 *c)
>  
>  		rdmsrl(MSR_IA32_ENERGY_PERF_BIAS, epb);
>  		if ((epb & 0xF) == ENERGY_PERF_BIAS_PERFORMANCE) {
> -			printk_once(KERN_WARNING "ENERGY_PERF_BIAS:"
> -				" Set to 'normal', was 'performance'\n"
> -				"ENERGY_PERF_BIAS: View and update with"
> -				" x86_energy_perf_policy(8)\n");
> +			pr_info_once("ENERGY_PERF_BIAS: Set to 'normal', was 'performance'\n");
> +			pr_info_once("ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)\n");
>  			epb = (epb & ~0xF) | ENERGY_PERF_BIAS_NORMAL;
>  			wrmsrl(MSR_IA32_ENERGY_PERF_BIAS, epb);
>  		}



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ