mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Adam J. Richter" <adam@yggdrasil.com>
To: vandrove@vc.cvut.cz, zippel@linux-m68k.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFC] module fs or how to not break everything at once
Date: Thu, 21 Nov 2002 15:21:11 -0800	[thread overview]
Message-ID: <200211212321.PAA16033@adam.yggdrasil.com> (raw)

Hi Roman,

	Can you tell me what problem in the existing userland module
code (i.e., before 2.5.48) modulefs solves?  Does it actually make
the kernel smaller?  Can you give me an example?

	I agree with you that module linking should be done in user
space.  I have asked repeatedly for someone to show real benefits to
in-kernel module linking, and, so far, nobody has.  To my knowledge,
your proposal hasn't passed this test either, but I'll make a few
suggestions on it anyway.

	1. Please take Petr's advice and just make module removal
occur when you rmdir the directory.  Making the removal happen in
two stages introduces additioal states that have to be defined, such
as the state where the "module unmap" command has been received
but the module's directory has been removed.  What if somebody else
wants to load the same module again at this time?  Either you will
get flakiness in facilities that rely on automatic kernel module
loading or modprobe has to be modified to deal with that
possibility and perhaps try to do the remove itself.

	2. I would really like insmod to be able to flock modules (or
do something similar).  This would increment the reference count on a
module until insmod would exit (or would do an execve, I suppose).
This would eliminate a race when insmod is loading a module that
references symbols in other modules.  I don't think flock is actually
propagated down the vfs layer, so perhaps some other primitive could be
used.  Perhaps just holding open an open file descriptor on each of
the modules in question would be a better interface.

	3. It's not a modulefs thing, but you might want to consider
moving all symbol management to user space, including that for the
core kernel symbols.  The symbol tables can be maintained in user
files by the insmod and rmmod programs, they could even be inferred
from the module's start address and the module's .o in the file
system.  If people really want to store this data to be stored in
kernel memory, they can allocate extra space where the module is
actually loaded and their favorite symbol table format there.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

             reply	other threads:[~2002-11-21 23:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-21 23:21 Adam J. Richter [this message]
2002-11-22 10:50 ` Roman Zippel
  -- strict thread matches above, loose matches on Subject: below --
2002-11-23  4:58 Adam J. Richter
2002-11-23 12:34 ` Roman Zippel
2002-11-22 22:11 Adam J. Richter
2002-11-22 23:24 ` Roman Zippel
2002-11-22 18:10 Adam J. Richter
2002-11-22 20:28 ` Roman Zippel
2002-11-21 23:59 Adam J. Richter
2002-11-20 21:06 Roman Zippel
2002-11-20 22:03 ` Petr Vandrovec
2002-11-20 23:32   ` Roman Zippel
2002-11-21  1:59     ` Petr Vandrovec
2002-11-21 19:46       ` Roman Zippel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200211212321.PAA16033@adam.yggdrasil.com \
    --to=adam@yggdrasil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vandrove@vc.cvut.cz \
    --cc=zippel@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®