From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [stable-3.4] possibly revert "KVM: X86 emulator: fix source operand decoding..." Date: Tue, 10 Sep 2013 13:05:21 +0200 Message-ID: <522EFCF1.6070909@redhat.com> References: <20130904164415.GA23288@windriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: gregkh@linuxfoundation.org, gleb@redhat.com, kvm@vger.kernel.org, stable-commits@vger.kernel.org To: Paul Gortmaker Return-path: Received: from mail-ea0-f173.google.com ([209.85.215.173]:58316 "EHLO mail-ea0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751075Ab3IJLFR (ORCPT ); Tue, 10 Sep 2013 07:05:17 -0400 In-Reply-To: <20130904164415.GA23288@windriver.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 04/09/2013 18:44, Paul Gortmaker ha scritto: > Hi Greg, >=20 > The 3.4.44+ cherry pick: >=20 > ---------------- > commit 5b5b30580218eae22609989546bac6e44d0eda6e > Author: Gleb Natapov > Date: Wed Apr 24 13:38:36 2013 +0300 >=20 > KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x = instructions > =20 > commit 660696d1d16a71e15549ce1bf74953be1592bcd3 upstream. > =20 > Source operand for one byte mov[zs]x is decoded incorrectly if it= is in > high byte register. Fix that. > =20 > Signed-off-by: Gleb Natapov > Signed-off-by: Greg Kroah-Hartman > ---------------- >=20 > introduces the following: >=20 > arch/x86/kvm/emulate.c: In function =E2=80=98decode_operand=E2=80=99: > arch/x86/kvm/emulate.c:3974:4: warning: passing argument 1 of =E2=80=98= decode_register=E2=80=99 makes integer from pointer without a cast [ena= bled by default] > arch/x86/kvm/emulate.c:789:14: note: expected =E2=80=98u8=E2=80=99 bu= t argument is of type =E2=80=98struct x86_emulate_ctxt *=E2=80=99 > arch/x86/kvm/emulate.c:3974:4: warning: passing argument 2 of =E2=80=98= decode_register=E2=80=99 makes pointer from integer without a cast [ena= bled by default] > arch/x86/kvm/emulate.c:789:14: note: expected =E2=80=98long unsigned = int *=E2=80=99 but argument is of type =E2=80=98u8=E2=80=99 >=20 > Based on the severity of the warnings above, I'm reasonably sure ther= e will > be some kind of runtime regressions due to this, but I stopped to inv= estigate > the warnings as soon as I saw them, before any run time testing. >=20 > It happens because mainline v3.7-rc1~113^2~40 (dd856efafe60) does thi= s: >=20 > -static void *decode_register(u8 modrm_reg, unsigned long *regs, > +static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm= _reg, >=20 > 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= =2E44+ Right, the fix is not important to have for 3.4 kernels. Paolo