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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 Jan 2015 17:44:42 -0700
From:	al.stone@...aro.org
To:	tony.luck@...el.com, fenghua.yu@...el.com, rjw@...ysocki.net,
	catalin.marinas@....com, will.deacon@....com, tglx@...utronix.de,
	mingo@...hat.com, hpa@...or.com, lenb@...nel.org,
	robert.moore@...el.com
Cc:	linux-ia64@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-acpi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	devel@...ica.org, linaro-acpi@...ts.linaro.org,
	linaro-kernel@...ts.linaro.org, patches@...aro.org
Subject: [PATCH 5/7] arm64: ACPI: create arch-dependent version of acpi_osi_handler()

From: Al Stone <ahs3@...hat.com>

In order to deprecate the use of _OSI for arm64 or other new architectures,
we need to make the default handler something we can change for various
platforms.  This patch moves the definition of acpi_osi_handler() -- the
function used by ACPICA as a callback for evaluating _OSI -- into arch-
dependent ACPI files.  The declaration of acpi_os_handler() was moved in
a previous patch.

Previously, _OSI behaved on arm64 as it did on x86.  This patch changes
_OSI so that on arm64 it will issue a warning if invoked, and tell the
firmware that no features have been implemented (i.e., it will always
return false).

In some distant future version of ACPI where _OSI has been completely
deprecated, this implementation and all other architecture implementations
should be removed.

Signed-off-by: Al Stone <al.stone@...aro.org>
---
 arch/arm64/kernel/acpi/Makefile |  2 +-
 arch/arm64/kernel/acpi/osi.c    | 26 ++++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm64/kernel/acpi/osi.c

diff --git a/arch/arm64/kernel/acpi/Makefile b/arch/arm64/kernel/acpi/Makefile
index e049f94..15a6172 100644
--- a/arch/arm64/kernel/acpi/Makefile
+++ b/arch/arm64/kernel/acpi/Makefile
@@ -1 +1 @@
-obj-$(CONFIG_ACPI)		+= acpi.o
+obj-$(CONFIG_ACPI)		+= acpi.o osi.o
diff --git a/arch/arm64/kernel/acpi/osi.c b/arch/arm64/kernel/acpi/osi.c
new file mode 100644
index 0000000..fa711dc
--- /dev/null
+++ b/arch/arm64/kernel/acpi/osi.c
@@ -0,0 +1,26 @@
+/*
+ *  ARM64 Specific ACPI _OSI Support
+ *
+ *  Copyright (C) 2015, Linaro Ltd.
+ *	Author: Al Stone <al.stone@...aro.org>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
+#define pr_fmt(fmt) "ACPI: " fmt
+
+#include <linux/acpi.h>
+
+/*
+ * Consensus is to deprecate _OSI for all new ACPI-supported architectures.
+ * So, for arm64, reduce _OSI to a warning message, and tell the firmware
+ * nothing of value.
+ */
+u32 acpi_osi_handler(acpi_string interface, u32 supported)
+{
+	pr_warn("_OSI was called, but is deprecated for this architecture.\n");
+	return false;
+}
+
-- 
2.1.0

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