[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21f41af44fcc2ce52bdb40c7560fc7c9c0d56ec4.camel@intel.com>
Date: Fri, 12 Jan 2024 00:26:42 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"ardb@...nel.org" <ardb@...nel.org>, "hch@...radead.org" <hch@...radead.org>,
"Lutomirski, Andy" <luto@...nel.org>, "mhklinux@...look.com"
<mhklinux@...look.com>, "linux-coco@...ts.linux.dev"
<linux-coco@...ts.linux.dev>, "dave.hansen@...ux.intel.com"
<dave.hansen@...ux.intel.com>, "thomas.lendacky@....com"
<thomas.lendacky@....com>, "haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
"mingo@...hat.com" <mingo@...hat.com>, "seanjc@...gle.com"
<seanjc@...gle.com>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "tglx@...utronix.de" <tglx@...utronix.de>,
"Cui, Dexuan" <decui@...rosoft.com>, "urezki@...il.com" <urezki@...il.com>,
"linux-mm@...ck.org" <linux-mm@...ck.org>, "hpa@...or.com" <hpa@...or.com>,
"peterz@...radead.org" <peterz@...radead.org>, "wei.liu@...nel.org"
<wei.liu@...nel.org>, "bp@...en8.de" <bp@...en8.de>, "Rodel, Jorg"
<jroedel@...e.de>, "sathyanarayanan.kuppuswamy@...ux.intel.com"
<sathyanarayanan.kuppuswamy@...ux.intel.com>, "lstoakes@...il.com"
<lstoakes@...il.com>, "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v3 3/3] x86/hyperv: Make encrypted/decrypted changes safe
for load_unaligned_zeropad()
On Fri, 2024-01-05 at 10:30 -0800, mhkelley58@...il.com wrote:
> * hv_vtom_set_host_visibility - Set specified memory visible to
> host.
> *
> @@ -521,7 +547,7 @@ static bool hv_vtom_set_host_visibility(unsigned
> long kbuffer, int pagecount, bo
>
> pfn_array = kmalloc(HV_HYP_PAGE_SIZE, GFP_KERNEL);
> if (!pfn_array)
> - return false;
> + goto err_set_memory_p;
>
If kmalloc() fails here, and set_memory_p() succeeds below, then
hv_vtom_set_host_visibility() returns true, but skips all the
hv_mark_gpa_visibility() work. Shouldn't it return false?
Powered by blists - more mailing lists