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: <d9b9efaaf192d4f8b6fa4d93f964dfc7a6493e5c.camel@intel.com>
Date: Fri, 19 Sep 2025 19:26:20 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "linux-coco@...ts.linux.dev"
	<linux-coco@...ts.linux.dev>, "Huang, Kai" <kai.huang@...el.com>, "Zhao, Yan
 Y" <yan.y.zhao@...el.com>, "dave.hansen@...ux.intel.com"
	<dave.hansen@...ux.intel.com>, "kas@...nel.org" <kas@...nel.org>,
	"seanjc@...gle.com" <seanjc@...gle.com>, "mingo@...hat.com"
	<mingo@...hat.com>, "pbonzini@...hat.com" <pbonzini@...hat.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>, "Yamahata, Isaku"
	<isaku.yamahata@...el.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "Annapurve, Vishal" <vannapurve@...gle.com>,
	"Gao, Chao" <chao.gao@...el.com>, "bp@...en8.de" <bp@...en8.de>,
	"x86@...nel.org" <x86@...nel.org>
Subject: Re: [PATCH v3 03/16] x86/virt/tdx: Simplify tdmr_get_pamt_sz()

On Fri, 2025-09-19 at 00:50 +0000, Huang, Kai wrote:
> > +				  nid, &node_online_map);
> > +	if (!pamt) {
> > +		/* Zero base so that the error path will skip freeing. */
> > +		tdmr->pamt_4k_base = 0;
> >   		return -ENOMEM;
> 
> Do you need to zero the base here?  IIUC, it hasn't been setup yet if PAMT
> allocation fails.  All TDMRs are allocated with __GFP_ZERO, so it should
> be 0 already when PAMT allocation fails here.

Oh, you are right. It's zero allocated. Hmm a comment should probably go
somewhere still.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ