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: <20161129093828.GA6815@yu-desktop-1.sh.intel.com>
Date:   Tue, 29 Nov 2016 17:38:28 +0800
From:   Chen Yu <yu.c.chen@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     John Stultz <john.stultz@...aro.org>,
        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 2/7] timekeeping: Ignore the bogus sleep time if pm_trace
 is enabled

On Tue, Nov 29, 2016 at 08:19:55AM +0100, Ingo Molnar wrote:
> 
> * John Stultz <john.stultz@...aro.org> wrote:
> 
> > From: Chen Yu <yu.c.chen@...el.com>
> > 
> > Previously we encountered some memory overflow issues due to
> > the bogus sleep time brought by inconsistent rtc, which is
> > triggered when pm_trace is enabled, and we have fixed it
> > in recent kernel. However it's improper in the first place
> > to call __timekeeping_inject_sleeptime() in case that pm_trace
> > is enabled simply because that "hash" time value will wreckage
> > the timekeeping subsystem.
> 
> s/
> 
>  Previously we encountered memory overflow issues due to
>  bogus sleep time brought by an inconsistent RTC, which is
>  triggered when pm_trace is enabled, and we have fixed it
>  in recent kernels. However it's improper in the first place
>  to call __timekeeping_inject_sleeptime() in case pm_trace
>  is enabled simply because the "hash" time value will wreckage
>  the timekeeping subsystem.
> 
> Half a dozen typos ...
> 
> > This patch is originally written by Thomas, which would bypass
> > the bogus rtc interval when pm_trace is enabled.
> > Meanwhile, if system succeed to resume back with pm_trace set, the
> > users are warned to adjust the bogus rtc either by 'ntpdate' or
> > 'rdate', by resetting pm_trace_rtc_abused to false, otherwise above
> > tools might not work as expected.
> 
> s/
> 
>  This patch was originally written by Thomas, which would bypass
>  the bogus RTC interval when pm_trace is enabled.
>  Meanwhile, if the system succeeds to resume back with pm_trace set,
>  users are warned to adjust the bogus RTC either by 'ntpdate' or
>  'rdate', by resetting pm_trace_rtc_abused to false, otherwise above
>  tools might not work as expected.
> 
> > +	/*
> > +	 * If pm_trace abused the RTC as storage set the timespec to 0
> > +	 * which tells the caller that this RTC value is bogus.
> > +	 */
> 
> s/
> 	/*
> 	 * If pm_trace abused the RTC as storage, set the timespec to 0,
> 	 * which tells the caller that this RTC value is bogus.
> 	 */
> 
> > @@ -74,6 +75,9 @@
> >  
> >  #define DEVSEED (7919)
> >  
> > +bool pm_trace_rtc_abused __read_mostly;
> > +EXPORT_SYMBOL(pm_trace_rtc_abused);
> 
> EXPORT_SYMBOL_GPL()
> 
> > +static int pm_trace_notify(struct notifier_block *nb,
> > +				unsigned long mode, void *_unused)
> 
> Please no nonsensical linebreaks in the middle of an argument list.
> 
> > +{
> > +	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 'ntpdate' or 'rdate' to reset.\n");
> 
> 
> s/to reset./to reset it.
> 
> Thanks,
> 
> 	Ingo
Thanks Ingo, I've sent out a new versin based on your comments.
Yu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ