qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	 Eduardo Habkost <eduardo@habkost.net>
Subject: Re: [PATCH] target/i386: Remove dead assignment to ss in do_interrupt64()
Date: Mon, 29 Jul 2024 17:02:34 +0100	[thread overview]
Message-ID: <CAFEAcA9ou6z6UDaGTO_8T58bdC-LoNj2hqbu+YFLFO0pWqqJNg@mail.gmail.com> (raw)
In-Reply-To: <20240723162525.1585743-1-peter.maydell@linaro.org>

On Tue, 23 Jul 2024 at 17:25, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> Coverity points out that in do_interrupt64() in the "to inner
> privilege" codepath we set "ss = 0", but because we also set
> "new_stack = 1" there, later in the function we will always override
> that value of ss with "ss = 0 | dpl".
>
> Remove the unnecessary initialization of ss, which allows us to
> reduce the scope of the variable to only where it is used.  Borrow a
> comment from helper_lcall_protected() that explains what "0 | dpl"
> means here.
>
> Resolves: Coverity CID 1527395
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

I'll take this via target-arm.next since I'm doing a pullreq
anyway, unless you'd prefer otherwise.

thanks
-- PMM


      parent reply	other threads:[~2024-07-29 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 16:25 [PATCH] target/i386: Remove dead assignment to ss in do_interrupt64() Peter Maydell
2024-07-24  0:01 ` Richard Henderson
2024-07-24  6:57 ` Philippe Mathieu-Daudé
2024-07-29 16:02 ` Peter Maydell [this message]

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=CAFEAcA9ou6z6UDaGTO_8T58bdC-LoNj2hqbu+YFLFO0pWqqJNg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=eduardo@habkost.net \
    --cc=pbonzini@redhat.com \
    --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 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).