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: <90fdbf67cd7d7207d0fe6eaa8339cdb4449a227f.camel@intel.com>
Date: Thu, 16 Jan 2025 22:11:02 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "kvm@...r.kernel.org" <kvm@...r.kernel.org>, "pbonzini@...hat.com"
	<pbonzini@...hat.com>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: "Zhao, Yan Y" <yan.y.zhao@...el.com>, "Huang, Kai" <kai.huang@...el.com>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH v3 00/14] x86/virt/tdx: Add SEAMCALL wrappers for KVM

On Wed, 2025-01-15 at 20:36 +0100, Paolo Bonzini wrote:
> On 1/15/25 20:14, Edgecombe, Rick P wrote:
> > It looks like you missed these build issues and bugs from v2:
> > https://lore.kernel.org/ 
> > kvm/6345272506c5bc707f11b6f54c4bd5015cedcd95.camel@...el.com/
> > https://lore.kernel.org/ 
> > kvm/3f8fa8fc98b532add1ff14034c0c868cdbeca7f8.camel@...el.com/
> 
> I did, I'll update tomorrow and repost.

Hey, one more thing, we've been seeing some compiler sensitive warnings about
stack frame size in init_tdx_module() in the latest kvm-coco-queue. The struct
tdx_sys_info is the main stack allocated variable in that function.

In this commit (x86/virt/tdx: Read essential global metadata for KVM), struct
tdx_sys_info gets expanded a huge amount:
https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?h=kvm-coco-queue&id=6691a42a26844247526ed08aa21ee748a949c408


And in this later commit(KVM: VMX: Initialize TDX during KVM module load), the
stack allocated variable is moved to a static allocation:
https://git.kernel.org/pub/scm/virt/kvm/kvm.git/commit/?h=kvm-coco-queue&id=34f786697b382750739f8c4e13ebb3da348c307c

So the move of the arch/x86 patches earlier opens up a window where, depending
on compiler optimizations, the stack size may be 3304 and trigger
CONFIG_FRAME_WARN related errors.

The solution could be to move the "arch/x86/virt/vmx/tdx/tdx.c" related changes
in the second patch to a separate patch and put it before the first one, or swap
the order of the two patches. These changes are before the VM/vCPU creation
patches, so I think that would be your area. But let me know if you want to get
a bigger posting back from us to include it all.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ