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]
Message-ID: <55172939.4070100@roeck-us.net>
Date:	Sat, 28 Mar 2015 15:20:41 -0700
From:	Guenter Roeck <linux@...ck-us.net>
To:	Pali Rohár <pali.rohar@...il.com>,
	Steven Honeyman <stevenhoneyman@...il.com>
CC:	Paul Bolle <pebolle@...cali.nl>, Arnd Bergmann <arnd@...db.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jean Delvare <jdelvare@...e.de>,
	Valdis Kletnieks <Valdis.Kletnieks@...edu>,
	Jochen Eisinger <jochen@...guin-breeder.org>,
	Gabriele Mazzotta <gabriele.mzt@...il.com>,
	linux-kernel@...r.kernel.org, lm-sensors@...sensors.org
Subject: Re: [PATCH 2/2] hwmon: Allow to compile dell-smm-hwmon driver without
 /proc/i8k

On 03/28/2015 03:00 PM, Pali Rohár wrote:
> On Saturday 28 March 2015 13:54:51 Steven Honeyman wrote:
>> On 28 March 2015 at 11:04, Paul Bolle <pebolle@...cali.nl>
> wrote:
>>> On Sat, 2015-03-28 at 11:24 +0100, Pali Rohár wrote:
>>>> --- a/drivers/hwmon/Kconfig
>>>> +++ b/drivers/hwmon/Kconfig
>>>> @@ -1703,6 +1703,17 @@ config SENSORS_ULTRA45
>>>>
>>>>          This driver provides support for the Ultra45
>>>>          workstation environmental sensors.
>>>>
>>>> +config SENSORS_DELL_SMM
>>>> +     tristate "Dell laptop SMM BIOS hwmon driver"
>>>> +     depends ON X86
>>>
>>> How did this past your testing?
>>>
>>>> +     ---help---
>>>> +       This hwmon driver adds support for reporting
>>>> temperature of different +       sensors and controls the
>>>> fans on Dell laptops via System Management +       Mode
>>>> provided by Dell BIOS.
>>>> +
>>>> +       When option I8K is also enabled this driver
>>>> provides legacy /proc/i8k +       userspace interface for
>>>> i8kutils package.
>>>> +
>>
>> It's working OK for me (after fixing the mistake pointed out
>> above).
>>
>> [Latitude e6540]
>> -----
>> coretemp-isa-0000
>> Adapter: ISA adapter
>> Physical id 0:  +53.0°C  (high = +84.0°C, crit = +100.0°C)
>> Core 0:         +51.0°C  (high = +84.0°C, crit = +100.0°C)
>> Core 1:         +53.0°C  (high = +84.0°C, crit = +100.0°C)
>>
>> i8k-virtual-0
>> Adapter: Virtual device
>> Processor Fan: 3171 RPM
>> CPU:            +52.0°C
>> Ambient:        +46.0°C
>> SODIMM:         +40.0°C
>> -----
>>
>> Ambient and SODIMM look swapped - but it's probably just
>> another Dell error. I really need to look at getting coreboot
>> on this thing.
>>
>
> Both patches do not change any code. So there should not be any
> type swapped with or without my patch.
>
> Cpu type is requested via SMM in same way as it is doing old DOS
> executable. So there can be maybe problem in DELL SMM handler too
> or maybe just I did not understand correctly assembler dump of
> DOS executable...
>
>> On 28 March 2015 at 10:24, Pali Rohár <pali.rohar@...il.com>
>> wrote: ...
>>
>>>   config I8K
>>>
>>> -       tristate "Dell laptop support"
>>> -       select HWMON
>>> +       bool "Dell i8k legacy laptop support"
>>> +       select SENSORS_DELL_SMM
>>
>> ...
>>
>>> +config SENSORS_DELL_SMM
>>> +       tristate "Dell laptop SMM BIOS hwmon driver"
>>
>> The only change I'd suggest is not to change the tristate to
>> bool for I8K. Forcing that to bool means that
>> SENSORS_DELL_SMM can't be compiled as a module if the user
>> wishes to keep i8k hanging around "just in case". It'll
>> probably annoy distro kernel packagers too.
>>
>>
>> Thanks,
>> Steven
>
> My idea was:
>
> SENSORS_DELL_SMM enable/disable compilation of kernel driver
> (ether statically link into kernel image or as external module)
>
> CONFIG_I8K just enable /proc/i8k code in SENSORS_DELL_SMM -- no
> additional driver, just boolean switch which has effect only iff
> SENSORS_DELL_SMM is Y or M
>

Maybe that is the plan, but it is not what is happening.
I8K selects SENSORS_DELL_SMM, so a boolean I8K forces SENSORS_DELL_SMM
to be built into the kernel.

What you suggest would work if I8K would depend on SENSORS_DELL_SMM,
but then the symbols would not be backward-compatible.

Guenter

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