From: Keith Owens <kaos@ocs.com.au>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux_developer@hotmail.com (Linux Kernel Developer),
linux-kernel@vger.kernel.org
Subject: Re: Need info on the use of certain datastructures and the first C++ keyword patch for 2.2.17
Date: Tue, 31 Oct 2000 00:56:58 +1100 [thread overview]
Message-ID: <4572.972914218@ocs3.ocs-net> (raw)
In-Reply-To: Your message of "Mon, 30 Oct 2000 13:41:40 -0000." <E13qFC1-0006t5-00@the-village.bc.nu>
On Mon, 30 Oct 2000 13:41:40 +0000 (GMT),
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>Keith Owens wrote
>> >You may find that creating your own wrappers for these files that do
>> >
>> >extern "C" {
>> >#define new new_
>> >#define private private_
>> >#include <linux/foo.h>
>> >#undef new
>> >#undef private
>> >}
>> >
>> >safer, since you won't break anything
>>
>> It breaks module symbol versions, see earlier mail to l-k.
>
>I don't believe that is the case.
>
>You compute the modversions against the C header files. You include the C++
>header files in a C++ module and you include the module version file directly.
>Your symbols match providing you don't have an object called private or new
>that is globally exported. We don't seem to have any of those
There is a deficiency in modversions which has been there since the
start. Symbol versions assume that the kernel header files and the
module version file are in sync but this has never been guaranteed. I
have seen people compile (outside the kernel) with headers from kernel
2.2.x and modversions from kernel 2.3.x, the checksums "match" the 2.3
kernel so the module loaded but they used the wrong headers, splat!
As part of the 2.5 kbuild redesign, symbol versions will be completely
redone. One of the things on my todo list is to detect this mismatch.
There are some problems in doing that which I may or may not be able to
overcome, but if the field names are different between C and C++ then I
can never detect this mismatch correctly.
Please do not use different structure field names in kernel and modules.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-10-30 13:57 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-10-30 11:09 Need info on the use of certain datastructures and the first C++ keyword patch for 2.2.17 Linux Kernel Developer
2000-10-30 12:00 ` J . A . Magallon
2000-10-30 12:46 ` Keith Owens
2000-10-31 8:13 ` Linux Kernel Developer
2000-10-30 13:04 ` Alan Cox
2000-10-30 13:20 ` Keith Owens
2000-10-30 13:41 ` Alan Cox
2000-10-30 13:56 ` Keith Owens [this message]
2000-10-30 14:02 ` Alan Cox
2000-10-30 14:08 ` Keith Owens
2000-10-30 18:16 ` Alan Cox
2000-10-30 21:04 ` Keith Owens
2000-10-31 8:13 ` Linux Kernel Developer
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=4572.972914218@ocs3.ocs-net \
--to=kaos@ocs.com.au \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_developer@hotmail.com \
/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