lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9f18cd1aa0d51e7cb7bb2cc360f67b8cf92ed487.camel@intel.com>
Date: Fri, 26 Sep 2025 22:10:44 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Zhao, Yan Y" <yan.y.zhao@...el.com>
CC: "Gao, Chao" <chao.gao@...el.com>, "seanjc@...gle.com" <seanjc@...gle.com>,
	"Huang, Kai" <kai.huang@...el.com>, "kas@...nel.org" <kas@...nel.org>,
	"Annapurve, Vishal" <vannapurve@...gle.com>, "bp@...en8.de" <bp@...en8.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"mingo@...hat.com" <mingo@...hat.com>, "dave.hansen@...ux.intel.com"
	<dave.hansen@...ux.intel.com>, "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>, "Yamahata, Isaku"
	<isaku.yamahata@...el.com>, "pbonzini@...hat.com" <pbonzini@...hat.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>, "x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v3 11/16] KVM: TDX: Add x86 ops for external spt cache

On Tue, 2025-09-23 at 15:03 +0800, Yan Zhao wrote:
> > @@ -625,7 +624,6 @@ static void mmu_free_memory_caches(struct
> > kvm_vcpu *vcpu)
> >   	kvm_mmu_free_memory_cache(&vcpu-
> > >arch.mmu_pte_list_desc_cache);
> >   	kvm_mmu_free_memory_cache(&vcpu-
> > >arch.mmu_shadow_page_cache);
> >   	kvm_mmu_free_memory_cache(&vcpu-
> > >arch.mmu_shadowed_info_cache);
> > -	kvm_mmu_free_memory_cache(&vcpu-
> > >arch.mmu_external_spt_cache);
> Though pre-allocated pages are eventually freed in tdx_vcpu_free() in
> patch 13,
> looks they are leaked in this patch.
> 
> BTW, why not invoke kvm_x86_call(free_external_fault_cache)(vcpu)
> here?

The thought was to reduce the number of TDX callbacks in core MMU code.

> It looks more natural to free the remaining pre-allocated pages in
> mmu_free_memory_caches(), which is invoked after kvm_mmu_unload(vcpu)
> while tdx_vcpu_free() is before it. 

Hmm, that is not so tidy. But on balance I think it would still be
better to leave it more contained in TDX code. Any strong objection?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ