From: Ralf Baechle <ralf@linux-mips.org>
To: Ryan Murray <rmurray@debian.org>,
linux-mips@linux-mips.org, libc-alpha@sources.redhat.com
Subject: Re: [patch] userspace mcontext_t doesn't match what kernel returns
Date: Mon, 16 Sep 2002 01:08:57 +0200 [thread overview]
Message-ID: <20020916010857.B24588@linux-mips.org> (raw)
In-Reply-To: <20020915191613.GA21794@nevyn.them.org>; from dan@debian.org on Sun, Sep 15, 2002 at 03:16:13PM -0400
On Sun, Sep 15, 2002 at 03:16:13PM -0400, Daniel Jacobowitz wrote:
> > I choose to fix the kernel instead which will keep as closer to the MIPS
> > ABI and also prevent having to recompile zillions of user apps. Below my
> > working version of <asm/ucontext.h>.
>
> What are the gregset_t/fpregset_t types in your working tree? There
> aren't any definitions of them in the only copy of the MIPS code that I
> have here, and they've had various bad definitions in glibc until
> recently. They also recently changed...
By the time I sent my previous mail I didn't yet have any. Below the
changes I've made to libc but the kernel changes are identical.
> [Although I think your kernel change is the right way to go, here.
> Just being cautious.]
I'm not yet finished. The libc definitions for gregset_t and fpregset_t
are not what they're expected to be (coincidentally I got a related bug
report just a few days ago, so that issue is also itching a bit ...) and
I'd like to change them to as below.
This is a binary incompatible change but since so far just one person has
complained about the non-matching definitions of struct ucontext, it seems
there are very few users of the affected data type?
/* Type for general register. */
typedef unsigned long int greg_t;
/* Number of general registers. */
#define NGREG 36
typedef greg_t gregset_t[NGREG];
/* Container for all FPU registers. */
typedef struct fpregset {
union {
double fp_dregs[16];
float fp_fregs[32];
unsigned int fp_regs[32];
} fp_r;
unsigned int fp_csr;
unsigned int fp_pad;
} fpregset_t;
/* Context to describe whole processor state. */
typedef struct
{
gregset_t gregs;
fpregset_t fpregs;
} mcontext_t;
/* Userlevel context. */
typedef struct ucontext
{
unsigned long int uc_flags;
struct ucontext *uc_link;
stack_t uc_stack;
mcontext_t uc_mcontext;
__sigset_t uc_sigmask;
} ucontext_t;
prev parent reply other threads:[~2002-09-15 23:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-11 3:28 [patch] userspace mcontext_t doesn't match what kernel returns Ryan Murray
2002-09-15 19:06 ` Ralf Baechle
2002-09-15 19:16 ` Daniel Jacobowitz
2002-09-15 23:08 ` Ralf Baechle [this message]
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=20020916010857.B24588@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=libc-alpha@sources.redhat.com \
--cc=linux-mips@linux-mips.org \
--cc=rmurray@debian.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