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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 13 Apr 2010 17:29:23 +0200
From:	Johannes Stezenbach <js@...21.net>
To:	Rusty Russell <rusty@...tcorp.com.au>
Cc:	lguest@...abs.org, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Arjan van de Ven <arjan@...radead.org>,
	Gaurav Kukreja <mailme.gaurav@...il.com>
Subject: Re: [Lguest]  2.6.33 guest crash (was: Re: 2.6.32-rc5 guest crash)

Hi Rusty,

On Tue, Mar 30, 2010 at 02:57:14PM +1030, Rusty Russell wrote:
> 
> Subject: lguest: workaround cmpxchg8b_emu by ignoring cli in the guest.
> 
> It's only used by cmpxchg8b_emu (see db677ffa5f5a for the gory
> details), and fixing that to be paravirt aware would be more work than
> simply ignoring it (and AFAICT only help lguest).
> 
> (We can't emulate it properly: the popf which expects to restore interrupts
> does not trap).
> 
> Signed-off-by: Rusty Russell <rusty@...tcorp.com.au>
> Cc: Jeremy Fitzhardinge <jeremy@...source.com>
> Cc: virtualization@...ts.osdl.org
> 
> diff --git a/drivers/lguest/x86/core.c b/drivers/lguest/x86/core.c
> --- a/drivers/lguest/x86/core.c
> +++ b/drivers/lguest/x86/core.c
> @@ -288,6 +288,18 @@ static int emulate_insn(struct lg_cpu *c
>  	insn = lgread(cpu, physaddr, u8);
>  
>  	/*
> +	 * Around 2.6.33, the kernel started using an emulation for the
> +	 * cmpxchg8b instruction in early boot on many configurations.  This
> +	 * code isn't paravirtualized, and it tries to disable interrupts.
> +	 * Ignore it, which will Mostly Work.
> +	 */
> +	if (insn == 0xfa) {
> +		/* "cli", or Clear Interrupt Enable instruction.  Skip it. */ 
> +		cpu->regs->eip++;
> +		return 1;
> +	}
> +
> +	/*
>  	 * 0x66 is an "operand prefix".  It means it's using the upper 16 bits
>  	 * of the eax register.
>  	 */
> 

I just tested this patch with 2.6.34-rc4 (as both host and guest),
it seems to work fine.


Thanks,
Johannes
--
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