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] [day] [month] [year] [list]
Message-ID: <aNstuNoT/kp6XGGR@yzhao56-desk.sh.intel.com>
Date: Tue, 30 Sep 2025 09:09:12 +0800
From: Yan Zhao <yan.y.zhao@...el.com>
To: Rick Edgecombe <rick.p.edgecombe@...el.com>
CC: <kas@...nel.org>, <bp@...en8.de>, <chao.gao@...el.com>,
	<dave.hansen@...ux.intel.com>, <isaku.yamahata@...el.com>,
	<kai.huang@...el.com>, <kvm@...r.kernel.org>, <linux-coco@...ts.linux.dev>,
	<linux-kernel@...r.kernel.org>, <mingo@...hat.com>, <pbonzini@...hat.com>,
	<seanjc@...gle.com>, <tglx@...utronix.de>, <x86@...nel.org>,
	<vannapurve@...gle.com>, "Kirill A. Shutemov"
	<kirill.shutemov@...ux.intel.com>
Subject: Re: [PATCH v3 13/16] KVM: TDX: Handle PAMT allocation in fault path

On Thu, Sep 18, 2025 at 04:22:21PM -0700, Rick Edgecombe wrote:
> @@ -862,6 +863,9 @@ void tdx_vcpu_free(struct kvm_vcpu *vcpu)
>  		tdx->vp.tdvpr_page = 0;
>  	}
>  
> +	while ((page = get_tdx_prealloc_page(&tdx->prealloc)))
> +		__free_page(page);
> +
>  	tdx->state = VCPU_TD_STATE_UNINITIALIZED;
>  }
tdx_vcpu_free() may be invoked even if the vcpu ioctl KVM_TDX_INIT_VCPU was
never called.

> @@ -2966,6 +2999,8 @@ static int tdx_td_vcpu_init(struct kvm_vcpu *vcpu, u64 vcpu_rcx)
>  	int ret, i;
>  	u64 err;
>  
> +	INIT_LIST_HEAD(&tdx->prealloc.page_list);
So, need to move this list init to tdx_vcpu_create().

>  	page = tdx_alloc_page();
>  	if (!page)
>  		return -ENOMEM;
> -- 
> 2.51.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ