linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: "David S. Miller" <davem@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	Werner Almesberger <wa@almesberger.net>,
	"Alexey N. Kuznetsov" <kuznet@ms2.inr.ac.ru>,
	kronos@kronoz.cjb.net, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Migrating net/sched to new module interface
Date: Thu, 16 Jan 2003 17:05:02 +0100	[thread overview]
Message-ID: <3E26D82E.35A57506@linux-m68k.org> (raw)
In-Reply-To: 1042691130.13364.1.camel@rth.ninka.net

Hi,

"David S. Miller" wrote:

> On Wed, 2003-01-15 at 19:31, Rusty Russell wrote:
> > The ONLY time that FUNCTIONS vanish is when MODULES get UNLOADED (or
> > fail to LOAD).
> 
> I totally agree with Rusty.  If you don't understand this fundamental
> difference between module unloading vs. arbitrary kernel objects
> going away, then you really need to apply some gray matter to it
> before you continue in this conversation :)

Above is not really not wrong, but there is still no fundamental
difference to other kernel objects. We will get this wrong as long as we
see functions as some kind of very special case, this is simply not
true.
Module functions are nothing else than readonly data structures, which
are allocated and initialized in module.c, by calling init_module() the
ownership is transferred to the module. How the ownership is transferred
back is now (hopefully) the point of the discussion. The only thing
special here is that the data possibly needs to be flushed out of the
data cache, before it can be used as a function. Besides of this there
is not a single technical difference to other reference counted data
structures, just the implementations differ.
Functions are not the only thing that vanish when modules get unloaded.
It's a lot more common to register functions via data structures and it
would be very foolish to think that only the functions need protecting.
In the first place one has to get access to the data structure, only
then the functions can be safely used. Again, how these data structures
are allocated doesn't matter, but at any time we have to know, who owns
these data structures, so that we can safely remove and deallocate them.

bye, Roman



  parent reply	other threads:[~2003-01-16 18:33 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-02 22:50 [RFC] Migrating net/sched to new module interface Kronos
2003-01-03  5:10 ` Rusty Russell
2003-01-03  8:37   ` David S. Miller
2003-01-04  6:09     ` Rusty Russell
2003-01-04 16:21       ` Kronos
2003-01-13 22:32   ` kuznet
2003-01-13 23:23     ` Max Krasnyansky
2003-01-14 17:49     ` Kronos
2003-01-15  0:21       ` Roman Zippel
2003-01-15  1:19         ` kuznet
2003-01-15  7:31           ` Werner Almesberger
2003-01-15  8:16             ` Rusty Russell
2003-01-15  9:33               ` Werner Almesberger
2003-01-16  1:12                 ` Rusty Russell
2003-01-16  2:42                   ` Werner Almesberger
2003-01-16  3:31                     ` Rusty Russell
2003-01-16  4:20                       ` Werner Almesberger
2003-01-16  4:25                       ` David S. Miller
2003-01-16  4:49                         ` Werner Almesberger
2003-01-16 16:05                         ` Roman Zippel [this message]
2003-01-16 18:15                     ` Roman Zippel
2003-01-16 18:58                       ` Werner Almesberger
2003-01-16 23:53                         ` Roman Zippel
2003-01-17  1:04                           ` Greg KH
2003-01-17  2:27                     ` Rusty Russell
2003-01-17 21:40                       ` Roman Zippel
2003-02-13 23:16                       ` Werner Almesberger
2003-02-14  1:57                         ` Rusty Russell
2003-02-14  3:44                           ` Werner Almesberger
2003-02-14 11:16                           ` Roman Zippel
2003-02-14 12:04                             ` Rusty Russell
2003-02-14 12:49                               ` Roman Zippel
2003-02-17  1:59                                 ` Rusty Russell
2003-02-17 10:53                                   ` Roman Zippel
2003-02-17 23:31                                     ` Rusty Russell
2003-02-18 12:26                                       ` Roman Zippel
2003-02-14 13:21                               ` Roman Zippel
2003-02-14 13:53                                 ` Werner Almesberger
2003-02-14 14:24                                   ` Roman Zippel
2003-02-14 18:30                                     ` Werner Almesberger
2003-02-14 20:09                                       ` Roman Zippel
2003-02-15  0:12                                         ` Werner Almesberger
2003-02-15  0:51                                           ` Roman Zippel
2003-02-15  2:28                                             ` Werner Almesberger
2003-02-15 23:20                                               ` Roman Zippel
2003-02-17 17:04                                                 ` Werner Almesberger
2003-02-17 23:09                                                   ` [RFC] Is an alternative module interface needed/possible? Roman Zippel
2003-02-18  1:18                                                     ` Werner Almesberger
2003-02-18  4:54                                                       ` Rusty Russell
2003-02-18  7:20                                                         ` Werner Almesberger
2003-02-18 12:06                                                           ` Roman Zippel
2003-02-18 14:12                                                             ` Werner Almesberger
2003-02-18 12:45                                                               ` Thomas Molina
2003-02-18 17:22                                                               ` Werner Almesberger
2003-02-19  3:30                                                                 ` Rusty Russell
2003-02-19  4:11                                                                   ` Werner Almesberger
2003-02-19 23:38                                                                     ` Rusty Russell
2003-02-20  9:46                                                                       ` Roman Zippel
2003-02-20  0:40                                                                 ` Roman Zippel
2003-02-20  2:17                                                                   ` Werner Almesberger
2003-02-23 16:02                                                                     ` Roman Zippel
2003-02-26 23:26                                                                       ` Werner Almesberger
2003-02-27 12:34                                                                         ` Roman Zippel
2003-02-27 13:20                                                                           ` Werner Almesberger
2003-02-27 14:33                                                                             ` Roman Zippel
2003-02-23 23:34                                                                 ` Kevin O'Connor
2003-02-24 12:14                                                                   ` Roman Zippel
2003-02-18 12:35                                                           ` Roman Zippel
2003-02-18 14:14                                                             ` Werner Almesberger
2003-02-19  1:48                                                       ` Roman Zippel
2003-02-19  2:27                                                         ` Werner Almesberger
2003-01-16 13:44                   ` [RFC] Migrating net/sched to new module interface Roman Zippel
2003-01-15 17:04               ` 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=3E26D82E.35A57506@linux-m68k.org \
    --to=zippel@linux-m68k.org \
    --cc=davem@redhat.com \
    --cc=kronos@kronoz.cjb.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=wa@almesberger.net \
    /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;
as well as URLs for NNTP newsgroup(s).