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-next>] [day] [month] [year] [list]
Message-Id: <200807251326.51987.david-b@pacbell.net>
Date:	Fri, 25 Jul 2008 13:26:51 -0700
From:	David Brownell <david-b@...bell.net>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	lkml <linux-kernel@...r.kernel.org>,
	linux-pm@...ts.linux-foundation.org
Subject: [patch 2.6.26-git] pm selftest:  rtc paranoia

From: David Brownell <dbrownell@...rs.sourceforge.net>

Cope with a quirk of some RTCs (notably ACPI ones) which
aren't guaranteed to implement oneshot behavior when they
woke the system from sleeep:  forcibly disable the alarm,
just in case.

Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>
---
 kernel/power/main.c |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/kernel/power/main.c	2008-07-22 16:38:32.000000000 -0700
+++ b/kernel/power/main.c	2008-07-22 16:39:15.000000000 -0700
@@ -635,6 +635,13 @@ static void __init test_wakealarm(struct
 	}
 	if (status < 0)
 		printk(err_suspend, status);
+
+	/* Some platforms can't detect that the alarm triggered the
+	 * wakeup, or (accordingly) disable it after it afterwards.
+	 * It's supposed to give oneshot behavior; cope.
+	 */
+	alm.enabled = false;
+	rtc_set_alarm(rtc, &alm);
 }
 
 static int __init has_wakealarm(struct device *dev, void *name_ptr)
--
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