From: LemonBoy <thatlemon@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Laurent Vivier <laurent@vivier.eu>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH] linux-user: Correct definition of stack_t
Date: Thu, 5 Nov 2020 16:48:19 +0100 [thread overview]
Message-ID: <85656394-930c-cd95-df9b-4a6754f83c84@gmail.com> (raw)
In-Reply-To: <CAFEAcA94OTo=FT6yWVod6SYNEzowQ9ee8kKcih=q1T7TTrYBBw@mail.gmail.com>
On 05/11/20 16:16, Peter Maydell wrote:
> On Thu, 5 Nov 2020 at 14:55, LemonBoy <thatlemon@gmail.com> wrote:
>>
>> From 914c30863b45d6fcd3e2fc83929bcac546be1555 Mon Sep 17 00:00:00 2001
>> From: LemonBoy <thatlemon@gmail.com>
>> Date: Thu, 5 Nov 2020 15:48:24 +0100
>> Subject: [PATCH] linux-user: Correct definition of stack_t
>>
>> Some platforms used the wrong definition of stack_t where the flags and
>> size fields were swapped or where the flags field had type ulong instead
>> of int.
>
> Coincidentally, I just noticed this yesterday (am in the middle of
> trying to debug why qemu-sparc64 crashes trying to start bash...)
>
What an interesting coincidence, I also stumbled across this bug while
debugging a crash with some sparc64 binary.
>> Due to the presence of padding space in the structure and the prevalence
>> of little-endian machines this problem went unnoticed for a long time.
>>
>> The type definitions have been cross-checked with the ones defined in
>> the Linux kernel v5.9, plus some older versions for a few architecture
>> that have been removed and Xilinx's kernel fork for NiosII [1].
>>
>> The microblaze header and the bsd-user ones remain unchanged as I don't
>> know if they are wrong or not.
>
> As far as I can tell, Microblaze doesn't define its own stack_t,
> so it must be using the asm-generic one, so I think it also needs
> changing.
>
I'll change it and send an updated patch ASAP.
>> [1] https://github.com/Xilinx/linux-xlnx/blob/master/arch/nios2/include/uapi/asm/signal.h
>
>> Signed-off-by: Giuseppe Musacchio <thatlemon@gmail.com>
>
> Other than also changing microblaze,
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
>
> thanks
> -- PMM
>
next prev parent reply other threads:[~2020-11-05 15:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-05 14:54 [PATCH] linux-user: Correct definition of stack_t LemonBoy
2020-11-05 15:16 ` Peter Maydell
2020-11-05 15:48 ` LemonBoy [this message]
2020-11-05 17:37 ` Peter Maydell
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=85656394-930c-cd95-df9b-4a6754f83c84@gmail.com \
--to=thatlemon@gmail.com \
--cc=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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).