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]
Message-ID: <4B2DE0A9.4090400@redhat.com>
Date:	Sun, 20 Dec 2009 10:30:33 +0200
From:	Avi Kivity <avi@...hat.com>
To:	Frederic Weisbecker <fweisbec@...il.com>
CC:	Roland McGrath <roland@...hat.com>,
	Jan Kiszka <jan.kiszka@...mens.com>,
	Oleg Nesterov <oleg@...hat.com>,
	"K.Prasad" <prasad@...ux.vnet.ibm.com>,
	Alan Stern <stern@...land.harvard.edu>,
	Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
	utrace-devel@...hat.com
Subject: Re: x86: do_debug && PTRACE_SINGLESTEP broken by	08d68323d1f0c34452e614263b212ca556dae47f

On 12/19/2009 01:15 AM, Frederic Weisbecker wrote:
>
>> Apparently it does.  You should hack some printks into do_debug() and see
>> how kvm is differing from real hardware.  (Actually you can probably do
>> this with a notifier added by a module, not that you are shy about
>> recompiling!)
>>
>> Probably kvm's emulation of the hardware behavior wrt the DR6 bits is not
>> sufficiently faithful.  Conceivably, kvm is being consistent with some
>> older hardware and we have encoded assumptions that only newer hardware
>> meets.  But I'd guess it's just a plain kvm bug.
>>      
>    

A kvm bug is most likely.

> It looks like in kvm, before entering the guest, we restore its
> debug registers:
>
> vcpu_enter_guest():
> 	if (unlikely(vcpu->arch.switch_db_regs)) {
> 		set_debugreg(0, 7);
> 		set_debugreg(vcpu->arch.eff_db[0], 0);
> 		set_debugreg(vcpu->arch.eff_db[1], 1);
> 		set_debugreg(vcpu->arch.eff_db[2], 2);
> 		set_debugreg(vcpu->arch.eff_db[3], 3);
> 	}
>
>
> But what happens to dr6, I don't know.
>    

That's done later, in vmx.c:vmx_vcpu_run():

     if (vcpu->arch.switch_db_regs)
         set_debugreg(vcpu->arch.dr6, 6);

Can you describe the failure?  I'll try to construct a test case 
reproducer and work with Jan to fix it.

-- 
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