* Modutils 2.5 change, start running this command now
@ 2001-10-11 11:45 Keith Owens
2001-10-12 6:34 ` Ingo Oeser
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Keith Owens @ 2001-10-11 11:45 UTC (permalink / raw)
To: linux-kernel
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;'
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Modutils 2.5 change, start running this command now
2001-10-11 11:45 Modutils 2.5 change, start running this command now Keith Owens
@ 2001-10-12 6:34 ` Ingo Oeser
2001-10-12 10:04 ` Benjamin LaHaise
2001-10-15 16:05 ` [PATCH] meye camera driver EXPORT_NO_SYMBOLS Stelian Pop
2 siblings, 0 replies; 12+ messages in thread
From: Ingo Oeser @ 2001-10-12 6:34 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel
On Thu, Oct 11, 2001 at 09:45:58PM +1000, Keith Owens wrote:
> 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.
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Modutils 2.5 change, start running this command now
2001-10-11 11:45 Modutils 2.5 change, start running this command now Keith Owens
2001-10-12 6:34 ` Ingo Oeser
@ 2001-10-12 10:04 ` Benjamin LaHaise
2001-10-12 11:37 ` Keith Owens
2001-10-15 16:05 ` [PATCH] meye camera driver EXPORT_NO_SYMBOLS Stelian Pop
2 siblings, 1 reply; 12+ messages in thread
From: Benjamin LaHaise @ 2001-10-12 10:04 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel
On Thu, Oct 11, 2001 at 09:45:58PM +1000, Keith Owens wrote:
> 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.
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Modutils 2.5 change, start running this command now
2001-10-12 10:04 ` Benjamin LaHaise
@ 2001-10-12 11:37 ` Keith Owens
2001-10-12 12:14 ` David Woodhouse
0 siblings, 1 reply; 12+ messages in thread
From: Keith Owens @ 2001-10-12 11:37 UTC (permalink / raw)
To: Benjamin LaHaise; +Cc: linux-kernel
On Fri, 12 Oct 2001 06:04:20 -0400,
Benjamin LaHaise <bcrl@redhat.com> wrote:
>On Thu, Oct 11, 2001 at 09:45:58PM +1000, Keith Owens wrote:
>> 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.
>
>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.
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Modutils 2.5 change, start running this command now
2001-10-12 11:37 ` Keith Owens
@ 2001-10-12 12:14 ` David Woodhouse
2001-10-12 14:40 ` Keith Owens
2001-10-12 15:01 ` Tom Rini
0 siblings, 2 replies; 12+ messages in thread
From: David Woodhouse @ 2001-10-12 12:14 UTC (permalink / raw)
To: Keith Owens; +Cc: Benjamin LaHaise, linux-kernel
kaos@ocs.com.au 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. 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.
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Modutils 2.5 change, start running this command now
2001-10-12 12:14 ` David Woodhouse
@ 2001-10-12 14:40 ` Keith Owens
2001-10-12 15:01 ` Tom Rini
1 sibling, 0 replies; 12+ messages in thread
From: Keith Owens @ 2001-10-12 14:40 UTC (permalink / raw)
To: David Woodhouse; +Cc: Benjamin LaHaise, linux-kernel
On Fri, 12 Oct 2001 13:14:41 +0100,
David Woodhouse <dwmw2@infradead.org> wrote:
>kaos@ocs.com.au 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. 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.
>
>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.
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Modutils 2.5 change, start running this command now
2001-10-12 12:14 ` David Woodhouse
2001-10-12 14:40 ` Keith Owens
@ 2001-10-12 15:01 ` Tom Rini
1 sibling, 0 replies; 12+ messages in thread
From: Tom Rini @ 2001-10-12 15:01 UTC (permalink / raw)
To: David Woodhouse; +Cc: Keith Owens, Benjamin LaHaise, linux-kernel
On Fri, Oct 12, 2001 at 01:14:41PM +0100, David Woodhouse wrote:
>
> kaos@ocs.com.au 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. 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.
>
> 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.
--
Tom Rini (TR1265)
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] meye camera driver EXPORT_NO_SYMBOLS
2001-10-11 11:45 Modutils 2.5 change, start running this command now Keith Owens
2001-10-12 6:34 ` Ingo Oeser
2001-10-12 10:04 ` Benjamin LaHaise
@ 2001-10-15 16:05 ` Stelian Pop
2 siblings, 0 replies; 12+ messages in thread
From: Stelian Pop @ 2001-10-15 16:05 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Alan Cox
On Thu, Oct 11, 2001 at 09:45:58PM +1000, Keith Owens wrote:
> 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.
diff -uNr --exclude-from=dontdiff linux-2.4.12-ac2.orig/drivers/media/video/meye.c linux-2.4.12-ac2/drivers/media/video/meye.c
--- linux-2.4.12-ac2.orig/drivers/media/video/meye.c Sun Sep 30 21:26:06 2001
+++ linux-2.4.12-ac2/drivers/media/video/meye.c Mon Oct 15 18:01:17 2001
@@ -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)");
--
Stelian Pop <stelian.pop@fr.alcove.com>
|---------------- Free Software Engineer -----------------|
| Alcôve - http://www.alcove.com - Tel: +33 1 49 22 68 00 |
|------------- Alcôve, liberating software ---------------|
^ permalink raw reply [flat|nested] 12+ messages in thread
* Modutils 2.5 change, start running this command now
@ 2001-10-03 4:36 Keith Owens
2001-10-03 4:48 ` Robert Love
2001-10-03 8:17 ` Russell King
0 siblings, 2 replies; 12+ messages in thread
From: Keith Owens @ 2001-10-03 4:36 UTC (permalink / raw)
To: linux-kernel
In current modutils, a module that does not export symbols and does not
say EXPORT_NO_SYMBOLS defaults 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 on your system that 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` | \
awk '/file format/{file = $1}/__ksymtab/{file = ""}/\.comment/ && file != "" {print file}'
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Modutils 2.5 change, start running this command now
2001-10-03 4:36 Modutils 2.5 change, start running this command now Keith Owens
@ 2001-10-03 4:48 ` Robert Love
2001-10-03 8:17 ` Russell King
1 sibling, 0 replies; 12+ messages in thread
From: Robert Love @ 2001-10-03 4:48 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel
On Wed, 2001-10-03 at 00:36, Keith Owens wrote:
> In current modutils, a module that does not export symbols and does not
> say EXPORT_NO_SYMBOLS defaults 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.
This is an excellent move.
> 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 on your system that 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).
Once 2.5 starts, I'll be happy to go over modules with this script and
fix up stuff that is unmaintained.
> objdump -h `modprobe -l` | \
> awk '/file format/{file = $1}/__ksymtab/{file = ""}/\.comment/ && file != "" {print file}'
--
Robert M. Love
rml at ufl.edu
rml at tech9.net
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Modutils 2.5 change, start running this command now
2001-10-03 4:36 Modutils 2.5 change, start running this command now Keith Owens
2001-10-03 4:48 ` Robert Love
@ 2001-10-03 8:17 ` Russell King
2001-10-03 11:59 ` Keith Owens
1 sibling, 1 reply; 12+ messages in thread
From: Russell King @ 2001-10-03 8:17 UTC (permalink / raw)
To: Keith Owens; +Cc: linux-kernel
On Wed, Oct 03, 2001 at 02:36:24PM +1000, Keith Owens wrote:
> 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` | \
> awk '/file format/{file = $1}/__ksymtab/{file = ""}/\.comment/ && file != "" {print file}'
Sorry, your awk script is buggy - it doesn't take note of __ksymtab
after .comment:
# objdump -h /lib/modules/2.4.9-ac17/kernel/drivers/acorn/scsi/acornscsi_mod.o
/lib/modules/2.4.9-ac17/kernel/drivers/acorn/scsi/acornscsi_mod.o: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0000466c 00000000 00000000 00000034 2**2
CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE
1 .rodata 00000de6 00000000 00000000 000046a0 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .modinfo 00000028 00000000 00000000 00005488 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .data 000000bc 00000000 00000000 000054b0 2**2
CONTENTS, ALLOC, LOAD, RELOC, DATA
4 .bss 0000008c 00000000 00000000 0000556c 2**2
ALLOC
5 .comment 00000026 00000000 00000000 0000556c 2**0
CONTENTS, READONLY
6 __ksymtab 00000000 00000000 00000000 00005592 2**0
CONTENTS, READONLY
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Modutils 2.5 change, start running this command now
2001-10-03 8:17 ` Russell King
@ 2001-10-03 11:59 ` Keith Owens
0 siblings, 0 replies; 12+ messages in thread
From: Keith Owens @ 2001-10-03 11:59 UTC (permalink / raw)
To: Russell King; +Cc: linux-kernel
On Wed, 3 Oct 2001 09:17:02 +0100,
Russell King <rmk@arm.linux.org.uk> wrote:
>On Wed, Oct 03, 2001 at 02:36:24PM +1000, Keith Owens wrote:
>> 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` | \
>> awk '/file format/{file = $1}/__ksymtab/{file = ""}/\.comment/ && file != "" {print file}'
>
>Sorry, your awk script is buggy - it doesn't take note of __ksymtab
>after .comment:
Foo, I was assuming that .comment always came last. Oh well, do it the
hard way.
objdump -h `modprobe -l` | sed -ne '/__ksym/h;$b1;\:^/:!d;:1;x;s/:.*//p;'
Gotta love those sed hieroglyphics :-)
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2001-10-15 16:05 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-11 11:45 Modutils 2.5 change, start running this command now Keith Owens
2001-10-12 6:34 ` Ingo Oeser
2001-10-12 10:04 ` Benjamin LaHaise
2001-10-12 11:37 ` Keith Owens
2001-10-12 12:14 ` David Woodhouse
2001-10-12 14:40 ` Keith Owens
2001-10-12 15:01 ` Tom Rini
2001-10-15 16:05 ` [PATCH] meye camera driver EXPORT_NO_SYMBOLS Stelian Pop
-- strict thread matches above, loose matches on Subject: below --
2001-10-03 4:36 Modutils 2.5 change, start running this command now Keith Owens
2001-10-03 4:48 ` Robert Love
2001-10-03 8:17 ` Russell King
2001-10-03 11:59 ` Keith Owens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox