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: <aNxSwL_Wga9XP-0z@liuwe-devbox-ubuntu-v2.lamzopl0uupeniq2etz1fddiyg.xx.internal.cloudapp.net>
Date: Tue, 30 Sep 2025 21:59:28 +0000
From: Wei Liu <wei.liu@...nel.org>
To: Michael Kelley <mhklinux@...look.com>
Cc: Roman Kisel <romank@...ux.microsoft.com>,
	"arnd@...db.de" <arnd@...db.de>, "bp@...en8.de" <bp@...en8.de>,
	"corbet@....net" <corbet@....net>,
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
	"decui@...rosoft.com" <decui@...rosoft.com>,
	"haiyangz@...rosoft.com" <haiyangz@...rosoft.com>,
	"hpa@...or.com" <hpa@...or.com>,
	"kys@...rosoft.com" <kys@...rosoft.com>,
	"mikelley@...rosoft.com" <mikelley@...rosoft.com>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"Tianyu.Lan@...rosoft.com" <Tianyu.Lan@...rosoft.com>,
	"wei.liu@...nel.org" <wei.liu@...nel.org>,
	"x86@...nel.org" <x86@...nel.org>,
	"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
	"benhill@...rosoft.com" <benhill@...rosoft.com>,
	"bperkins@...rosoft.com" <bperkins@...rosoft.com>,
	"sunilmut@...rosoft.com" <sunilmut@...rosoft.com>
Subject: Re: [PATCH hyperv-next v5 04/16] arch/x86: mshyperv: Trap on access
 for some synthetic MSRs

On Tue, Sep 09, 2025 at 03:11:47AM +0000, Michael Kelley wrote:
> From: Roman Kisel <romank@...ux.microsoft.com> Sent: Wednesday, August 27, 2025 6:06 PM
> > 
> > hv_set_non_nested_msr() has special handling for SINT MSRs
> > when a paravisor is present. In addition to updating the MSR on the
> > host, the mirror MSR in the paravisor is updated, including with the
> > proxy bit. But with Confidential VMBus, the proxy bit must not be
> > used, so add a special case to skip it.
> > 
> > Signed-off-by: Roman Kisel <romank@...ux.microsoft.com>
> > Reviewed-by: Alok Tiwari <alok.a.tiwari@...cle.com>
> > Reviewed-by: Tianyu Lan <tiala@...rosoft.com>
> > ---
[...]
> > diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
> > index a619b661275b..5e2c6fd637d2 100644
> > --- a/arch/x86/kernel/cpu/mshyperv.c
> > +++ b/arch/x86/kernel/cpu/mshyperv.c
> > @@ -28,6 +28,7 @@
> >  #include <asm/apic.h>
> >  #include <asm/timer.h>
> >  #include <asm/reboot.h>
> > +#include <asm/msr.h>
> >  #include <asm/nmi.h>
> >  #include <clocksource/hyperv_timer.h>
> >  #include <asm/msr.h>
> > @@ -38,6 +39,16 @@
> >  bool hv_nested;
> >  struct ms_hyperv_info ms_hyperv;
> > 
> > +#define HYPERV_SINT_PROXY_ENABLE	BIT(20)
> > +#define HYPERV_SINT_PROXY_DISABLE	0
> 
> Seems like these definitions belong in hvgdk_mini.h together with
> the definition of "union hv_synic_sint". Since that union already
> defines the "proxy" field, the definitions really should be in terms
> of that field (though I'd have to fiddle with the code to figure out
> if there's a reasonable way to do that).
> 

If we use sint.proxy (or sint->proxy) then we don't even need this
definition. I think this is only needed because the code writes u64
directly to the MSR without reinterpreting it as hv_synic_sint.

Wei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ