Re: [PATCH] Force UNIX domain sockets to be built in



On Dec 31, 2007 4:59 PM, Michael Buesch <mb@xxxxxxxxx> wrote:
On Monday 31 December 2007 16:55:57 Torsten Kaiser wrote:
One thing I always wondered about in this discussion about wasted
EXPORT_SYMBOL's:
Shouldn't it be possible to garbage collect these?

depmod already contains code to analyze all modules to create a
dependency tree. It should not be too difficult to extend it to create
a list of all symbols that really are used by the current modules.
Everything else could be stripped to save space.

The problem with that:
* out-of-tree modules would break if they don't get lucky to only use
the remaining symbol. I would not see this as a problem, if the help
text of the garbage-collect-option would contain a note like "don't
enable this if you want out-of-tree modules".
* if you later change your .config to include additional modules you
might need to rebuild vmlinux and reboot into the new kernel.
Currently you can probably build and load new modules without a
reboot. (for example: usb drivers)

I'd say the practical advantage to the user would be almost zero.
Which distribution is going to enable this option and defacto
banning external modules?

I would default this option to not remove used symbols, because it
could break something.
For distributions it could be used in both ways:
* enabled -> only "distro approved" modules can be loaded
* disabled -> works as of now

For every other user who compiles own kernels without external modules
(Not including out-of-tree drivers that get patched into the kernel
code! Only modules that get compiled later independent from the kernel
build!) it will save space.

If this space would not matter there would be no need to be so hard on
currently unused EXPORT_SYMBOLs.

Torsten
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: eradicating out of tree modules
    ... crashes of "the Linux kernel" caused by some binary-only driver. ... This harms the reputation of Linux as being stable. ... for breaking out-of-tree open source modules is throwing out the baby ...
    (Linux-Kernel)
  • Re: eradicating out of tree modules
    ... crashes of "the Linux kernel" caused by some binary-only driver. ... for breaking out-of-tree open source modules is throwing out the baby ... modules now and promising an in-tree alternative for later leaves ...
    (Linux-Kernel)
  • Re: megaraid_mbox: garbage in file
    ... readed from the Indirect block. ... I found this garbage present in data buffers ... When I use kernel with 4Gb memory limit -- the same cat command return me ... And why I can workaround this issue by using only 4Gb memory? ...
    (Linux-Kernel)
  • Re: [PATCH] capability: WARN when invalid capability is requested rather than BUG/panic
    ... Eric Paris wrote: ... back to pre-2.6.25 operation (garbage in garbage out but no ... 'extra' overhead to EPERM there instead of here (garbage in EPERM ... Do we have any concern of a module being compiled against a new kernel ...
    (Linux-Kernel)
  • Re: [PATCH] IRQ: ease out-of-tree migration to new irq_handler prototype
    ... Backportable drives can do: ... Backportable drivers should check kernel version themselves and define ... things easier for low-life out-of-tree maintainers. ...
    (Linux-Kernel)