* 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ 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; 8+ 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] 8+ messages in thread
end of thread, other threads:[~2001-10-15 16:05 UTC | newest]
Thread overview: 8+ 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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®