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]
Date:   Thu, 25 Apr 2019 19:47:15 +0200
From:   Ingo Molnar <mingo@...nel.org>
To:     "Liang, Kan" <kan.liang@...ux.intel.com>
Cc:     acme@...hat.com, mingo@...hat.com, linux-kernel@...r.kernel.org,
        jolsa@...hat.com, namhyung@...il.com, lgoncalv@...hat.com,
        ak@...ux.intel.com
Subject: Re: [PATCH] perf stat: Add hint for SMI cost measurement


* Liang, Kan <kan.liang@...ux.intel.com> wrote:

> 
> 
> On 4/25/2019 2:39 AM, Ingo Molnar wrote:
> > 
> > * kan.liang@...ux.intel.com <kan.liang@...ux.intel.com> wrote:
> > 
> > > +static void smi_env_check(void)
> > > +{
> > > +	char *name;
> > > +	size_t len;
> > > +
> > > +	if (sysfs__read_str(CPUIDLE_CUR_DRV, &name, &len)) {
> > > +		pr_warning("Failed to check cstate status.\n");
> > 
> > What a meaningless message. What did we want to do, what happened, and
> > why did it fail?
> > 
> > > +		return;
> > > +	}
> > > +
> > > +	if (strncmp(name, "none", 4)) {
> > > +		pr_warning("Cstate may cause drift between aperf and cycles. "
> > > +			   "Please completely disable cstate, "
> > > +			   "E.g. set idle=poll in grub\n");
> > 
> > Please keep user-visible strings in the same form that the user sees
> > them, i.e. in a single line.
> 
> To avoid the line over 80 characters, the quoted string was split across
> lines in the code. But the string is shown as a single line when it is
> output for user.
> 
> Are you suggesting to ignore the 80 characters rule when printing
> user-visible strings?
> Could you please confirm?

What I'd suggest is split it up into multiple messages, or shorten the 
message. Small violations of col80 for user visible strings is fine (up 
to 100-120 columns I guess), but if the string is longer it's a clear 
sign that the syslog message it too long to begin ...

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ