public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Coywolf Qi Hunt <coywolf@gmail.com>
To: "Tomar, Nagendra" <nagendra_tomar@adaptec.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>, linux-kernel@vger.kernel.org
Subject: Re: Why does insmod _not_ check for symbol redefinition ??
Date: Thu, 1 Dec 2005 13:25:50 +0800	[thread overview]
Message-ID: <2cd57c900511302125g9e771c6w@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0512010926460.1697-100000@localhost.localdomain>

2005/12/1, Nagendra Singh Tomar <nagendra_tomar@adaptec.com>:
> On Thu, 1 Dec 2005, Rusty Russell wrote:
>
> > Sure.  It was due to minimalism.  If you override a symbol it's
> > undefined behavior.  It should be fairly simple to add a check that
> > noone overrides a symbol.  We didn't bother checking for it because it
> > wasn't clear that it was problematic.
>
> Thanx.
> Of all the problems (including kernel crashes, BUGs etc) one of the
> more serious  kinds are the ones where someone writes a new module and
> accidently  defines a function which has the same name as one of functions
> (say  foo_export),  already EXPORTed by either kernel proper or some
> loaded  module (as the  kernel is growing bigger chances of this happening
> is also  growing). The module happily loads and then some other module
> which wants  to use the function foo_export (obviously the one EXPORTed by
> kernel  proper and not the one overidden by the overiding module) is
> loaded. It  will also load happily but will get linked against the new
> foo_export,  defnitely not something that he wants. And, all this has
> happened without the kernel telling the user anything.
>         IMHO, these kind of silent errors are very dangerous and not
> something that should be acceptable.
> As you rightly said, it should be fairly straightforward to check for
> symbol redefinition. We need to do it only for the symbols EXPORTed by the
> loadable module.

This shouldn't happen if you only use in-tree modules as you should.
Don't take kernel modules as user mode applications.
--
Coywolf Qi Hunt
http://sosdg.org/~coywolf/

  reply	other threads:[~2005-12-01  5:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <c216304e0511242042h30fccd74ic2b1d5b237e2afc0@mail.gmail.com>
2005-11-25  5:15 ` Why does insmod _not_ check for symbol redefinition ?? Nagendra Singh Tomar
2005-12-01  0:57   ` Rusty Russell
2005-12-01  4:12     ` Nagendra Singh Tomar
2005-12-01  5:25       ` Coywolf Qi Hunt [this message]
2005-11-25 15:51 Parag Warudkar
  -- strict thread matches above, loose matches on Subject: below --
2005-11-24  7:54 Nagendra Singh Tomar

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=2cd57c900511302125g9e771c6w@mail.gmail.com \
    --to=coywolf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nagendra_tomar@adaptec.com \
    --cc=rusty@rustcorp.com.au \
    /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