From: Russell King <rmk@arm.linux.org.uk>
To: Linux Kernel List <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Kernel<->Userspace API issue
Date: Fri, 18 Apr 2003 09:27:55 +0100 [thread overview]
Message-ID: <20030418092755.A25177@flint.arm.linux.org.uk> (raw)
A problem has recently been reported on the ARM lists regarding RT signal
handling. It appears that there is an issue between glibc and the kernel,
in that glibc has a different idea of the layout of structures passed
from the kernel than the kernel itself.
I think this is a case in point that our policy on "userspace must not
include kernel headers" is completely wrong when it comes to user
space interfaces. I believe we need is a clear set of defined user
space interface headers which contain the definition of structures and
numbers shared between user space and kernel space. ie, include/abi
or some such.
No, glibckernheaders (or whatever it is) is NOT the solution - that
just creates yet another set of header files to potentially go out
of sync.
Comments?
On Thu, Apr 17, 2003 at 10:23:51PM -0400, Josh Fryman wrote:
> any insights? is this an implementation issue, program error, or am i
> missing some arm-centric trick? or am i just stupid and doing something
> completely wrong?
Sigh. glibc seems to have a bug. This is the kernel's idea of ucontext:
struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
stack_t uc_stack;
struct sigcontext uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */
};
and glibc's idea:
typedef struct ucontext
{
unsigned long int uc_flags;
struct ucontext *uc_link;
__sigset_t uc_sigmask;
stack_t uc_stack;
mcontext_t uc_mcontext;
long int uc_filler[5];
} ucontext_t;
God knows where glibc got this from - it hasn't changed certainly since
2.2 kernels. I suspect glibc has been wrong for some time.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next reply other threads:[~2003-04-18 8:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-18 8:27 Russell King [this message]
2003-04-18 8:42 ` Kernel<->Userspace API issue H. Peter Anvin
2003-04-18 11:19 ` Dr. David Alan Gilbert
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=20030418092755.A25177@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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 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.