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:	Mon, 26 Jan 2015 12:05:16 +0100
From:	Pavel Machek <pavel@....cz>
To:	"Liu, Chuansheng" <chuansheng.liu@...el.com>
Cc:	"Fu, Zhonghui" <zhonghui.fu@...ux.intel.com>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	"Brown, Len" <len.brown@...el.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: Change behaviour when tracing ... nasty trap (was Re: [PATCH]
 PM/Trace: get rid of synchronous resume limit during PM trace)

On Mon 2015-01-26 10:39:04, Liu, Chuansheng wrote:
> Hello Pavel,
> 
> > > There are some kind of dependency between devices in some
> > > hardware platforms. So, asynchronous resuming devices may
> > > hang system due to wrong resume order. As a result, should
> > > not fore synchronously resuming devices during tracing
> > > PM events.
> > >
> > > Signed-off-by: Zhonghui Fu <zhonghui.fu@...ux.intel.com>
> > > ---
> > >  drivers/base/power/main.c    |    3 +--
> > >  include/linux/resume-trace.h |    7 -------
> > >  2 files changed, 1 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> > > index 9717d5f..5df148b 100644
> > > --- a/drivers/base/power/main.c
> > > +++ b/drivers/base/power/main.c
> > > @@ -517,8 +517,7 @@ static int device_resume_noirq(struct device *dev,
> > pm_message_t state, bool asyn
> > >
> > >  static bool is_async(struct device *dev)
> > >  {
> > > -	return dev->power.async_suspend && pm_async_enabled
> > > -		&& !pm_trace_is_enabled();
> > > +	return dev->power.async_suspend && pm_async_enabled;
> > >  }
> > >
> > 
> > Actually... whoever did the original patch was evil person. Changing
> > behaviour when tracing is requested is evil, evil, evil. Git blame
> > tells me
> > 
> > Signed-off-by: Chuansheng Liu <chuansheng.liu@...el.com>
> > 
> > went to the dark side.
> 
> Although I didn't get where is something wrong, but the is_async() is not created by my commit,
> it is from commit (PM: Start asynchronous resume threads upfront), I just moved it ahead.
> 
> And like other phases, I added it into resum/suspend_noirq()...

I see, blame blamed wrong person. It looks like Rafael is evil:

commit 97df8c12995c5bac73e3bfeea4c5be155c1f4401
Author: Rafael J. Wysocki <rjw@...k.pl>
Date:   Sat Jan 23 22:25:31 2010 +0100

    PM: Start asynchronous resume threads upfront

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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