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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMvTesChp_kSNrJA6oCu8iZ6xFQReckRQU-_EGO7jjBPD_FUJQ@mail.gmail.com>
Date: Fri, 14 Mar 2025 09:41:30 +0800
From: Tianyu Lan <ltykernel@...il.com>
To: Michael Kelley <mhklinux@...look.com>
Cc: "kys@...rosoft.com" <kys@...rosoft.com>, "haiyangz@...rosoft.com" <haiyangz@...rosoft.com>, 
	"wei.liu@...nel.org" <wei.liu@...nel.org>, "decui@...rosoft.com" <decui@...rosoft.com>, 
	"tglx@...utronix.de" <tglx@...utronix.de>, "mingo@...hat.com" <mingo@...hat.com>, "bp@...en8.de" <bp@...en8.de>, 
	"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>, "x86@...nel.org" <x86@...nel.org>, 
	"hpa@...or.com" <hpa@...or.com>, Tianyu Lan <tiala@...rosoft.com>, 
	"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, 
	"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] x86/Hyperv: Fix check of return value from snp_set_vmsa()

On Fri, Mar 14, 2025 at 4:20 AM Michael Kelley <mhklinux@...look.com> wrote:
>
> From: Tianyu Lan <ltykernel@...il.com> Sent: Thursday, March 13, 2025 1:52 AM
> >
> > snp_set_vmsa() returns 0 as success result and so fix it.
> >
> > Cc: stable@...r.kernel.org
> > Fixes: 44676bb9d566 ("x86/hyperv: Add smp support for SEV-SNP guest")
> > Signed-off-by: Tianyu Lan <tiala@...rosoft.com>
> > ---
> >  arch/x86/hyperv/ivm.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/arch/x86/hyperv/ivm.c b/arch/x86/hyperv/ivm.c
> > index ec7880271cf9..77bf05f06b9e 100644
> > --- a/arch/x86/hyperv/ivm.c
> > +++ b/arch/x86/hyperv/ivm.c
> > @@ -338,7 +338,7 @@ int hv_snp_boot_ap(u32 cpu, unsigned long start_ip)
> >       vmsa->sev_features = sev_status >> 2;
> >
> >       ret = snp_set_vmsa(vmsa, true);
> > -     if (!ret) {
> > +     if (ret) {
> >               pr_err("RMPADJUST(%llx) failed: %llx\n", (u64)vmsa, ret);
> >               free_page((u64)vmsa);
> >               return ret;
> > --
> > 2.25.1
> >
>
> Yes, with this change the code is now consistent with other call sites for
> snp_set_vmsa() and for direct invocation of rmpadjust().
>
> Reviewed-by: Michael Kelley <mhklinux@...look.com>

Thank you for your review, Michael!

-- 
Thanks
Tianyu Lan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ