From: Warner Losh <imp@bsdimp.com>
To: qemu-devel@nongnu.org
Cc: Kyle Evans <kevans@freebsd.org>,
richard.henderson@linaro.org, alex.bennee@linaro.org,
Warner Losh <imp@bsdimp.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: [PATCH] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026
Date: Tue, 1 Feb 2022 13:52:51 -0700 [thread overview]
Message-ID: <20220201205251.57691-1-imp@bsdimp.com> (raw)
The capsicum signal stuff is new with FreeBSD 14, rev 1400026, so only
copy them on a new enough system.
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/signal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bsd-user/signal.c b/bsd-user/signal.c
index ad22ba9d90d..b43266e6e06 100644
--- a/bsd-user/signal.c
+++ b/bsd-user/signal.c
@@ -242,8 +242,10 @@ static inline void host_to_target_siginfo_noswap(target_siginfo_t *tinfo,
* one, then we know what to save.
*/
if (sig == TARGET_SIGTRAP) {
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 1400026
tinfo->_reason._capsicum._syscall =
info->_reason._capsicum._syscall;
+#endif
si_type = QEMU_SI_CAPSICUM;
}
break;
@@ -296,8 +298,10 @@ static void tswap_siginfo(target_siginfo_t *tinfo, const target_siginfo_t *info)
__put_user(info->_reason._poll._band, &tinfo->_reason._poll._band);
break;
case QEMU_SI_CAPSICUM:
+#if defined(__FreeBSD_version) && __FreeBSD_version >= 1400026
__put_user(info->_reason._capsicum._syscall,
&tinfo->_reason._capsicum._syscall);
+#endif
break;
default:
g_assert_not_reached();
--
2.33.1
next reply other threads:[~2022-02-01 22:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 20:52 Warner Losh [this message]
2022-02-01 20:57 ` [PATCH] bsd-user/signal.c: Only copy the _capsicum for FreeBSD_version > 1400026 Warner Losh
2022-02-01 21:06 ` Richard Henderson
2022-02-01 21:23 ` Warner Losh
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=20220201205251.57691-1-imp@bsdimp.com \
--to=imp@bsdimp.com \
--cc=alex.bennee@linaro.org \
--cc=kevans@freebsd.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.