[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.16] x86/HVM: drop stdvga's "sr[]" struct member
commit ea312d1ff9eec6fc5e00132a3be9e5f7f7670239 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Tue Nov 12 14:13:51 2024 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Nov 12 14:13:51 2024 +0100 x86/HVM: drop stdvga's "sr[]" struct member No consumers are left, hence the producer and the array itself can also go away. The static sr_mask[] is then orphaned and hence needs dropping, too. This is part of XSA-463 / CVE-2024-45818 Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> (cherry picked from commit 7aba44bdd78aedb97703811948c3b69ccff85032) --- xen/arch/x86/hvm/stdvga.c | 18 ------------------ xen/include/asm-x86/hvm/io.h | 1 - 2 files changed, 19 deletions(-) diff --git a/xen/arch/x86/hvm/stdvga.c b/xen/arch/x86/hvm/stdvga.c index edcc456d1f..70facdbd96 100644 --- a/xen/arch/x86/hvm/stdvga.c +++ b/xen/arch/x86/hvm/stdvga.c @@ -38,18 +38,6 @@ #define VGA_MEM_BASE 0xa0000 #define VGA_MEM_SIZE 0x20000 -/* force some bits to zero */ -static const uint8_t sr_mask[8] = { - (uint8_t)~0xfc, - (uint8_t)~0xc2, - (uint8_t)~0xf0, - (uint8_t)~0xc0, - (uint8_t)~0xf1, - (uint8_t)~0xff, - (uint8_t)~0xff, - (uint8_t)~0x00, -}; - static int stdvga_outb(uint64_t addr, uint8_t val) { struct hvm_hw_stdvga *s = ¤t->domain->arch.hvm.stdvga; @@ -61,12 +49,6 @@ static int stdvga_outb(uint64_t addr, uint8_t val) s->sr_index = val; break; - case 0x3c5: /* sequencer data register */ - rc = (s->sr_index < sizeof(s->sr)); - if ( rc ) - s->sr[s->sr_index] = val & sr_mask[s->sr_index] ; - break; - case 0x3ce: /* graphics address register */ s->gr_index = val; break; diff --git a/xen/include/asm-x86/hvm/io.h b/xen/include/asm-x86/hvm/io.h index 375c12a466..d17cf20fd4 100644 --- a/xen/include/asm-x86/hvm/io.h +++ b/xen/include/asm-x86/hvm/io.h @@ -123,7 +123,6 @@ struct vpci_arch_msix_entry { struct hvm_hw_stdvga { uint8_t sr_index; - uint8_t sr[8]; uint8_t gr_index; struct page_info *vram_page[64]; /* shadow of 0xa0000-0xaffff */ spinlock_t lock; -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.16
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |