All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RFC][CFT] remove global errno from the kernel, make _syscallX kernel-only
@ 2001-12-31  3:05 Lennert Buytenhek
  2001-12-31 13:11 ` [Linux-ia64] " Andreas Schwab
  0 siblings, 1 reply; 4+ messages in thread
From: Lennert Buytenhek @ 2001-12-31  3:05 UTC (permalink / raw)
  To: rth, linux-arm-kernel, dev-etrax, linux-ia64, linux-m68k,
	linux-mips, grundler, cort, linux-390, gniibe, sparclinux,
	ultralinux
  Cc: jdike

(Apologies for the massive cross-post, but this is a matter that concerns
all architectures.  For archs that don't have a maintainer listed in
MAINTAINERS I grabbed a random email address from arch/$arch/kernel/*.
If you're not the person to answer this for your $arch, please forward
to an appropriate person/list.)


Hi,

As I mentioned in my email to l-k with subject '[PATCH][RFC] global
errno considered harmful' earlier today, having a global errno in the
kernel doesn't really make sense.

Referenced patch [1] deletes all mention of a global errno from the
kernel, fixes up a very small number of callers that were depending on
it, and fixes up the syscall helpers in include/asm-$arch/unistd.h not
to write an error code to errno in case of error anymore.

This subtly breaks userspace code that uses these helpers, but the general
consensus seems to be that userspace code shouldn't be touching these in
the first place.  Patch [2] fixes up asm-$arch/unistd.h to only define
_syscallX in case __KERNEL_SYSCALLS__ is defined, to try and actively
break userspace (ab)users of this code (thanks to Ralf Baechle for
suggesting I should do something along these lines).

What I would like to know from each architecture team:
- What is your arch's policy on userspace usage of asm/unistd.h, and
  consequently, what is your opinion on the goal these patches
  aim for?
- Are the changes I made in [1] and [2] for your $arch technically
  correct?
Please CC me on replies as I'm not on any of the lists posted to.

My intention is to push these to Linus for 2.5 if everyone agrees.
They're probably too intrusive for 2.4 (although I'd love people
to convince me otherwise).


cheers,
Lennert

[1] http://www.math.leidenuniv.nl/~buytenh/errno_ectomy-1.diff
[2] http://www.math.leidenuniv.nl/~buytenh/errno_ectomy-1-to-2.diff

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH][RFC][CFT] remove global errno from the kernel, make _syscallX kernel-only
@ 2001-12-31  3:05 Lennert Buytenhek
  0 siblings, 0 replies; 4+ messages in thread
From: Lennert Buytenhek @ 2001-12-31  3:05 UTC (permalink / raw)
  To: ultralinux

(Apologies for the massive cross-post, but this is a matter that concerns
all architectures.  For archs that don't have a maintainer listed in
MAINTAINERS I grabbed a random email address from arch/$arch/kernel/*.
If you're not the person to answer this for your $arch, please forward
to an appropriate person/list.)


Hi,

As I mentioned in my email to l-k with subject '[PATCH][RFC] global
errno considered harmful' earlier today, having a global errno in the
kernel doesn't really make sense.

Referenced patch [1] deletes all mention of a global errno from the
kernel, fixes up a very small number of callers that were depending on
it, and fixes up the syscall helpers in include/asm-$arch/unistd.h not
to write an error code to errno in case of error anymore.

This subtly breaks userspace code that uses these helpers, but the general
consensus seems to be that userspace code shouldn't be touching these in
the first place.  Patch [2] fixes up asm-$arch/unistd.h to only define
_syscallX in case __KERNEL_SYSCALLS__ is defined, to try and actively
break userspace (ab)users of this code (thanks to Ralf Baechle for
suggesting I should do something along these lines).

What I would like to know from each architecture team:
- What is your arch's policy on userspace usage of asm/unistd.h, and
  consequently, what is your opinion on the goal these patches
  aim for?
- Are the changes I made in [1] and [2] for your $arch technically
  correct?
Please CC me on replies as I'm not on any of the lists posted to.

My intention is to push these to Linus for 2.5 if everyone agrees.
They're probably too intrusive for 2.4 (although I'd love people
to convince me otherwise).


cheers,
Lennert

[1] http://www.math.leidenuniv.nl/~buytenh/errno_ectomy-1.diff
[2] http://www.math.leidenuniv.nl/~buytenh/errno_ectomy-1-to-2.diff

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-12-31 16:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-31  3:05 [PATCH][RFC][CFT] remove global errno from the kernel, make _syscallX kernel-only Lennert Buytenhek
2001-12-31 13:11 ` [Linux-ia64] " Andreas Schwab
2001-12-31 13:29   ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2001-12-31  3:05 Lennert Buytenhek

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.