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]
Message-ID: <36DF59CE26D8EE47B0655C516E9CE6405E63B123@shsmsx102.ccr.corp.intel.com>
Date:   Thu, 24 Nov 2016 09:54:06 +0000
From:   "Chen, Yu C" <yu.c.chen@...el.com>
To:     Ingo Molnar <mingo@...nel.org>,
        John Stultz <john.stultz@...aro.org>
CC:     lkml <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Xunlei Pang <xlpang@...hat.com>,
        Ingo Molnar <mingo@...hat.com>, Len Brown <lenb@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>, Pavel Machek <pavel@....cz>,
        Thomas Gleixner <tglx@...utronix.de>,
        Prarit Bhargava <prarit@...hat.com>,
        Richard Cochran <richardcochran@...il.com>
Subject: RE: [PATCH 3/4] timekeeping: Ignore the bogus sleep time if
 pm_trace is enabled

Hi,

> -----Original Message-----
> From: Ingo Molnar [mailto:mingo.kernel.org@...il.com] On Behalf Of Ingo
> Molnar
> Sent: Monday, November 21, 2016 4:18 PM
> To: John Stultz
> Cc: lkml; Chen, Yu C; Rafael J. Wysocki; Xunlei Pang; Ingo Molnar; Len Brown; H.
> Peter Anvin; Pavel Machek; Thomas Gleixner; Prarit Bhargava; Richard Cochran
> Subject: Re: [PATCH 3/4] timekeeping: Ignore the bogus sleep time if pm_trace
> is enabled
> 
> 
> * John Stultz <john.stultz@...aro.org> wrote:
> 
> > +static int pm_trace_notify(struct notifier_block *nb,
> > +				unsigned long mode, void *_unused) {
> > +	switch (mode) {
> > +	case PM_POST_HIBERNATION:
> > +	case PM_POST_SUSPEND:
> > +		if (pm_trace_rtc_abused) {
> > +			pm_trace_rtc_abused = false;
> > +			pr_warn("Possible incorrect RTC due to pm_trace,"
> > +				"please use ntp-date or rdate to reset.\n");
> 
> Please don't break user-visible strings just to pacify checkpatch!
> 
> The bogus linebreak above hides a type in the user string:
> 
>   Possible incorrect RTC due to pm_trace,please use ntp-date or rdate to reset.
> 
> (There's a missing space after the comma.)
> 
> Best practice is to preserve the continuous nature of the user string in the code.
> 
> In addition to that, please quote suggested command names, i.e. something like:
> 
>   Possible incorrect RTC due to pm_trace, please use 'ntp-date' or 'rdate' to
> reset it.
OK, will do.
> 
> > --- a/drivers/rtc/rtc-cmos.c
> > +++ b/drivers/rtc/rtc-cmos.c
> > @@ -191,6 +191,13 @@ static inline void cmos_write_bank2(unsigned char
> > val, unsigned char addr)
> >
> >  static int cmos_read_time(struct device *dev, struct rtc_time *t)  {
> > +	/*
> > +	 * If pmtrace abused the RTC for storage tell the caller that it is
> > +	 * unusable.
> > +	 */
> > +	if (!pm_trace_rtc_valid())
> > +		return -EIO;
> 
> Please standardize the spelling of 'pm_trace', as there's 3 variants present in
> this patch alone:
> 
>   'pm_trace'
>   'pm trace'
>   'pmtrace'
OK, will do.
> 
> (Not to mention pm-trace.h - but that's a pre-existing inconsistency unrelated
> to your patch.)
> 
> Thanks,
> 
> 	Ingo

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ