[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] ati-vga: increment mm_index in ati_mm_read/write
From: |
Gerd Hoffmann |
Subject: |
Re: [PATCH] ati-vga: increment mm_index in ati_mm_read/write |
Date: |
Wed, 3 Jun 2020 15:44:04 +0200 |
On Wed, Jun 03, 2020 at 06:17:32PM +0530, P J P wrote:
> From: Prasad J Pandit <pjp@fedoraproject.org>
>
> While accessing VGA registers via ati_mm_read/write routines,
> a guest may set 's->regs.mm_index' such that it leads to infinite
> recursion.
Lovely.
> Increment the mm_index value to avoid it.
Hmm, why modify mm_index? Shouldn't we just check it is non-zero
before calling ati_mm_read/ati_mm_write?
cheers,
Gerd