From: Christian Zander <phoenix@minion.de>
To: linux-kernel@vger.kernel.org
Cc: Keith Owens <kaos@ocs.com.au>
Subject: Re: Where did vm_operations_struct->unmap in 2.4.0 go?
Date: Fri, 12 Jan 2001 20:11:30 +0100 [thread overview]
Message-ID: <20010112201130.A710@chronos> (raw)
In-Reply-To: <3A5EFC56.F1A5BCE0@mira.net>
In-Reply-To: <3A5EFC56.F1A5BCE0@mira.net>; from antony@mira.net on Fri, Jan 12, 2001 at 11:45:10PM +1100
[-- Attachment #1: Type: text/plain, Size: 2777 bytes --]
> >> I ran into this while hacking the Nvidia kernel driver to work with
> >> 2.4.0. I got the driver working but it's not 100%
> >>
> >> Also where did get_module_symbol() and put_module_symbol() go?
> >
> >Patches for the NVIDIA binary X drivers following all these kernel
> >changes can be gotten from IRC server irc.openprojects.net, channel
> >#nvidia. Or from http://ex.shafted.com.au/nvidia/
>
> And what a pile of crud those patches are!! Instead of using the clean
> replacement interface for get_module_symbol, nvidia/patch-2.4.0-PR hard
> codes the old get_module_symbol algorithm as inline code.
>
> This patch violates the modules interface by accessing modules.c
> internal data. It still suffers from all the problems that
> get_module_symbol had. Because it is hard coded as inline code instead
> of a common function, will be much harder to fix when it breaks.
>
The way I understand the inter_module mechanism, module A registers one
or several of its symbols using inter_module_register to make it or them
available to other modules. Module B can then request any of the symbols
with inter_module_request and get a pointer. The inter_module mechanism
guarantees that the symbol will be available until module B decides that
the symbol is no longer needed and releases it by calling inter_module_put.
Saying that I should have made use of this mechanism for the specific
code in the Nvidia driver that we are talking about clearly shows that
you didn't look at it. The module used get_module_symbol to search its
own symbol table for parameters that may have been passed to it at load
time. Arguably, this is bad practise, but it is also the reason why using
your mechanism doesn't make any sense. Obviously, the module wouldn't
want to register private data to request it later on; the information
that would have to be passed to inter_module_register is the same that
the code in question intends to retrieve in the first place.
Contrary to what you're saying, the patch does not just inline the old
get_module_symbol algorithm nor does it access any of module.c's internal
data. What is does is to browse the list of the modules's _own_ symbols
looking for a match. If it finds one, it returns the desired data.
> Whoever coded that patch should be taken out and shot, hung, drawn and
> quartered then forced to write COBOL for the rest of their natural
> life.
Excellent comment - it is just as appropriate as it is helpful.
--
----------------------------------------------------------------------
christian zander we come to bury dos, not to praise it.
zander@hdz.uni-dortmund.de -- paul vojta
----------------------------------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next parent reply other threads:[~2001-01-12 19:12 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3A5EFC56.F1A5BCE0@mira.net>
2001-01-12 19:11 ` Christian Zander [this message]
2001-01-13 1:11 ` Where did vm_operations_struct->unmap in 2.4.0 go? Keith Owens
2001-01-13 10:46 ` David Woodhouse
2001-01-13 12:06 ` Keith Owens
2001-01-13 15:09 ` David Woodhouse
2001-01-13 19:03 ` Russell King
2001-01-14 0:21 ` Keith Owens
2001-01-14 9:43 ` David Woodhouse
2001-01-14 10:05 ` Keith Owens
2001-01-14 10:45 ` David Woodhouse
2001-01-14 4:04 ` Linus Torvalds
2001-01-14 17:46 ` David Woodhouse
2001-01-14 19:12 ` Linus Torvalds
2001-01-14 20:02 ` David Woodhouse
2001-01-14 20:15 ` Linus Torvalds
2001-01-14 21:15 ` David Woodhouse
2001-01-14 21:47 ` Linus Torvalds
2001-01-14 21:57 ` David Woodhouse
2001-01-14 23:00 ` Keith Owens
2001-01-15 9:09 ` David Woodhouse
2001-01-13 11:46 ` Christian Zander
2001-01-13 12:23 ` Keith Owens
2001-01-10 3:27 Allen Unueco
2001-01-10 3:50 ` Keith Owens
2001-01-11 5:38 ` Antony Suter
2001-01-11 6:05 ` Keith Owens
2001-01-11 11:42 ` David Woodhouse
2001-01-11 12:12 ` Keith Owens
2001-01-11 12:32 ` David Woodhouse
2001-01-11 12:46 ` Keith Owens
2001-01-11 13:09 ` Alan Cox
2001-01-11 13:14 ` Keith Owens
2001-01-12 2:12 ` Ingo Oeser
2001-01-12 2:30 ` Keith Owens
2001-01-12 10:27 ` David Woodhouse
2001-01-12 11:55 ` Keith Owens
2001-01-12 13:40 ` David Woodhouse
2001-01-12 12:01 ` Daniel Phillips
2001-01-12 12:18 ` Keith Owens
2001-01-14 10:16 ` Kai Henningsen
2001-01-11 13:25 ` David Woodhouse
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=20010112201130.A710@chronos \
--to=phoenix@minion.de \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.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