public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Gerd Hoffmann <kraxel@redhat.com>, devel@edk2.groups.io
Subject: Re: [edk2-devel] ovmf miscompiles with gcc-12
Date: Tue, 7 Jun 2022 12:38:46 +0200	[thread overview]
Message-ID: <bcbec043-3ab7-bce8-4b38-6fcc7317046d@kernel.org> (raw)
In-Reply-To: <20220607103120.zvgofggypzhdms5m@sirius.home.kraxel.org>

Hi,

On 07. 06. 22, 12:31, Gerd Hoffmann wrote:
>> The reason is TemporaryRamMigration() overwrites rbp unconditionally -- it
>> adds an offset to rbp even if rbp is NOT used as a frame pointer
> 
>> Now, what is the right way to fix this? Do the SetJump/LongJump in assembly
>> and wrap it into push rbp/pop rbp?
> 
> push/pop rbp will break in case frame pointers are used, no?

Yes, see the downstream bug at:

https://bugzilla.suse.com/show_bug.cgi?id=1199597#c45

and read further.

> I think essentially the code needs to know whenever frame pointers are
> used or not and then update (or not) rbp depending on that.  Update
> compiler flags to explicitly set -f(no-)omit-frame-pointer, also add
> -D OMIT_FRAME_POINTER=1, the compile conditionally on OMIT_FRAME_POINTER?

Yes, the comment above mentions this too (cf. CONFIG_FRAME_POINTER in 
the kernel). So see the downstream bugzilla for discussion.

The upstream bugzilla needs an account which I don't have and cannot 
create automatically. It needs manual intervention and I am too lazy to 
do so. So I didn't comment there:
https://bugzilla.tianocore.org/show_bug.cgi?id=3934

thanks,
-- 
js

  reply	other threads:[~2022-06-07 10:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-19  5:43 ovmf miscompiles with gcc-12 Jiri Slaby
2022-05-27  3:41 ` [edk2-devel] " joeyli
2022-06-07 10:31 ` Gerd Hoffmann
2022-06-07 10:38   ` Jiri Slaby [this message]
2022-06-07 11:07     ` Gerd Hoffmann
2022-06-07 11:14       ` Jiri Slaby
2022-06-08 22:00         ` Andrew Fish

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-list 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=bcbec043-3ab7-bce8-4b38-6fcc7317046d@kernel.org \
    --to=devel@edk2.groups.io \
    /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