From: Ilya Leoshkevich <iii@linux.ibm.com>
To: "Michael Tokarev" <mjt@tls.msk.ru>,
"Laurent Vivier" <laurent@vivier.eu>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [PATCH 1/2] linux-user/ppc: Fix sigmask endianness issue in sigreturn
Date: Fri, 25 Oct 2024 15:56:38 +0200 [thread overview]
Message-ID: <d86a9773348aed57d8f9759e05ea287c36364013.camel@linux.ibm.com> (raw)
In-Reply-To: <5cc9130c-5b9a-4e86-a609-9ab16d3529e0@tls.msk.ru>
On Fri, 2024-10-25 at 16:53 +0300, Michael Tokarev wrote:
> 17.10.2024 15:54, Ilya Leoshkevich wrote:
> > do_setcontext() copies the target sigmask without endianness
> > handling
> > and then uses target_to_host_sigset_internal(), which expects a
> > byte-swapped one. Use target_to_host_sigset() instead.
> >
> > Fixes: bcd4933a23f1 ("linux-user: ppc signal handling")
> > Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> > ---
> > linux-user/ppc/signal.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/linux-user/ppc/signal.c b/linux-user/ppc/signal.c
> > index a1d8c0bccc1..24e5a02a782 100644
> > --- a/linux-user/ppc/signal.c
> > +++ b/linux-user/ppc/signal.c
> > @@ -628,7 +628,7 @@ static int do_setcontext(struct target_ucontext
> > *ucp, CPUPPCState *env, int sig)
> > if (!lock_user_struct(VERIFY_READ, mcp, mcp_addr, 1))
> > return 1;
> >
> > - target_to_host_sigset_internal(&blocked, &set);
> > + target_to_host_sigset(&blocked, &set);
> > set_sigmask(&blocked);
> > restore_user_regs(env, mcp, sig);
>
> Shouldn't this change be picked for all stable releases too?
> Yes, the issue is very old so probably does not have big impact,
> but it looks like it should be okay to fix it finally?
>
> I'm picking it up, please let me know if I shouldn't.
>
> Thanks,
>
> /mjt
I think it's worth taking it, since it leads to weird qemu-user
crashes. I actually intended to Cc: stable here and forgot to do it,
so thanks for bringing this up.
next prev parent reply other threads:[~2024-10-25 13:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 12:54 [PATCH 0/2] linux-user/ppc: Fix sigmask endianness issue in sigreturn Ilya Leoshkevich
2024-10-17 12:54 ` [PATCH 1/2] " Ilya Leoshkevich
2024-10-20 21:20 ` Richard Henderson
2024-10-21 5:45 ` Philippe Mathieu-Daudé
2024-10-25 13:53 ` Michael Tokarev
2024-10-25 13:56 ` Ilya Leoshkevich [this message]
2024-10-17 12:54 ` [PATCH 2/2] tests/tcg: Test that sigreturn() does not corrupt the signal mask Ilya Leoshkevich
2024-10-22 2:05 ` Richard Henderson
2024-10-22 17:51 ` Richard Henderson
2024-10-22 17:52 ` [PATCH 0/2] linux-user/ppc: Fix sigmask endianness issue in sigreturn Richard Henderson
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=d86a9773348aed57d8f9759e05ea287c36364013.camel@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=alex.bennee@linaro.org \
--cc=laurent@vivier.eu \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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 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 NNTP newsgroup(s).