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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 07 May 2008 15:55:09 +0200
From:	Niels de Vos <niels.devos@...cor-nixdorf.com>
To:	sfr@...b.auug.org.au, linux-laptop@...r.kernel.org,
	linux-kernel@...r.kernel.org
CC:	niels.devos@...cor-nixdorf.com
Subject: [PATCH] apm: make apm=power-off configurable like apm=realmode-power-off

On some systems (with broken BIOSes?) apm=power-off should be appended
as kernel parameter. apm=realmode-power-off is configurable during 
compile-time. apm=power-off should be configurable likewise.

On non-SMP systems apm=power-off is the default. For kernels with SMP
support it is not.

Signed-off-by: Niels de Vos <niels.devos@...cor-nixdorf.com>
--
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index bbcafaa..e051f38 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1457,6 +1457,16 @@ config APM_ALLOW_INTS
 	  many of the newer IBM Thinkpads.  If you experience hangs when you
 	  suspend, try setting this to Y.  Otherwise, say N.
 
+config APM_POWER_OFF
+	bool "Power off on shutdown"
+	depends on APM && SMP
+	help
+	  Force a power off on shutdown. Needed for some buggy BIOSes. If you
+	  run an SMP kernel on a non-SMP system with APM, you try turning on
+	  this option if your system does not power-off properly.
+
+	  Note: this option is equivalent to apm=power-off on the cmdline.
+
 config APM_REAL_MODE_POWER_OFF
 	bool "Use real mode APM BIOS call to power off"
 	help
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index bf9290e..e3015da 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -385,7 +385,7 @@ static int bounce_interval __read_mostly = DEFAULT_BOUNCE_INTERVAL;
 static int debug __read_mostly;
 static int smp __read_mostly;
 static int apm_disabled = -1;
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_APM_POWER_OFF)
 static int power_off;
 #else
 static int power_off = 1;

-- 
Wincor Nixdorf International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

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