Add note that lockdep is not allowed with non-GPL modules
PATCH 1/1 Add note that lockdep is not allowed with non-GPL modules
Hi Ingo,
can you add this small notice to the lockdep option ?
Lock dependency infrastructure forces all legacy code which uses lock to now depend on lockdep_init_map symbol, which is GPL-only. It means that almost no modules can work on kernel with CONFIG_LOCKDEP set. Let's warn user about that.
vmmon: module license 'unspecified' taints kernel.
vmmon: Unknown symbol lockdep_init_map
Thanks,
Petr Vandrovec
lib/Kconfig.debug +3 -0
@@ -214,6 +214,9 @@ For more details, see Documentation/lockdep-design.txt. + Do not enable this option if you are using non-GPL modules, or + they will fail to load due to missing symbol lockdep_init_map. + config LOCKDEP bool depends on TRACE_IRQFLAGS_SUPPORT && STACKTRACE_SUPPORT && LOCKDEP_SUPPORT
Quoted 7 lines · Petr Vandrovec
Hi Ingo,
can you add this small notice to the lockdep option ?Lock dependency infrastructure forces all legacy code which uses lock to now depend on
lockdep_init_mapsymbol, which is GPL-only. It means that almost no modules can work on kernel withCONFIG_LOCKDEPset. Let's warn user about that.
IANIngo, but the warning is already there:
* Proprietary module user probably already knows that major deviations from .config and kernel its module is released is no-no.
* Unknown symbol name contains "lockdep" which attentive proprietary module user will notice and correlate with enabling lockdep 5 minutes ago.
* Tomorrow Ingo will change it's name, add a couple of new lockdep only exports so should he update help text every time _he_ changes _his_ code?
* Would you add similar notice to inotify help text? It also exports GPL-only symbols doncha know. Would you add such notices to everything exporting GPL-only symbols?
lib/Kconfig.debug line 218
Quoted 5 lines
vmmon: module license 'unspecified' taints kernel.
vmmon: Unknown symbollockdep_init_maplib/Kconfig.debug +2
-0+ Do not enable this option if you are using non-GPL modules, or + they will fail to load due to missing symbol lockdep_init_map.
Lock validor found a bug in NVidia driver, film at 11.
Quoted 11 lines · Alexey Dobriyan
Quoted 7 lines · Petr Vandrovec
Hi Ingo,
can you add this small notice to the lockdep option ?Lock dependency infrastructure forces all legacy code which uses lock to now depend on
lockdep_init_mapsymbol, which is GPL-only. It means that almost no modules can work on kernel withCONFIG_LOCKDEPset. Let's warn user about that.
Quoted 3 lines
IANIngo, but the warning is already there:
* Proprietary module user probably already knows that major deviations from .config and kernel its module is released is no-no.
Uh? How it comes? VMware modules work in any kernel configuration and architecture. With exception of vmmon, which contains inline assembly for i386 & x86-64 only. But all configs are supported.
Quoted 3 lines
* Would you add similar notice to inotify help text? It also exports GPL-only symbols doncha know. Would you add such notices to everything exporting GPL-only symbols?
This is just nonsense. I am not talking about using new API, I'm saying that API which was not GPL-only without lockdep has GPL-only portion with lockdep, and this GPL-only portion is needed by implementation of code which existed before lockdep. To me this looks like unexpected change of kernel API, and as such should be documented and warned about.
Quoted 9 lines
lib/Kconfig.debug line 218
Quoted 6 lines
vmmon: module license 'unspecified' taints kernel.
vmmon: Unknown symbollockdep_init_maplib/Kconfig.debug +2
-0+ Do not enable this option if you are using non-GPL modules, or + they will fail to load due to missing symbol lockdep_init_map.Lock validor found a bug in NVidia driver, film at 11.
I have no idea how NVidia managed to work around that problem, but VMware modules suddenly depend on this GPL-only symbol, although nothing in the module sources refers to lockdep (same sources which worked yesterday are being used).
Thanks,
Petr Vandrovec
Quoted 1 line · Petr Vandrovec
Quoted 1 line
Lock validor found a bug in NVidia driver, film at 11.
It almost certainly didn't, as you have to do some major ugly and evil things to get the NVidia driver to build (it won't pass modpost if the kernel is built with lockdep due to the GPL-only exports that get sucked in).
Quoted 4 lines
I have no idea how NVidia managed to work around that problem, but VMware modules suddenly depend on this GPL-only symbol, although nothing in the module sources refers to lockdep (same sources which worked yesterday are being used).
It doesn't reference it directly - it gets sucked in via a #define.
Quoted 5 lines · [email protected] wrote:
Quoted 1 line · Petr Vandrovec
Quoted 1 line
Lock validor found a bug in NVidia driver, film at 11.
Quoted 8 lines
It almost certainly didn't, as you have to do some major ugly and evil things to get the NVidia driver to build (it won't pass modpost if the kernel is built with lockdep due to the GPL-only exports that get sucked in).
Quoted 1 line
I have no idea how NVidia managed to work around that problem, but VMware modules suddenly depend on this GPL-only symbol, although nothing in the module sources refers to lockdep (same sources which worked yesterday are being used).
It doesn't reference it directly - it gets sucked in via a #define.
VMware code is shoot down due to use of init_waitqueue_head(). It is now virtually GPL-only because it is inlined and uses GPL-only function lockdep_init_map :-(
Petr