All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	"Stefan Weil" <sw@weilnetz.de>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	qemu-stable <qemu-stable@nongnu.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH] tcg/arm: Increase stack alignment for function generation
Date: Wed, 1 Sep 2021 19:30:09 +0100	[thread overview]
Message-ID: <20210901183009.GG26415@redhat.com> (raw)
In-Reply-To: <CAFEAcA8WD97HqQRRzB8Z1LVMCmkKZu3_EAQZM1HAMxccQ=PMnA@mail.gmail.com>

On Wed, Sep 01, 2021 at 07:18:03PM +0100, Peter Maydell wrote:
> On Wed, 1 Sept 2021 at 18:01, Richard W.M. Jones <rjones@redhat.com> wrote:
> >
> > This avoids the following assertion when the kernel initializes X.509
> > certificates:
> >
> > [    7.315373] Loading compiled-in X.509 certificates
> > qemu-system-arm: ../tcg/tcg.c:3063: temp_allocate_frame: Assertion `align <= TCG_TARGET_STACK_ALIGN' failed.
> >
> > Fixes: commit c1c091948ae
> > Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1999878
> > Cc: qemu-stable@nongnu.org
> > Tested-by: Richard W.M. Jones <rjones@redhat.com>
> > Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
> > ---
> >  tcg/arm/tcg-target.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h
> > index d113b7f8db..09df3b39a1 100644
> > --- a/tcg/arm/tcg-target.h
> > +++ b/tcg/arm/tcg-target.h
> > @@ -115,7 +115,7 @@ extern bool use_neon_instructions;
> >  #endif
> >
> >  /* used for function call generation */
> > -#define TCG_TARGET_STACK_ALIGN         8
> > +#define TCG_TARGET_STACK_ALIGN          16
> >  #define TCG_TARGET_CALL_ALIGN_ARGS     1
> >  #define TCG_TARGET_CALL_STACK_OFFSET   0
> 
> The 32-bit Arm procedure call standard only guarantees 8-alignment
> of SP, not 16-alignment, so I suspect this is not the correct fix.

Wouldn't it be a good idea if asserts in TCG dumped out something
useful about the guest code?  Because I can only reproduce this bug in
a very awkward batch environment I need to collect as much information
from log messages as possible.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org



  reply	other threads:[~2021-09-01 18:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-01 16:44 [PATCH] tcg/arm: Increase stack alignment for function generation Richard W.M. Jones
2021-09-01 16:44 ` Richard W.M. Jones
2021-09-01 18:18   ` Peter Maydell
2021-09-01 18:30     ` Richard W.M. Jones [this message]
2021-09-01 18:41       ` Peter Maydell
2021-09-01 18:51         ` Richard W.M. Jones
2021-09-01 20:17           ` Peter Maydell
2021-09-01 20:24             ` Richard W.M. Jones
2021-09-02  7:36               ` Peter Maydell
2021-09-02  8:06                 ` Richard W.M. Jones
2021-09-03 13:33         ` 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=20210901183009.GG26415@redhat.com \
    --to=rjones@redhat.com \
    --cc=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=sw@weilnetz.de \
    /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.