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
| ||
|
Date: Thu, 27 Oct 2022 08:31:21 -0700 From: Andi Kleen <ak@...ux.intel.com> To: Kai Huang <kai.huang@...el.com>, linux-kernel@...r.kernel.org, kvm@...r.kernel.org Cc: linux-mm@...ck.org, seanjc@...gle.com, pbonzini@...hat.com, dave.hansen@...el.com, dan.j.williams@...el.com, rafael.j.wysocki@...el.com, kirill.shutemov@...ux.intel.com, reinette.chatre@...el.com, len.brown@...el.com, tony.luck@...el.com, peterz@...radead.org, isaku.yamahata@...el.com, chao.gao@...el.com, sathyanarayanan.kuppuswamy@...ux.intel.com, bagasdotme@...il.com, sagis@...gle.com, imammedo@...hat.com Subject: Re: [PATCH v6 12/21] x86/virt/tdx: Add placeholder to construct TDMRs to cover all TDX memory regions > +/* Calculate the actual TDMR_INFO size */ > +static inline int cal_tdmr_size(void) > +{ > + int tdmr_sz; > + > + /* > + * The actual size of TDMR_INFO depends on the maximum number > + * of reserved areas. > + */ > + tdmr_sz = sizeof(struct tdmr_info); > + tdmr_sz += sizeof(struct tdmr_reserved_area) * > + tdx_sysinfo.max_reserved_per_tdmr; would seem safer to have a overflow check here.
Powered by blists - more mailing lists