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: <CAG48ez2U5PF95HJa3XS7C_KeSDEJJhU8qVJm+khy6WJUM3esBA@mail.gmail.com>
Date: Tue, 21 Jan 2025 22:56:26 +0100
From: Jann Horn <jannh@...gle.com>
To: Michael Kelley <mhklinux@...look.com>
Cc: "riel@...riel.com" <riel@...riel.com>, "x86@...nel.org" <x86@...nel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "bp@...en8.de" <bp@...en8.de>, 
	"peterz@...radead.org" <peterz@...radead.org>, 
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, 
	"zhengqi.arch@...edance.com" <zhengqi.arch@...edance.com>, "nadav.amit@...il.com" <nadav.amit@...il.com>, 
	"thomas.lendacky@....com" <thomas.lendacky@....com>, "kernel-team@...a.com" <kernel-team@...a.com>, 
	"linux-mm@...ck.org" <linux-mm@...ck.org>, 
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>, 
	"andrew.cooper3@...rix.com" <andrew.cooper3@...rix.com>
Subject: Re: [PATCH v5 00/12] AMD broadcast TLB invalidation

On Tue, Jan 21, 2025 at 10:39 PM Michael Kelley <mhklinux@...look.com> wrote:
> From: Jann Horn <jannh@...gle.com> Sent: Tuesday, January 21, 2025 9:22 AM
> >
> > On Thu, Jan 16, 2025 at 7:14 PM Michael Kelley <mhklinux@...look.com> wrote:
> > > We had an earlier thread about INVLPGB/TLBSYNC in a VM [1]. It
> > > turns out that Hyper-V in the Azure public cloud enables
> > > INVLPGB/TLBSYNC in Confidential VMs (CVMs, which conform to the
> > > Linux concept of a CoCo VM) running on AMD processors using SEV-SNP.
> > > The CPUID instruction in a such a VM reports the enablement as
> > > expected. The instructions are *not* enabled in general purpose VMs
> > > running on the same AMD processors. The enablement is a natural
> > > outgrowth of CoCo VM's wanting to be able to avoid a dependency on
> > > the untrusted hypervisor to perform TLB flushes.
> >
> > What is this current dependency on the untrusted hypervisor? Is it
> > just the PV TLB flushing optimization for preempted vCPUs?
>
> On Hyper-V, the PV TLB flushing is a performance optimization to avoid
> the overhead of the IPIs, and the overhead of trapping the TLB flush
> instructions to the hypervisor. Both are expensive in a guest, and making

Is the hypervisor even able to trap TLB flushing instructions for a
CoCo VM? Looking at vc_handle_exitcode(), I don't see any support for
handling #VC caused by TLB invalidation; and my understanding is that
the measured guest code would need to include such handling to allow
the hypervisor to emulate an instruction? But I don't know how this
stuff works particularly well, I might well be totally wrong about this.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ