Skip to contentSkip to conversation

net: enable wireless core features with LEGACY_WEXT_ALLCONFIG

PATCH In review Mark Salyzyn 4 participants 6 messages Sep 6, 2019 – Sep 9, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 net: enable wireless core features with LEGACY_WEXT_ALLCONFIG

In embedded environments the requirements are to be able to pick and chose which features one requires built into the kernel. If an embedded environment wants to supports loading modules that have been kbuilt out of tree, there is a need to enable hidden configurations for legacy wireless core features to provide the API surface for them to load.

Introduce CONFIG_LEGACY_WEXT_ALLCONFIG to select all legacy wireless extension core features by activating in turn all the associated hidden configuration options, without having to specifically select any wireless module(s).

---
v2: change name and documentation to CONFIG_LEGACY_WEXT_ALLCONFIG

---
 net/wireless/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
net/wireless/Kconfig +14 -0
index 67f8360dfcee..0d646cf28de5 100644
@@ -17,6 +17,20 @@ config WEXT_SPY
 config WEXT_PRIV
 	bool
 
+config LEGACY_WEXT_ALLCONFIG
+	bool "allconfig for legacy wireless extensions"
+	select WIRELESS_EXT
+	select WEXT_CORE
+	select WEXT_PROC
+	select WEXT_SPY
+	select WEXT_PRIV
+	help
+	  Config option used to enable all the legacy wireless extensions to
+	  the core functionality used by add-in modules.
+
+	  If you are not building a kernel to be used for a variety of
+	  out-of-kernel built wireless modules, say N here.
+
 config CFG80211
 	tristate "cfg80211 - wireless configuration API"
 	depends on RFKILL || !RFKILL
Signature · 1 line
2.23.0.187.g17f5b7556c-goog
#1 lore raw
Quoted 55 lines · Mark Salyzyn

In embedded environments the requirements are to be able to pick and chose which features one requires built into the kernel. If an embedded environment wants to supports loading modules that have been kbuilt out of tree, there is a need to enable hidden configurations for legacy wireless core features to provide the API surface for them to load.

Introduce CONFIG_LEGACY_WEXT_ALLCONFIG to select all legacy wireless extension core features by activating in turn all the associated hidden configuration options, without having to specifically select any wireless module(s).

---
v2: change name and documentation to CONFIG_LEGACY_WEXT_ALLCONFIG

---
 net/wireless/Kconfig | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
net/wireless/Kconfig +14 -0
index 67f8360dfcee..0d646cf28de5 100644
@@ -17,6 +17,20 @@ config WEXT_SPY
 config WEXT_PRIV
 	bool
 
+config LEGACY_WEXT_ALLCONFIG
+	bool "allconfig for legacy wireless extensions"
+	select WIRELESS_EXT
+	select WEXT_CORE
+	select WEXT_PROC
+	select WEXT_SPY
+	select WEXT_PRIV
+	help
+	  Config option used to enable all the legacy wireless extensions to
+	  the core functionality used by add-in modules.
+
+	  If you are not building a kernel to be used for a variety of
+	  out-of-kernel built wireless modules, say N here.
+
 config CFG80211
 	tristate "cfg80211 - wireless configuration API"
 	depends on RFKILL || !RFKILL
Signature · 1 line
2.23.0.187.g17f5b7556c-goog

How is this patch applicable to stable kernels???

#2 lore raw
Quoted 49 lines · Greg KH
Quoted 48 lines · Mark Salyzyn

In embedded environments the requirements are to be able to pick and chose which features one requires built into the kernel. If an embedded environment wants to supports loading modules that have been kbuilt out of tree, there is a need to enable hidden configurations for legacy wireless core features to provide the API surface for them to load.

Introduce CONFIG_LEGACY_WEXT_ALLCONFIG to select all legacy wireless extension core features by activating in turn all the associated hidden configuration options, without having to specifically select any wireless module(s).

---
v2: change name and documentation to CONFIG_LEGACY_WEXT_ALLCONFIG

---
  net/wireless/Kconfig | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
net/wireless/Kconfig +13 -0
index 67f8360dfcee..0d646cf28de5 100644
@@ -17,6 +17,20 @@ config WEXT_SPY
  config WEXT_PRIV
  	bool
 
+config LEGACY_WEXT_ALLCONFIG
+	bool "allconfig for legacy wireless extensions"
+	select WIRELESS_EXT
+	select WEXT_CORE
+	select WEXT_PROC
+	select WEXT_SPY
+	select WEXT_PRIV
+	help
+	  Config option used to enable all the legacy wireless extensions to
+	  the core functionality used by add-in modules.
+
+	  If you are not building a kernel to be used for a variety of
+	  out-of-kernel built wireless modules, say N here.
Quoted 8 lines
Quoted 7 lines
net/wireless/Kconfig +1 -0
+
  config CFG80211
  	tristate "cfg80211 - wireless configuration API"
  	depends on RFKILL || !RFKILL
Signature · 1 line
2.23.0.187.g17f5b7556c-goog

How is this patch applicable to stable kernels???

A) worth a shot ;-}

B) there is a shortcoming in _all_ kernel versions with respect to hidden configurations options like this, hoping to set one precedent in how to handle them if acceptable to the community.

C) [AGENDA ALERT] Android _will_ be back-porting this to android-4.19 kernel anyway, would help maintenance if via stable. <holding hat in hand>

D) Not an ABI or interface break, does not introduce instability, but rather keeps downstream kernels of any distributions from having to hack in their own alternate means of dealing with this problem leading to further fragmentation.

E) Timely discussion item for LPC?

Sincerely -- Mark Salyzyn

maintainer
#3 lore raw
Quoted 2 lines · Mark Salyzyn
Quoted 2 lines

How is this patch applicable to stable kernels???

I'm not sure I even buy the arguments to get it into the regular kernel.

Quoted 3 lines

B) there is a shortcoming in _all_ kernel versions with respect to hidden configurations options like this, hoping to set one precedent in how to handle them if acceptable to the community.

This really is the only argument, I think, but I don't really see it as a shortcoming. The kernel is handling this properly, after all, with respect to itself. You just have issues with out-of-tree modules.

And while it is true, setting that precedent might ultimately mean we'll end up with ~80 (**) new Kconfig options in net/ alone ... That's certainly *NOT* a precedent I want to set nor the way I want to see this handled, when we already get complaints that we're adding too many Kconfig options (and those are ones we really do need).

Obviously, nothing stops you from putting this into your kernel (and I guess you already are), but I don't really see how it benefits us as a kernel community.

Quoted 1 line

E) Timely discussion item for LPC?

Perhaps you should indeed drive that discussion there, this really is bigger than this particular wireless feature. At the very least, to avoid Kconfig complexity explosion, add a single new

config OPTIONS_FOR_OUT_OF_TREE_MODULES

	bool "..."
	depends on EXPERT
	help
	  ...

and make LEGACY_WEXT_ALLCONFIG depend on that.

But if you're honest and obvious about it like that, I have a hard time seeing you get that into the tree past Greg or Linus...

Also, you probably know this, but in this particular case you really should just get rid of your wext dependencies ... this stuff is literally decades old, and while that isn't necessarily a bad thing, it also has issues that have been known for a decade or so that simply cannot be solved.

(**) git grep "bool$" and "tristate$" in Kconfig files under net/ yields a bit more, but here you already set 5, who knows. Still, even if it's only 20 in the end that's too much.

johannes

#4 lore raw
Quoted 2 lines · Johannes Berg

Also, you probably know this, but in this particular case you really should just get rid of your wext dependencies

This.

Particularly for one out-of-tree driver with which I'm intimately familiar there has been considerable recent work to make all WEXT code correctly conditional, and nothing in the Android support should be reliant upon WEXT.

#5 lore raw
In reply to Mark Salyzyn
Quoted 58 lines · Mark Salyzyn
Quoted 48 lines · Greg KH
Quoted 47 lines · Mark Salyzyn

In embedded environments the requirements are to be able to pick and chose which features one requires built into the kernel. If an embedded environment wants to supports loading modules that have been kbuilt out of tree, there is a need to enable hidden configurations for legacy wireless core features to provide the API surface for them to load.

Introduce CONFIG_LEGACY_WEXT_ALLCONFIG to select all legacy wireless extension core features by activating in turn all the associated hidden configuration options, without having to specifically select any wireless module(s).

---
v2: change name and documentation to CONFIG_LEGACY_WEXT_ALLCONFIG

---
  net/wireless/Kconfig | 14 ++++++++++++++
  1 file changed, 14 insertions(+)
net/wireless/Kconfig +13 -0
index 67f8360dfcee..0d646cf28de5 100644
@@ -17,6 +17,20 @@ config WEXT_SPY
  config WEXT_PRIV
  	bool
+config LEGACY_WEXT_ALLCONFIG
+	bool "allconfig for legacy wireless extensions"
+	select WIRELESS_EXT
+	select WEXT_CORE
+	select WEXT_PROC
+	select WEXT_SPY
+	select WEXT_PRIV
+	help
+	  Config option used to enable all the legacy wireless extensions to
+	  the core functionality used by add-in modules.
+
+	  If you are not building a kernel to be used for a variety of
+	  out-of-kernel built wireless modules, say N here.
Quoted 8 lines
Quoted 7 lines
net/wireless/Kconfig +1 -0
+
  config CFG80211
  	tristate "cfg80211 - wireless configuration API"
  	depends on RFKILL || !RFKILL
Signature · 1 line
2.23.0.187.g17f5b7556c-goog

How is this patch applicable to stable kernels???

Quoted 1 line

A) worth a shot ;-}

Not nice, please, you know better :)

Quoted 3 lines

B) there is a shortcoming in _all_ kernel versions with respect to hidden configurations options like this, hoping to set one precedent in how to handle them if acceptable to the community.

That's fine, but it's a new feature, not for stable.

Quoted 2 lines

C) [AGENDA ALERT] Android _will_ be back-porting this to android-4.19 kernel anyway, would help maintenance if via stable. <holding hat in hand>

That's fine, lots of distros backport loads of stuff for new features for stuff that is upstream. That's trivial to do, don't try to abuse the stable tree for new features like this please. It only makes maintainers grumpy when you do so :(

Quoted 4 lines

D) Not an ABI or interface break, does not introduce instability, but rather keeps downstream kernels of any distributions from having to hack in their own alternate means of dealing with this problem leading to further fragmentation.

Again, new feature, not fixing a bug, so not applicable for stable.

For penance I require a handwritten copy of:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html

thanks,

greg k-h