From: Ralf Baechle <ralf@linux-mips.org>
To: Franck Bui-Huu <vagabon.xyz@gmail.com>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-mips@linux-mips.org
Subject: Re: struct sigcontext for N32 userland
Date: Tue, 13 Feb 2007 11:38:26 +0000 [thread overview]
Message-ID: <20070213113826.GA4569@linux-mips.org> (raw)
In-Reply-To: <cda58cb80702130027o1ebec149ib25090881f7ac6a1@mail.gmail.com>
On Tue, Feb 13, 2007 at 09:27:20AM +0100, Franck Bui-Huu wrote:
> On 2/12/07, Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> >If N32 userland refers asm-mips/sigcontext.h, struct sigcontext cause
> >some troubles.
> >
> >#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32
> >
> >struct sigcontext {
> > unsigned long sc_regs[32];
> >...
> >
> >
> >The kernel use 64-bit for sc_regs[0], and both N32/N64 userland
> >expects it was 64-bit. But size of 'long' on N32 is actually 32-bit.
> >So this definition make some confusion.
> >
> >glibc has its own sigcontext.h and it uses 'unsigned long long' for
> >sc_regs, so no real problem with glibc.
Looks like a case for __u32, __u64 then.
> Just out of curiosity, for what purpose does the glibc use sigcontext ?
Afair it doesn't use sigcontext itself but makes it available to
applications through <signal.h>. Typical users are virtual machines,
JITs, debuggers, user space virtual memory.
Ralf
next prev parent reply other threads:[~2007-02-13 11:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-12 15:51 struct sigcontext for N32 userland Atsushi Nemoto
2007-02-13 8:27 ` Franck Bui-Huu
2007-02-13 11:38 ` Ralf Baechle [this message]
2007-02-17 15:12 ` Atsushi Nemoto
2007-02-19 15:38 ` Ralf Baechle
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=20070213113826.GA4569@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=anemo@mba.ocn.ne.jp \
--cc=linux-mips@linux-mips.org \
--cc=vagabon.xyz@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox