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: <20110822095857.GD24151@htj.dyndns.org>
Date:	Mon, 22 Aug 2011 11:58:57 +0200
From:	Tejun Heo <tj@...nel.org>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	linux-kernel@...r.kernel.org, linux-pm@...ts.linux-foundation.org,
	arnd@...db.de, oleg@...hat.com, lizf@...fujitsu.com,
	paul@...lmenage.org, Matt Helsley <matthltc@...ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>
Subject: Re: [GIT PULL pm-next] freezer: fix various bugs and simplify
 implementation

Hello, Rafael.

On Sun, Aug 21, 2011 at 08:03:14PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rjw@...k.pl>
> Subject: PM / Freezer: Move might_sleep() from try_to_freeze()
> 
> There are some code paths that call try_to_freeze() from interrupt
> context, but doing so they know that the current process cannot
> possible be freezing (e.g. during reboot on ARM).  However, the
> recently added might_sleep() annotation in try_to_freeze()
> triggers in those cases, making it look like there were bugs in
> those places, which really isn't the case.
> 
> Therefore move might_sleep() from try_to_freeze() to
> __refrigerator() so that it doesn't produce false positives.

Hmmm... I can't quite agree with this change.  Some invocations of
try_to_freeze() can be very difficult to trigger.  Freezing isn't a
frequent operation after some try_to_freeze() can be buried in weird
places.  might_sleep() is exactly to detect context bugs in these
situations.  If a code path is called from both sleepable and
unsleepable context and it knows that the latter wouldn't happen if
the system is freezing, that code path should conditionalize
invocation of try_to_freeze() based on its knowledge of context.  That
way, all other normal cases get the might_sleep() protection and the
peculiar logic in that code path is explicitly described - win win.

Can you please point me to where the problem was?

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