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]
Date:   Thu, 7 Oct 2021 20:53:46 +0530
From:   Naresh Kamboju <naresh.kamboju@...aro.org>
To:     Paolo Bonzini <pbonzini@...hat.com>
Cc:     Sasha Levin <sashal@...nel.org>,
        open list <linux-kernel@...r.kernel.org>,
        linux-stable <stable@...r.kernel.org>,
        Maxim Levitsky <mlevitsk@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        X86 ML <x86@...nel.org>, kvm list <kvm@...r.kernel.org>
Subject: Re: [PATCH MANUALSEL 5.14 4/9] KVM: x86: reset pdptrs_from_userspace
 when exiting smm

On Wed, 6 Oct 2021 at 19:06, Paolo Bonzini <pbonzini@...hat.com> wrote:
>
> On 06/10/21 15:30, Sasha Levin wrote:
> > From: Maxim Levitsky <mlevitsk@...hat.com>
> >
> > [ Upstream commit 37687c403a641f251cb2ef2e7830b88aa0647ba9 ]
> >
> > When exiting SMM, pdpts are loaded again from the guest memory.
> >
> > This fixes a theoretical bug, when exit from SMM triggers entry to the
> > nested guest which re-uses some of the migration
> > code which uses this flag as a workaround for a legacy userspace.
> >
> > Signed-off-by: Maxim Levitsky <mlevitsk@...hat.com>
> > Message-Id: <20210913140954.165665-4-mlevitsk@...hat.com>
> > Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
> > Signed-off-by: Sasha Levin <sashal@...nel.org>
> > ---
> >   arch/x86/kvm/x86.c | 7 +++++++
> >   1 file changed, 7 insertions(+)
> >
> > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> > index b3f855d48f72..1e7d629bbf36 100644
> > --- a/arch/x86/kvm/x86.c
> > +++ b/arch/x86/kvm/x86.c
> > @@ -7659,6 +7659,13 @@ static void kvm_smm_changed(struct kvm_vcpu *vcpu, bool entering_smm)
> >
> >               /* Process a latched INIT or SMI, if any.  */
> >               kvm_make_request(KVM_REQ_EVENT, vcpu);
> > +
> > +             /*
> > +              * Even if KVM_SET_SREGS2 loaded PDPTRs out of band,
> > +              * on SMM exit we still need to reload them from
> > +              * guest memory
> > +              */
> > +             vcpu->arch.pdptrs_from_userspace = false;
> >       }
> >
> >       kvm_mmu_reset_context(vcpu);
> >
>
> Acked-by: Paolo Bonzini <pbonzini@...hat.com>

Is this expected to be in stable-rc 5.10 and below ?
Because it is breaking the builds on queue/5.10, queue/5.4 and older branches.

arch/x86/kvm/x86.c: In function 'kvm_smm_changed':
arch/x86/kvm/x86.c:6612:27: error: 'struct kvm_vcpu_arch' has no
member named 'pdptrs_from_userspace'
 6612 |                 vcpu->arch.pdptrs_from_userspace = false;
      |                           ^
make[3]: *** [scripts/Makefile.build:262: arch/x86/kvm/x86.o] Error 1

ref:
https://gitlab.com/Linaro/lkft/mirrors/stable/linux-stable-rc-queues/-/jobs/1658987088#L443

- Naresh

Powered by blists - more mailing lists