mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kaih@khms.westfalen.de (Kai Henningsen)
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] linuxabi
Date: 03 Oct 2003 18:49:00 +0200	[thread overview]
Message-ID: <8v8r7cxHw-B@khms.westfalen.de> (raw)
In-Reply-To: <fa.e2g5r6g.u3igb4@ifi.uio.no>

aebr@win.tue.nl (Andries Brouwer)  wrote on 02.10.03 in <fa.e2g5r6g.u3igb4@ifi.uio.no>:

> Now you come with comment #2: write LINUX_MS_RDONLY instead of
> MS_RDONLY. You have not convinced me.

The argument is fairly simple.

The main idea is that we expect glibc to use these includes to talk to the  
kernel, and that we expect glibc to at least in part do that by including  
these files from the glibc includes.

So this means userspace is bound to see these declarations.

So this means namespace cleanliness issues come up.

Also, we know that glibc likes to have an ABI that's different from the  
kernel ABI.

So we can't use the POSIX names for these things, or we'd create serious  
problems for glibc actually using this stuff.

Now, what namespace to use?

I think the rules here are clear: it MUST be part of the namespace  
reserved for language implementation, which is /^_[_A-Z][a-zA-Z_0-9]*$/.  
Also, it SHOULD be something we're fairly certain nobody else will be  
using.

There's one more thing here. Sometimes things change. We should consider  
having some sort of standard way of indicating a version in the name, AND  
WE SHOULD USE IT FROM THE FIRST VERSION ON, so that there's never a need  
to change the definition of a symbol, and there's never a need to invent a  
name like new_new_new_foo.

Let me repeat and slightly rephrase that point:

Symbols in the ABI includes should *NEVER* change their definition. Use  
new symbols for new definitions. Glibc should be able to rely on knowing  
that, say, _Linux_20_stat_t will always describe the stat_t to use on  
Linux 2.0 and compatible kernels.

Remember, these things describe an ABI. To be useful, there has to be a  
1:1 correspondence between names and ABI. It's glibc above and kernel  
below who actually do compatibility conversions, it's not the job of the  
ABI descriptions. (Except in the form of comments.)

MfG Kai

  parent reply	other threads:[~2003-10-03 17:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-01  0:01 Andries.Brouwer
2003-10-01  2:05 ` Bernd Eckenfels
2003-10-01  3:34   ` viro
2003-10-01  4:52     ` H. Peter Anvin
2003-10-01  5:22       ` Philippe Troin
2003-10-01  5:50         ` Miles Bader
2003-10-01 14:33     ` Daniel Jacobowitz
2003-10-01 10:20 ` J.A. Magallon
2003-10-02 14:39 ` Eric W. Biederman
2003-10-02 15:33   ` Andries Brouwer
2003-10-03  7:36     ` Eric W. Biederman
2003-10-04  3:37       ` Rob Landley
2003-10-04  6:31         ` Erik Andersen
     [not found]   ` <fa.e2g5r6g.u3igb4@ifi.uio.no>
2003-10-03 16:49     ` Kai Henningsen [this message]
2003-10-03 17:32   ` Sam Ravnborg
     [not found] <BCSP.62t.7@gated-at.bofh.it>
     [not found] ` <CcWl.7kh.9@gated-at.bofh.it>
     [not found]   ` <CdIL.8ts.13@gated-at.bofh.it>
2003-10-03 14:02     ` Ihar 'Philips' Filipau

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=8v8r7cxHw-B@khms.westfalen.de \
    --to=kaih@khms.westfalen.de \
    --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

all inboxes | Powered by JetHome®