Skip to contentSkip to conversation

Input 20180618 patches

GIT PULL Applied Gerd Hoffmann 2 participants 3 messages Jun 18, 2018 – Jun 19, 2018

lore
Share & tools
lore
#0 lore raw

The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:

Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/input-20180618-pull-request

for you to fetch changes up to b55a06df4f03f21e8a32e9d067a8a5782ac3ce0d:

ps2: check PS2Queue wptr pointer in post_load routine (2018-06-18 12:06:45 +0200)

----------------------------------------------------------------
input: ps2 post_load fix.

----------------------------------------------------------------

liujunjie (1):
ps2: check PS2Queue wptr pointer in post_load routine

 hw/input/ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.9.3
#1 lore raw

[Qemu-devel] [PULL 1/1] ps2: check PS2Queue wptr pointer in post_load routine

From: liujunjie <[email protected]>

In commit 802cbcb7300, most issues have been fixed when qemu guest migration. But the queue size still need to check whether is equal to PS2_QUEUE_SIZE. If yes, the wptr should set as 0. Or, wptr would larger than PS2_QUEUE_SIZE and never come back when ps2_queue_noirq is called. This could lead to OOB access, add check to avoid it.

Message-id: [email protected]

---
 hw/input/ps2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/input/ps2.c +1 -1
index eeec6180d0..fdfcadf9a1 100644
@@ -927,7 +927,7 @@ static void ps2_common_post_load(PS2State *s)
 
     /* reset rptr/wptr/count */
     q->rptr = 0;
-    q->wptr = size;
+    q->wptr = (size == PS2_QUEUE_SIZE) ? 0 : size;
     q->count = size;
     s->update_irq(s->update_arg, q->count != 0);
 }
Signature · 1 line
2.9.3
#2 lore raw
In reply to Gerd Hoffmann
Quoted 12 lines · Gerd Hoffmann

The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:

Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/input-20180618-pull-request

for you to fetch changes up to b55a06df4f03f21e8a32e9d067a8a5782ac3ce0d:

ps2: check PS2Queue wptr pointer in post_load routine (2018-06-18 12:06:45 +0200)

Quoted 8 lines

----------------------------------------------------------------
input: ps2 post_load fix.

----------------------------------------------------------------

liujunjie (1):
ps2: check PS2Queue wptr pointer in post_load routine

Applied, thanks.

-- PMM