From: Lars Marowsky-Bree <lmb@suse.de>
To: linux-kernel@vger.kernel.org
Subject: siginfo_t si_band type mismatch between kernel & glibc
Date: Tue, 10 Feb 2004 10:20:52 +0100 [thread overview]
Message-ID: <20040210092052.GL31312@marowsky-bree.de> (raw)
Morning,
it turns out that on some archs, si_band is defined as long in the glibc
headers and as int in the kernel, leading to a 'nice' struct mismatch
and quite interesting behaviour - ie, breaking SIGPOLL & SIGIO on most
64bit archs.
In 2.6, we find:
#ifndef __ARCH_SI_BAND_T
#define __ARCH_SI_BAND_T int
#endif
...
/* SIGPOLL */
struct {
__ARCH_SI_BAND_T _band; /* POLL_IN, POLL_OUT, POLL_MSG */
int _fd;
} _sigpoll;
Alas, for all archs but x86_64, __ARCH_SI_BAND_T is not defined, thus
defaulting to int, which is still not matching the user space expectations.
http://linux.bkbits.net:8080/linux-2.5/diffs/include/asm-generic/siginfo.h@1.10?nav=index.html|src/|src/include|src/include/asm-generic|hist/include/asm-generic/siginfo.h
suggests that Linus believes _band should be int on all archs but x86_64.
However, the glibc has had it as 'long' on mips, ia64 and x86_64 in the
kernel-headers; the glibc/sysdeps differs from this further, as it is
long only on linux(generic), ia64, s390. And the manpage says it to be
int, fwiw.
So is this a kernel bug or a glibc one? ;-)
Most user-land seems to expect it to be long, and right now (in 2.4 +
2.6), it seems SIGIO is definetely broken on ppc64 / s390x.
Sincerely,
Lars Marowsky-Brée <lmb@suse.de>
--
High Availability & Clustering \ ever tried. ever failed. no matter.
SUSE Labs | try again. fail again. fail better.
Research & Development, SUSE LINUX AG \ -- Samuel Beckett
reply other threads:[~2004-02-10 9:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20040210092052.GL31312@marowsky-bree.de \
--to=lmb@suse.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®