From c49330cd911549e8b053d768dbbecebe727c55dd Mon Sep 17 00:00:00 2001 From: krw Date: Sun, 19 Apr 2020 13:44:14 +0000 Subject: Initialize vmx_get_guest_faulttype() 'prot' to 0 instead of using random stack garbage. CID 1492655 ok pd@ --- sys/arch/amd64/amd64/vmm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/arch/amd64/amd64/vmm.c b/sys/arch/amd64/amd64/vmm.c index 8b2bc9f0192..f308948ef4f 100644 --- a/sys/arch/amd64/amd64/vmm.c +++ b/sys/arch/amd64/amd64/vmm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmm.c,v 1.271 2020/04/08 07:39:48 pd Exp $ */ +/* $OpenBSD: vmm.c,v 1.272 2020/04/19 13:44:14 krw Exp $ */ /* * Copyright (c) 2014 Mike Larkin * @@ -5415,6 +5415,7 @@ vmx_get_guest_faulttype(void) if (exit_qual & IA32_VMX_EPT_FAULT_WAS_EXECABLE) was_prot |= PROT_EXEC; + prot = 0; if (exit_qual & IA32_VMX_EPT_FAULT_READ) prot = PROT_READ; else if (exit_qual & IA32_VMX_EPT_FAULT_WRITE) -- cgit v1.2.3-59-g8ed1b