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: <51BF4DA2.40601@infradead.org>
Date:	Mon, 17 Jun 2013 10:55:46 -0700
From:	Randy Dunlap <rdunlap@...radead.org>
To:	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
CC:	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Zhang Rui <rui.zhang@...el.com>,
	Linux PM list <linux-pm@...r.kernel.org>
Subject: [PATCH -next] thermal:  fix x86_pkg_temp_thermal.c build and Kconfig

On 06/17/13 10:26, Srinivas Pandruvada wrote:
> On 06/17/2013 10:03 AM, Randy Dunlap wrote:
>> On 06/17/13 01:51, Stephen Rothwell wrote:
>>> Hi all,
>>>
>>> Changes since 20130607:
>>>
>>
>> on i386 and x86_64:
>>
>> when built as loadable module:
>>
>> ERROR: "platform_thermal_package_rate_control" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!
>> ERROR: "platform_thermal_package_notify" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!
>>
>> or when built-in:
>>
>> drivers/built-in.o: In function `pkg_temp_thermal_init':
>> x86_pkg_temp_thermal.c:(.init.text+0x1492b): undefined reference to `platform_thermal_package_notify'
>> x86_pkg_temp_thermal.c:(.init.text+0x14936): undefined reference to `platform_thermal_package_rate_control'
>> x86_pkg_temp_thermal.c:(.init.text+0x150fe): undefined reference to `platform_thermal_package_notify'
>> x86_pkg_temp_thermal.c:(.init.text+0x15109): undefined reference to `platform_thermal_package_rate_control'
>> drivers/built-in.o: In function `pkg_temp_thermal_exit':
>> x86_pkg_temp_thermal.c:(.exit.text+0x3a9b): undefined reference to `platform_thermal_package_notify'
>> x86_pkg_temp_thermal.c:(.exit.text+0x3aa6): undefined reference to `platform_thermal_package_rate_control'
>>
>>
>> Full randconfig file is attached (for loadable module build).
>>
>>
>>
> 
> This requires CONFIG_X86_MCE, which is by default is set to "y".

But you can't rely on that symbol being enabled -- there needs to be some
enforcement of it, like the patch below.


---
From: Randy Dunlap <rdunlap@...radead.org>

Fix build error in x86_pkg_temp_thermal.c.  It requires that
X86_MCE be enabled, so depend on that symbol.
Also, X86_PKG_TEMP_THERMAL is already inside an "if THERMAL" block,
so remove that duplicated dependency.

ERROR: "platform_thermal_package_rate_control" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!
ERROR: "platform_thermal_package_notify" [drivers/thermal/x86_pkg_temp_thermal.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@...radead.org>
---
 drivers/thermal/Kconfig |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- linux-next-20130617.orig/drivers/thermal/Kconfig
+++ linux-next-20130617/drivers/thermal/Kconfig
@@ -171,8 +171,7 @@ config INTEL_POWERCLAMP
 
 config X86_PKG_TEMP_THERMAL
 	tristate "X86 package temperature thermal driver"
-	depends on THERMAL
-	depends on X86
+	depends on X86 && X86_MCE
 	select THERMAL_GOV_USER_SPACE
 	default m
 	help
--
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