All of lore.kernel.org
 help / color / mirror / Atom feed
* [stable-3.4] possibly revert "KVM: X86 emulator: fix source operand decoding..."
@ 2013-09-04 16:44 Paul Gortmaker
  2013-09-10 11:05 ` Paolo Bonzini
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Gortmaker @ 2013-09-04 16:44 UTC (permalink / raw)
  To: gregkh; +Cc: gleb, kvm, stable-commits

Hi Greg,

The 3.4.44+ cherry pick:

  ----------------
  commit 5b5b30580218eae22609989546bac6e44d0eda6e
  Author: Gleb Natapov <gleb@redhat.com>
  Date:   Wed Apr 24 13:38:36 2013 +0300

    KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x instructions
    
    commit 660696d1d16a71e15549ce1bf74953be1592bcd3 upstream.
    
    Source operand for one byte mov[zs]x is decoded incorrectly if it is in
    high byte register. Fix that.
    
    Signed-off-by: Gleb Natapov <gleb@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  ----------------

introduces the following:

arch/x86/kvm/emulate.c: In function ‘decode_operand’:
arch/x86/kvm/emulate.c:3974:4: warning: passing argument 1 of ‘decode_register’ makes integer from pointer without a cast [enabled by default]
arch/x86/kvm/emulate.c:789:14: note: expected ‘u8’ but argument is of type ‘struct x86_emulate_ctxt *’
arch/x86/kvm/emulate.c:3974:4: warning: passing argument 2 of ‘decode_register’ makes pointer from integer without a cast [enabled by default]
arch/x86/kvm/emulate.c:789:14: note: expected ‘long unsigned int *’ but argument is of type ‘u8’

Based on the severity of the warnings above, I'm reasonably sure there will
be some kind of runtime regressions due to this, but I stopped to investigate
the warnings as soon as I saw them, before any run time testing.

It happens because mainline v3.7-rc1~113^2~40 (dd856efafe60) does this:

-static void *decode_register(u8 modrm_reg, unsigned long *regs,
+static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm_reg,

Since 660696d1d16a71e1 was only applied to stable 3.4, 3.8, and 3.9 -- and
the prerequisite above is in 3.7+, the issue should be limited to 3.4.44+

Thanks,
Paul.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [stable-3.4] possibly revert "KVM: X86 emulator: fix source operand decoding..."
  2013-09-04 16:44 [stable-3.4] possibly revert "KVM: X86 emulator: fix source operand decoding..." Paul Gortmaker
@ 2013-09-10 11:05 ` Paolo Bonzini
  2013-09-12 16:55   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2013-09-10 11:05 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: gregkh, gleb, kvm, stable-commits

Il 04/09/2013 18:44, Paul Gortmaker ha scritto:
> Hi Greg,
> 
> The 3.4.44+ cherry pick:
> 
>   ----------------
>   commit 5b5b30580218eae22609989546bac6e44d0eda6e
>   Author: Gleb Natapov <gleb@redhat.com>
>   Date:   Wed Apr 24 13:38:36 2013 +0300
> 
>     KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x instructions
>     
>     commit 660696d1d16a71e15549ce1bf74953be1592bcd3 upstream.
>     
>     Source operand for one byte mov[zs]x is decoded incorrectly if it is in
>     high byte register. Fix that.
>     
>     Signed-off-by: Gleb Natapov <gleb@redhat.com>
>     Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>   ----------------
> 
> introduces the following:
> 
> arch/x86/kvm/emulate.c: In function ‘decode_operand’:
> arch/x86/kvm/emulate.c:3974:4: warning: passing argument 1 of ‘decode_register’ makes integer from pointer without a cast [enabled by default]
> arch/x86/kvm/emulate.c:789:14: note: expected ‘u8’ but argument is of type ‘struct x86_emulate_ctxt *’
> arch/x86/kvm/emulate.c:3974:4: warning: passing argument 2 of ‘decode_register’ makes pointer from integer without a cast [enabled by default]
> arch/x86/kvm/emulate.c:789:14: note: expected ‘long unsigned int *’ but argument is of type ‘u8’
> 
> Based on the severity of the warnings above, I'm reasonably sure there will
> be some kind of runtime regressions due to this, but I stopped to investigate
> the warnings as soon as I saw them, before any run time testing.
> 
> It happens because mainline v3.7-rc1~113^2~40 (dd856efafe60) does this:
> 
> -static void *decode_register(u8 modrm_reg, unsigned long *regs,
> +static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm_reg,
> 
> Since 660696d1d16a71e1 was only applied to stable 3.4, 3.8, and 3.9 -- and
> the prerequisite above is in 3.7+, the issue should be limited to 3.4.44+

Right, the fix is not important to have for 3.4 kernels.

Paolo


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [stable-3.4] possibly revert "KVM: X86 emulator: fix source operand decoding..."
  2013-09-10 11:05 ` Paolo Bonzini
@ 2013-09-12 16:55   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2013-09-12 16:55 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Paul Gortmaker, gleb, kvm, stable-commits

On Tue, Sep 10, 2013 at 01:05:21PM +0200, Paolo Bonzini wrote:
> Il 04/09/2013 18:44, Paul Gortmaker ha scritto:
> > Hi Greg,
> > 
> > The 3.4.44+ cherry pick:
> > 
> >   ----------------
> >   commit 5b5b30580218eae22609989546bac6e44d0eda6e
> >   Author: Gleb Natapov <gleb@redhat.com>
> >   Date:   Wed Apr 24 13:38:36 2013 +0300
> > 
> >     KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x instructions
> >     
> >     commit 660696d1d16a71e15549ce1bf74953be1592bcd3 upstream.
> >     
> >     Source operand for one byte mov[zs]x is decoded incorrectly if it is in
> >     high byte register. Fix that.
> >     
> >     Signed-off-by: Gleb Natapov <gleb@redhat.com>
> >     Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >   ----------------
> > 
> > introduces the following:
> > 
> > arch/x86/kvm/emulate.c: In function ‘decode_operand’:
> > arch/x86/kvm/emulate.c:3974:4: warning: passing argument 1 of ‘decode_register’ makes integer from pointer without a cast [enabled by default]
> > arch/x86/kvm/emulate.c:789:14: note: expected ‘u8’ but argument is of type ‘struct x86_emulate_ctxt *’
> > arch/x86/kvm/emulate.c:3974:4: warning: passing argument 2 of ‘decode_register’ makes pointer from integer without a cast [enabled by default]
> > arch/x86/kvm/emulate.c:789:14: note: expected ‘long unsigned int *’ but argument is of type ‘u8’
> > 
> > Based on the severity of the warnings above, I'm reasonably sure there will
> > be some kind of runtime regressions due to this, but I stopped to investigate
> > the warnings as soon as I saw them, before any run time testing.
> > 
> > It happens because mainline v3.7-rc1~113^2~40 (dd856efafe60) does this:
> > 
> > -static void *decode_register(u8 modrm_reg, unsigned long *regs,
> > +static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm_reg,
> > 
> > Since 660696d1d16a71e1 was only applied to stable 3.4, 3.8, and 3.9 -- and
> > the prerequisite above is in 3.7+, the issue should be limited to 3.4.44+
> 
> Right, the fix is not important to have for 3.4 kernels.

Thanks for letting me know, I've now reverted it.

greg k-h

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-12 16:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-04 16:44 [stable-3.4] possibly revert "KVM: X86 emulator: fix source operand decoding..." Paul Gortmaker
2013-09-10 11:05 ` Paolo Bonzini
2013-09-12 16:55   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.