From: Stafford Horne <shorne@gmail.com>
To: GLIBC patches <libc-alpha@sourceware.org>
Cc: Linux OpenRISC <linux-openrisc@vger.kernel.org>,
Stafford Horne <shorne@gmail.com>
Subject: [PATCH 1/4] or1k: Fix Linux user space signal ABI
Date: Tue, 19 Mar 2024 21:42:41 +0000 [thread overview]
Message-ID: <20240319214244.736981-2-shorne@gmail.com> (raw)
In-Reply-To: <20240319214244.736981-1-shorne@gmail.com>
The OpenRISC sigcontext structure has always been defined as:
struct user_regs_struct {
/* GPR R0-R31... */
unsigned long gpr[32];
unsigned long pc;
unsigned long sr;
};
struct sigcontext {
struct user_regs_struct regs; /* needs to be first */
unsigned long oldmask; /* unused */
};
With Linux v6.8 we added FPU support and repurposed the oldmask
to use for the FPCSR (floating point control status register).
struct sigcontext {
struct user_regs_struct regs; /* needs to be first */
union {
unsigned long fpcsr;
unsigned long oldmask; /* unused */
};
};
The definition of mcontext_t was always missing the extra space for
oldmask. This patch adds the field __fpcsr to mcontext_t to fix the ABI
mismatch between glibc and Linux.
---
sysdeps/unix/sysv/linux/or1k/sys/ucontext.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/sysdeps/unix/sysv/linux/or1k/sys/ucontext.h b/sysdeps/unix/sysv/linux/or1k/sys/ucontext.h
index b17e919154..1b428592ee 100644
--- a/sysdeps/unix/sysv/linux/or1k/sys/ucontext.h
+++ b/sysdeps/unix/sysv/linux/or1k/sys/ucontext.h
@@ -38,6 +38,7 @@ typedef struct
unsigned long int __gprs[__NGREG];
unsigned long int __pc;
unsigned long int __sr;
+ unsigned long int __fpcsr;
} mcontext_t;
/* Userlevel context. */
--
2.44.0
next prev parent reply other threads:[~2024-03-19 21:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 21:42 [PATCH 0/4] OpenRISC fixes for 2.39 Stafford Horne
2024-03-19 21:42 ` Stafford Horne [this message]
2024-03-20 13:24 ` [PATCH 1/4] or1k: Fix Linux user space signal ABI Adhemerval Zanella Netto
2024-03-20 14:13 ` Stafford Horne
2024-03-20 20:12 ` Adhemerval Zanella Netto
2024-03-19 21:42 ` [PATCH 2/4] or1k: Update libm test ulps Stafford Horne
2024-03-19 21:42 ` [PATCH 3/4] or1k: Only define fpu rouding and exceptions with hard-float Stafford Horne
2024-03-19 21:42 ` [PATCH 4/4] or1k: Add prctl wrapper to unwrap variadic args Stafford Horne
2024-03-20 13:28 ` Adhemerval Zanella Netto
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240319214244.736981-2-shorne@gmail.com \
--to=shorne@gmail.com \
--cc=libc-alpha@sourceware.org \
--cc=linux-openrisc@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).