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]
Date: Wed, 7 Feb 2024 10:58:43 +0530
From: Amit Machhiwal <amachhiw@...ux.ibm.com>
To: Michael Ellerman <mpe@...erman.id.au>, linuxppc-dev@...ts.ozlabs.org,
        kvm@...r.kernel.org, kvm-ppc@...r.kernel.org
Cc: Jordan Niethe <jniethe5@...il.com>, linux-kernel@...r.kernel.org,
        Nicholas Piggin <npiggin@...il.com>,
        Vaidyanathan Srinivasan <svaidy@...ux.ibm.com>,
        "Aneesh Kumar K . V" <aneesh.kumar@...nel.org>,
        "Naveen N . Rao" <naveen.n.rao@...ux.ibm.com>,
        Vaibhav Jain <vaibhav@...ux.ibm.com>
Subject: Re: Re: [PATCH v3] KVM: PPC: Book3S HV: Fix L2 guest reboot failure
 due to empty 'arch_compat'

Hi Michael,

Thanks for looking into the patch and your comments.

On 2024/02/06 09:09 PM, Michael Ellerman wrote:
> Hi Amit,
> 
> One comment below ...
> 
> Amit Machhiwal <amachhiw@...ux.ibm.com> writes:
> > Currently, rebooting a pseries nested qemu-kvm guest (L2) results in
> > below error as L1 qemu sends PVR value 'arch_compat' == 0 via
> > ppc_set_compat ioctl. This triggers a condition failure in
> > kvmppc_set_arch_compat() resulting in an EINVAL.
> ...
> >  	
> > diff --git a/arch/powerpc/kvm/book3s_hv_nestedv2.c b/arch/powerpc/kvm/book3s_hv_nestedv2.c
> > index 5378eb40b162..6042bdc70230 100644
> > --- a/arch/powerpc/kvm/book3s_hv_nestedv2.c
> > +++ b/arch/powerpc/kvm/book3s_hv_nestedv2.c
> > @@ -347,8 +348,26 @@ static int gs_msg_ops_vcpu_fill_info(struct kvmppc_gs_buff *gsb,
> >  			break;
> >  		}
> >  		case KVMPPC_GSID_LOGICAL_PVR:
> > -			rc = kvmppc_gse_put_u32(gsb, iden,
> > -						vcpu->arch.vcore->arch_compat);
> > +			/*
> > +			 * Though 'arch_compat == 0' would mean the default
> > +			 * compatibility, arch_compat, being a Guest Wide
> > +			 * Element, cannot be filled with a value of 0 in GSB
> > +			 * as this would result into a kernel trap.
> > +			 * Hence, when `arch_compat == 0`, arch_compat should
> > +			 * default to L1's PVR.
> > +			 *
> > +			 * Rework this when PowerVM supports a value of 0
> > +			 * for arch_compat for KVM API v2.
> > +			 */
> 
> Is there an actual plan that PowerVM will support this in future?
> 
> If so, how will a future kernel know that it's running on a version of
> PowerVM that does support arch_compat == 0?
> 
> Similarly how will we know when it's OK to drop support for this
> workaround?

I'm sending a v4 based on an off mailing list discussion.

> 
> cheers

~Amit

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ