From: Joe Korty <joe.korty@ccur.com>
To: Andi Kleen <ak@suse.de>
Cc: akpm@osdl.org, torvalds@osdl.org, linux-kernel@vger.kernel.org,
albert.cahalan@ccur.com, jim.houston@ccur.com
Subject: Re: siginfo_t fracturing, especially for 64/32-bit compatibility mode
Date: Sat, 3 Jan 2004 15:15:15 -0500 [thread overview]
Message-ID: <20040103201515.GA4115@rudolph.ccur.com> (raw)
In-Reply-To: <20040103012433.6aa4cafb.ak@suse.de>
I decided to do a more systematic search.
The below table summarizes all user-mode si_code values declared
and sent by either the kernel or by glibc.
Method was simple grep. Therefore tricky uses were not accounted
for.
code name value glibc-2.3.2 send-usage 2.6.1-rc2 send-usage
------------ ------ ---------------------------- --------------------
SI_ASYNCNL -6 si_pid, si_uid, si_value never sent
SI_TKILL -6 never sent si_pid, si_uid
SI_SIGIO -5 never sent never sent
SI_ASYNCIO -4 si_pid, si_uid, si_value si_addr
SI_MESGQ -3 never sent never sent
SI_QUEUE -1 si_pid, si_uid, si_value never sent
Observations:
glibc only sends siginfo_t's with si_pid, si_uid, and si_value set.
This makes trivial the conversion of 32bit user-space-originated
siginfo_t's to the 64-bit form.
The SI_ASYNCNL and SI_TKILL values collide but this collision is
conversion-safe, as the fields used are compatible. However
applications may on occasion have trouble determining which
subsystem sent a received siginfo_t of this type.
SI_ASYNCIO uses are incompatible. This prevents the kernel from
being able to determine which fields to convert when a 64-bit
siginfo_t of this type is to be sent to a 32-bit application.
SI_SIGIO is not used by either the kernel or glibc. This was
somewhat suprising given the extensive coverage of SI_SIGIO in the
man pages.
The kernel likes to send user siginfo_t's to applications, rather
the restrict itself to kernel siginfo_t types. This is a misuse of
the user-siginfo_t concept, though (so far) largely harmless.
Joe
next prev parent reply other threads:[~2004-01-03 20:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-02 19:49 Joe Korty
2004-01-02 20:28 ` Linus Torvalds
2004-01-02 20:38 ` Joe Korty
2004-01-02 20:47 ` Linus Torvalds
2004-03-29 15:39 ` Linus Torvalds
2004-03-29 15:39 ` Joe Korty
2004-01-03 0:24 ` Andi Kleen
2004-01-03 0:44 ` Jakub Jelinek
2004-01-03 1:07 ` Andi Kleen
2004-01-03 2:12 ` Daniel Jacobowitz
2004-03-29 15:39 ` Daniel Jacobowitz
2004-03-29 15:39 ` Andi Kleen
2004-01-03 20:15 ` Joe Korty [this message]
2004-03-29 15:39 ` Jakub Jelinek
2004-03-29 15:40 ` Joe Korty
2004-03-29 15:39 ` Linus Torvalds
2004-03-29 15:39 ` Andi Kleen
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=20040103201515.GA4115@rudolph.ccur.com \
--to=joe.korty@ccur.com \
--cc=ak@suse.de \
--cc=akpm@osdl.org \
--cc=albert.cahalan@ccur.com \
--cc=jim.houston@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
Powered by JetHome