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: <cea58361-16bd-4daf-85eb-4d63d47cb46f@app.fastmail.com>
Date: Sat, 06 Apr 2024 17:45:57 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Guenter Roeck" <linux@...ck-us.net>, "Arnd Bergmann" <arnd@...nel.org>
Cc: "Andi Shyti" <andi.shyti@...nel.org>,
 "Wim Van Sebroeck" <wim@...ux-watchdog.org>,
 "Heiner Kallweit" <hkallweit1@...il.com>,
 "Wolfram Sang" <wsa+renesas@...g-engineering.com>,
 "Jarkko Nikula" <jarkko.nikula@...ux.intel.com>,
 "Geert Uytterhoeven" <geert+renesas@...der.be>,
 "Jean Delvare" <jdelvare@...e.de>, linux-i2c@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-watchdog@...r.kernel.org
Subject: Re: [PATCH] i2c: i801: add I2C_MUX dependency

On Sat, Apr 6, 2024, at 15:08, Guenter Roeck wrote:
> On Fri, Apr 05, 2024 at 04:27:43PM +0200, Arnd Bergmann wrote:
>> 
>> diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
>> index 1872f1995c77..2619018dd756 100644
>> --- a/drivers/i2c/busses/Kconfig
>> +++ b/drivers/i2c/busses/Kconfig
>> @@ -108,6 +108,7 @@ config I2C_HIX5HD2
>>  config I2C_I801
>>  	tristate "Intel 82801 (ICH/PCH)"
>>  	depends on PCI
>> +	depends on I2C_MUX || I2C_MUX_GPIO=n
>>  	select P2SB if X86
>>  	select CHECK_SIGNATURE if X86 && DMI
>>  	select I2C_SMBUS
>> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
>> index 0b0df3fe1efd..4dfb3773e6e2 100644
>> --- a/drivers/watchdog/Kconfig
>> +++ b/drivers/watchdog/Kconfig
>> @@ -1301,8 +1301,6 @@ config ITCO_WDT
>>  	select WATCHDOG_CORE
>>  	depends on I2C || I2C=n
>>  	depends on MFD_INTEL_PMC_BXT || !MFD_INTEL_PMC_BXT
>> -	select LPC_ICH if !EXPERT
>> -	select I2C_I801 if !EXPERT && I2C
>
> Sorry, I don't understand why LPC_ICH and I2C_I801 are neither a dependency
> nor need to be selected. What if both LPC_ICH=n and I2C_I801=n, or if one is
> selected but the other is needed to connect to the watchdog ?

The Kconfig dependencies are only required if there is a compile-time
dependencies. In this case, both LPC_ICH and I2C_I801 create a
platform device that is consumed by ITCO_WDT, but it could in
theory work with any other such driver providing the device.

It would be fine to make this explicit by adding
'depends on LPC_ICH || I2C_I801' to enforce that the watchdog
driver can only be selected on if at least one of these
is present, but we have a lot of examples where we don't
spell out this type of dependency.

The two 'select' statements in comparison a really bad idea
because a driver should never need to force-enable a user
visible symbol in another subsystem, and because no single
machine would actually require both the i810 and the ich driver.

   Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ