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: <525c37a568b10623ffb2d108850afd7e37f9350e.1688643442.git.geert@linux-m68k.org>
Date:   Thu,  6 Jul 2023 13:42:02 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Mark Brown <broonie@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J . Wysocki" <rafael@...nel.org>,
        Lee Jones <lee@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        Benjamin Gray <bgray@...ux.ibm.com>,
        Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH 1/3] regmap: Replace "default y if" by select

Merely setting the default to enabled is no guarantee that a Kconfig
option is actually enabled.  While this works for an invisible option,
the user can still disable it manually if the option is visible.
Hence since the REGMAP option was made visible if KUNIT_ALL_TESTS is
enabled, the user can now manually disable REGMAP, causing build
failures if any of the REGMAP_* configuration options are enabled.

Fix this by replacing "default y if ..." by individual "select REGMAP"
statements for all users.

Fixes: 70a640c0efa76674 ("regmap: REGMAP_KUNIT should not select REGMAP")
Reported-by: Benjamin Gray <bgray@...ux.ibm.com>
Closes: https://lore.kernel.org/r/20230705003024.1486757-1-bgray@linux.ibm.com
Reported-by: Christophe Leroy <christophe.leroy@...roup.eu>
Closes: https://lore.kernel.org/r/d8437dd4-63b6-13fb-22fd-9b92c661071c@csgroup.eu
Signed-off-by: Geert Uytterhoeven <geert@...ux-m68k.org>
---
 drivers/base/regmap/Kconfig | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig
index 0db2021f7477f2ab..e25cc619c75de3d9 100644
--- a/drivers/base/regmap/Kconfig
+++ b/drivers/base/regmap/Kconfig
@@ -5,7 +5,6 @@
 
 config REGMAP
 	bool "Register Map support" if KUNIT_ALL_TESTS
-	default y if (REGMAP_I2C || REGMAP_SPI || REGMAP_SPMI || REGMAP_W1 || REGMAP_AC97 || REGMAP_MMIO || REGMAP_IRQ || REGMAP_SOUNDWIRE || REGMAP_SOUNDWIRE_MBQ || REGMAP_SCCB || REGMAP_I3C || REGMAP_SPI_AVMM || REGMAP_MDIO || REGMAP_FSI)
 	select IRQ_DOMAIN if REGMAP_IRQ
 	select MDIO_BUS if REGMAP_MDIO
 	help
@@ -25,10 +24,12 @@ config REGMAP_KUNIT
 
 config REGMAP_AC97
 	tristate
+	select REGMAP
 
 config REGMAP_I2C
 	tristate
 	depends on I2C
+	select REGMAP
 
 config REGMAP_SLIMBUS
 	tristate
@@ -37,23 +38,29 @@ config REGMAP_SLIMBUS
 config REGMAP_SPI
 	tristate
 	depends on SPI
+	select REGMAP
 
 config REGMAP_SPMI
 	tristate
 	depends on SPMI
+	select REGMAP
 
 config REGMAP_W1
 	tristate
 	depends on W1
+	select REGMAP
 
 config REGMAP_MDIO
 	tristate
+	select REGMAP
 
 config REGMAP_MMIO
 	tristate
+	select REGMAP
 
 config REGMAP_IRQ
 	bool
+	select REGMAP
 
 config REGMAP_RAM
 	tristate
@@ -61,23 +68,29 @@ config REGMAP_RAM
 config REGMAP_SOUNDWIRE
 	tristate
 	depends on SOUNDWIRE
+	select REGMAP
 
 config REGMAP_SOUNDWIRE_MBQ
 	tristate
 	depends on SOUNDWIRE
+	select REGMAP
 
 config REGMAP_SCCB
 	tristate
 	depends on I2C
+	select REGMAP
 
 config REGMAP_I3C
 	tristate
 	depends on I3C
+	select REGMAP
 
 config REGMAP_SPI_AVMM
 	tristate
 	depends on SPI
+	select REGMAP
 
 config REGMAP_FSI
 	tristate
 	depends on FSI
+	select REGMAP
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ