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:	Wed, 18 Jan 2012 09:30:37 -0800
From:	Tejun Heo <tj@...nel.org>
To:	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>
Cc:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Linux PM list <linux-pm@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>, horms@...ge.net.au,
	"pavel@....cz" <pavel@....cz>, Len Brown <lenb@...nel.org>
Subject: Re: [Update][PATCH] PM / Hibernate: Fix s2disk regression related
 to unlock_system_sleep()

Hello, Srivatsa.

On Wed, Jan 18, 2012 at 10:49:09PM +0530, Srivatsa S. Bhat wrote:
> I agree, but I was trying to keep the comment from growing too long ;)

It doesn't have to be long.  It just has to give some meaning to the
decision.  AFAICS, it is correct to call try_to_freeze() on
unlock_system_sleep() regardless of 20sec window.  There's no
guarantee the unlocking task is gonna hit try_to_freeze() elsewhere
and not calling it actually makes the interface buggy.

That said, it causes a problem because unlock_system_sleep() is called
in a special context during later stage of hibernation where the usual
expectation - that a freezable task which sees a freezing condition
should freeze - doesn't hold.

The correct solution would be somehow marking that condition so that
either try_to_freeze() doesn't get invoked or gets nullified -
e.g. making the SKIP thing a counter and ensure the hibernating task
has it elevated throughout the whole process.  Alternatively, if the
code path is limited enough, using a different version of the unlock
function, unlock_system_sleep_nofreeze() or whatever, would work too -
this is a popular approach for synchronization functions which
interacts with scheduler and preemption.

For now, as a quick fix, maybe not calling try_to_freeze()
unconditionally is okay, I don't know, but it's a hack.

Thanks.

-- 
tejun
--
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