All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Bommert <marc@brightwise.de>
To: qemu-devel@nongnu.org, Bug 1668103 <1668103@bugs.launchpad.net>,
	peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [Bug 1668103] Re: Possible off-by-one error in priority handling of hw/PL190.c
Date: Sun, 26 Feb 2017 22:18:33 +0100 (CET)	[thread overview]
Message-ID: <285146688.73855.1488143914060@communicator.strato.de> (raw)
In-Reply-To: <20170226205945.23033.77107.launchpad@chaenomeles.canonical.com>

>From 0cd0c1346f9adb7b90df3e4e30a5904eeda33bfa Mon Sep 17 00:00:00 2001
From: Marc Bommert <marc@brightwise.de>
Date: Sun, 26 Feb 2017 22:08:49 +0100
Subject: [PATCH] Fix off-by-one error in priority handling when reading
 VECTADDR: Also, if enabled, have the "current" priority bit (1<<i) set in
 s->prio_mask[i].

Signed-off-by: Marc Bommert <marc@brightwise.de>
---
 hw/intc/pl190.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c
index 55ea15d..0369da8 100644
--- a/hw/intc/pl190.c
+++ b/hw/intc/pl190.c
@@ -80,12 +80,12 @@ static void pl190_update_vectors(PL190State *s)
     mask = 0;
     for (i = 0; i < 16; i++)
       {
-        s->prio_mask[i] = mask;
         if (s->vect_control[i] & 0x20)
           {
             n = s->vect_control[i] & 0x1f;
             mask |= 1 << n;
           }
+        s->prio_mask[i] = mask;
       }
     s->prio_mask[16] = mask;
     pl190_update(s);
--
2.5.0

  reply	other threads:[~2017-02-26 21:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-26 20:50 [Qemu-devel] [Bug 1668103] [NEW] Possible off-by-one error in priority handling of hw/PL190.c Marc Bommert
2017-02-26 20:59 ` [Qemu-devel] [Bug 1668103] " Marc Bommert
2017-02-26 21:18   ` Marc Bommert [this message]
2017-02-26 21:21 ` Marc Bommert
2017-02-26 22:41 ` Peter Maydell
2017-02-27  7:38 ` Thomas Huth
2017-02-27 10:01 ` Peter Maydell
2017-02-27 16:58 ` 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=285146688.73855.1488143914060@communicator.strato.de \
    --to=marc@brightwise.de \
    --cc=1668103@bugs.launchpad.net \
    --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 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.