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:	Sun, 15 Jan 2012 11:56:52 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Nadav Amit <namit@...technion.ac.il>
CC:	Marcelo Tosatti <mtosatti@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
	Nadav Amit <nadav.amit@...il.com>
Subject: Re: [PATCH] KVM: Fix MOVSX emulation

On 01/14/2012 08:34 PM, Nadav Amit wrote:
> The destination register of MOVSX should be decoded similarily to MOVZX.
>
> Signed-off-by: Nadav Amit <nadav.amit@...il.com>
> ---
>  arch/x86/kvm/emulate.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 05a562b..7644a83 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -3553,7 +3553,8 @@ static int decode_operand(struct x86_emulate_ctxt *ctxt, struct operand *op,
>  	case OpReg:
>  		decode_register_operand(ctxt, op,
>  			 op == &ctxt->dst &&
> -			 ctxt->twobyte && (ctxt->b == 0xb6 || ctxt->b == 0xb7));
> +			 ctxt->twobyte && ((ctxt->b & 0xfe) == 0xb6 ||
> +				(ctxt->b & 0xfe) == 0xbe));
>  		break;
>  	case OpImmUByte:
>  		rc = decode_imm(ctxt, op, 1, false);

Please post a unit test for this.  See
git://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git x86/emulate.c.

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ