Modutils 2.5 change, start running this command now
Repeat for anybody who ignored this request the first time.
In current modutils, a module that does not export symbols and does not say EXPORT_NO_SYMBOLS will default to exporting all symbols. This is a hangover from kernel 2.0 and will be removed when modutils 2.5 appears, shortly after the kernel 2.5 branch is created.
Starting with modutils 2.5, modules must explicitly say what their intention is for symbols. That will break a lot of existing modules.
The command below lists the modules that are compiled on your system and will be affected. All code maintainers need to run this against their 2.4 modules and do one of two things. Either export the required symbols (remember to add the .o file to export-objs in the Makefile) or add EXPORT_NO_SYMBOLS; somewhere in the module (no change to Makefile).
objdump -h modprobe -l | sed -ne '/__ksym/h;$b1;\:^/:!d;:1;x;s/:.*//p;'
Quoted 4 lines · Keith Owens
In current modutils, a module that does not export symbols and does not say
EXPORT_NO_SYMBOLSwill default to exporting all symbols. This is a hangover from kernel 2.0 and will be removed when modutils 2.5 appears, shortly after the kernel 2.5 branch is created.
Will it still be done, if we put it on the "export-objs" list?
Putting an explicit "EXPORT_SYMBOL(foo)" only encourages people not to look what they can prepend with "static". Everything not static is the C-definition of "exporting".
EXPORT_SYMBOL is nice, if you have modules consisting of multiple objects, that need to share variables/functions but should not be needed, if the module-author knows sth. about proper design.
Regards
Ingo Oeser
Quoted 7 lines · Keith Owens
In current modutils, a module that does not export symbols and does not say
EXPORT_NO_SYMBOLSwill default to exporting all symbols. This is a hangover from kernel 2.0 and will be removed when modutils 2.5 appears, shortly after the kernel 2.5 branch is created.Starting with modutils 2.5, modules must explicitly say what their intention is for symbols. That will break a lot of existing modules.
Isn't EXPORT_NO_SYMBOLS the default case for 99.44% of modules? It seems to me that the lameness incurred in adding an EXPORT_NO_SYMBOLS line to each and every driver that one writes is a pointless additional hoop to jump through. I'd rather break the modules that are relying on behaviour that was deprecated several *years* ago than go through another make-work project.
-ben
Quoted 9 lines · Benjamin LaHaise
Quoted 7 lines · Keith Owens
In current modutils, a module that does not export symbols and does not say
EXPORT_NO_SYMBOLSwill default to exporting all symbols. This is a hangover from kernel 2.0 and will be removed when modutils 2.5 appears, shortly after the kernel 2.5 branch is created.Starting with modutils 2.5, modules must explicitly say what their intention is for symbols. That will break a lot of existing modules.
Quoted 6 lines
Isn't
EXPORT_NO_SYMBOLSthe default case for 99.44% of modules? It seems to me that the lameness incurred in adding anEXPORT_NO_SYMBOLSline to each and every driver that one writes is a pointless additional hoop to jump through. I'd rather break the modules that are relying on behaviour that was deprecated several *years* ago than go through another make-work project.
I was going to do it that way. The problem is that it gives no indication if the module has been checked or not. Adding EXPORT_NO_SYMBOLS says that somebody has reviewed the module and decided that exporting no symbols is the correct behaviour. It is the difference between no maintainer and a maintained module.
Quoted 5 lines · [email protected] said:
I was going to do it that way. The problem is that it gives no
indication if the module has been checked or not. AddingEXPORT_NO_SYMBOLSsays that somebody has reviewed the module and decided that exporting no symbols is the correct behaviour. It is the difference between no maintainer and a maintained module.
If all you want to know is whether modules are maintained or not, look to see how many have had MODULE_LICENSE(sic) tags added.
Just change the default to no exported symbols, and a single depmod pass will tell you what broke because it's no longer exporting symbols which are required by something else. There's no need to add the EXPORT_NO_SYMBOLS cruft all over the place.
Adding EXPORT_NO_SYMBOLS to those modules which don't need to export symbols doesn't make your task any easier - so please don't do it. Let's kill EXPORT_NO_SYMBOLS altogether.
--
dwmw2
Quoted 11 lines · David Woodhouse
Quoted 5 lines · [email protected] said:
I was going to do it that way. The problem is that it gives no
indication if the module has been checked or not. AddingEXPORT_NO_SYMBOLSsays that somebody has reviewed the module and decided that exporting no symbols is the correct behaviour. It is the difference between no maintainer and a maintained module.Just change the default to no exported symbols, and a single depmod pass will tell you what broke because it's no longer exporting symbols which are required by something else. There's no need to add the
EXPORT_NO_SYMBOLScruft all over the place.
Your approach is "make an incompatible change and see what breaks, then scramble to fix it". My approach is "get ready for this change so we can have a clean cutover". Also EXPORT_NO_SYMBOLS is the only way to clean up 2.4 and 2.2 kernels, there is no option to make an incompatible change to modutils there.
Quoted 10 lines · David Woodhouse
Quoted 5 lines · [email protected] said:
I was going to do it that way. The problem is that it gives no
indication if the module has been checked or not. AddingEXPORT_NO_SYMBOLSsays that somebody has reviewed the module and decided that exporting no symbols is the correct behaviour. It is the difference between no maintainer and a maintained module.If all you want to know is whether modules are maintained or not, look to see how many have had
MODULE_LICENSE(sic)tags added.
Not really. There's been people auditing the drivers, which is probably what would happen here. Either way even. Forcing a break will make it much more obvious is all.
Signature · 2 lines
Tom Rini (TR1265) http://gate.crashing.org/~trini/
PATCH 1/1 meye camera driver EXPORT_NO_SYMBOLS
In reply to Keith OwensQuoted 2 lines · Keith Owens
Starting with modutils 2.5, modules must explicitly say what their intention is for symbols. That will break a lot of existing modules.
Here is the patch for drivers/media/video/meye.c
Stelian.
drivers/media/video/meye.c +1 -0
@@ -1482,6 +1482,7 @@MODULE_DESCRIPTION ("video4linux driver for the MotionEye camera" );MODULE_LICENSE ("GPL" ); +EXPORT_NO_SYMBOLS ;MODULE_PARM (gbuffers,"i" );MODULE_PARM_DESC (gbuffers,"number of capture buffers, default is 2 (32 max)" );
Signature · 4 lines
Stelian Pop <[email protected]> |---------------- Free Software Engineer -----------------| | Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 | |------------- Alcôve, liberating software ---------------|