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: <Y0jiqr3axA49RvDJ@google.com>
Date:   Fri, 14 Oct 2022 04:16:42 +0000
From:   Sean Christopherson <seanjc@...gle.com>
To:     Hou Wenlong <houwenlong.hwl@...group.com>
Cc:     kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86: Mark transfer type as X86_TRANSFER_RET when
 loading CS in iret emulation

On Thu, Oct 13, 2022, Hou Wenlong wrote:
> On Thu, Oct 13, 2022 at 12:34:57AM +0800, Sean Christopherson wrote:
> > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> > index 3b27622d4642..fe735e18c419 100644
> > --- a/arch/x86/kvm/emulate.c
> > +++ b/arch/x86/kvm/emulate.c
> > @@ -1641,6 +1641,14 @@ static int __load_segment_descriptor(struct x86_emulate_ctxt *ctxt,
> >                         goto exception;
> >                 break;
> >         case VCPU_SREG_CS:
> > +               /*
> > +                * KVM uses "none" when loading CS as part of emulating Real
> > +                * Mode exceptions and IRET (handled above).  In all other
> > +                * cases, loading CS without a control transfer is a KVM bug.
> > +                */
> > +               if (WARN_ON_ONCE(transfer == X86_TRANSFER_NONE))
> > +                       goto exception;
> > +
> >                 if (!(seg_desc.type & 8))
> >                         goto exception;
> >
> Do I need to prepare this patch or you will add this directly?

No preference.  Feel free to post a patch, if not I'll get to it soon-ish.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ