All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: Ralf Baechle <ralf@uni-koblenz.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RFC] global errno considered harmful
Date: Sun, 30 Dec 2001 17:10:41 -0500	[thread overview]
Message-ID: <3C2F90E1.DADE7F54@didntduck.org> (raw)
In-Reply-To: <20011230110623.A17083@gnu.org> <200112301956.OAA02630@ccure.karaya.com> <20011230190020.A14157@dea.linux-mips.net>

Ralf Baechle wrote:
> 
> On Sun, Dec 30, 2001 at 02:56:21PM -0500, Jeff Dike wrote:
> 
> > buytenh@gnu.org said:
> > > Is there any particular reason we need a global errno in the kernel at
> > > all? (which, by the way, doesn't seem to be subject to any kind of
> > > locking)
> >
> > As far as I've been able to tell, no.
> 
> Historically the reason was to make unistd.h usable from userspace.  Which
> is causing tremendous portability problems so apps better shouldn't think
> about using the syscall interface directly.
> 
> > > It makes life for User Mode Linux somewhat more complicated
> > > than it could be, and it generally just seems a bad idea.
> >
> > Yeah.  In order for -fno-common to not blow up the UML build (because of the
> > clash between libc errno and kernel errno), I had to add -Derrno=kernel_errno
> > to all the kernel file compiles.  It would be nice to get rid of that wart.
> >
> > > Referenced patch deletes all mention of a global errno from the
> > > kernel
> >
> > Awesome.  This definitely needs to happen.  If no one spots any breakage,
> > send it in...
> 
> As user application are trying to use unistd.h and expect errno to get
> set properly unistd.h or at least it's syscallX macros will have to be
> made unusable from userspace or silent breakage of such apps rebuild
> against new headers will occur.

Userspace should be using glibc's unistd.h.  If it's using the kernel's,
it's broken.

--
						Brian Gerst

  reply	other threads:[~2001-12-30 22:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-30 16:06 [PATCH][RFC] global errno considered harmful Lennert Buytenhek
2001-12-30 19:56 ` Jeff Dike
2001-12-30 21:00   ` Ralf Baechle
2001-12-30 22:10     ` Brian Gerst [this message]
2001-12-31  1:59       ` Ralf Baechle
2001-12-31 16:48         ` Andreas Schwab
2001-12-31 21:42           ` Ralf Baechle
2001-12-31  1:52     ` Lennert Buytenhek
2001-12-31  2:01       ` Ralf Baechle
2001-12-31 20:56         ` Erik Andersen
2001-12-31  0:01 ` ertzog

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=3C2F90E1.DADE7F54@didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ralf@uni-koblenz.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.