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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 06 Apr 2016 08:12:55 -0700
From:	Joe Perches <joe@...ches.com>
To:	Doug Smythies <dsmythies@...us.net>,
	'Srinivas Pandruvada' <srinivas.pandruvada@...ux.intel.com>,
	'Len Brown' <lenb@...nel.org>,
	"'Rafael J. Wysocki'" <rjw@...ysocki.net>,
	'Viresh Kumar' <viresh.kumar@...aro.org>
Cc:	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] intel_pstate: Use pr_fmt

On Wed, 2016-04-06 at 07:51 -0700, Doug Smythies wrote:
> On 2016.04.05 02:44 Srinivas Pandruvada wrote:
> > 
> > On Tue, 2016-04-05 at 13:28 -0700, Joe Perches wrote:
> > > 
> > > Prefix the output using the more common kernel style.
> > > 
> > > Signed-off-by: Joe Perches <joe@...ches.com>
> > Acked-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
> > > 
> > > ---
> > >  drivers/cpufreq/intel_pstate.c | 18 ++++++++++--------
> > >  1 file changed, 10 insertions(+), 8 deletions(-)
> ...[cut, example left]...
> 
> > 
> > -		pr_warn("intel_pstate: Turbo disabled by BIOS or
> > unavailable on processor\n");
> > +		pr_warn("Turbo disabled by BIOS or unavailable on
> > processor\n");
> I do  not understand.
> The common and unique string "intel_pstate" was added on purpose
> so as to provide a way to easily extract the related message from
> an otherwise huge log file.
> 

The more common kernel mechanism to prefix messages
is using a pr_fmt define like:

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt

This style is used ~1000 times in the kernel tree.

All of the pr_<level> macros are defined like:

#define pr_info(fmt, ...) \
	printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)

so this prefixes all messages and means that any
new message added later will also be prefixed without
copy/paste defects or omission.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ