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:   Fri, 4 May 2018 23:49:44 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Luwei Kang <luwei.kang@...el.com>
Cc:     kvm@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
        hpa@...or.com, x86@...nel.org, rkrcmar@...hat.com,
        linux-kernel@...r.kernel.org, joro@...tes.org,
        peterz@...radead.org, chao.p.peng@...ux.intel.com
Subject: Re: [PATCH v7 09/13] KVM: x86: Implement Intel Processor Trace
 context switch

On 04/05/2018 12:29, Alexander Shishkin wrote:
> On Thu, May 03, 2018 at 08:08:39PM +0800, Luwei Kang wrote:
>> +static void pt_guest_enter(struct vcpu_vmx *vmx)
>> +{
>> +	if (pt_mode == PT_MODE_HOST || pt_mode == PT_MODE_HOST_GUEST)
>> +		rdmsrl(MSR_IA32_RTIT_CTL, vmx->pt_desc.host.ctl);
>> +
>> +	if (pt_mode == PT_MODE_HOST_GUEST &&
>> +		vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN) {
>> +		wrmsrl(MSR_IA32_RTIT_CTL, 0);
>> +		pt_save_msr(&vmx->pt_desc.host, vmx->pt_desc.range_cnt);
>> +		pt_load_msr(&vmx->pt_desc.guest, vmx->pt_desc.range_cnt);
>> +	}
>> +}
>> +
>> +static void pt_guest_exit(struct vcpu_vmx *vmx)
>> +{
>> +	if (pt_mode == PT_MODE_HOST_GUEST &&
>> +		vmx->pt_desc.guest.ctl & RTIT_CTL_TRACEEN) {
>> +		pt_save_msr(&vmx->pt_desc.guest, vmx->pt_desc.range_cnt);
>> +		pt_load_msr(&vmx->pt_desc.host, vmx->pt_desc.range_cnt);
>> +	}
>> +
>> +	if (pt_mode == PT_MODE_HOST || pt_mode == PT_MODE_HOST_GUEST)
>> +		wrmsrl(MSR_IA32_RTIT_CTL, vmx->pt_desc.host.ctl);
>> +}
> 
> This means that a host PT event won't get the guest traces and won't get
> any notification as to what'd happened or why. At the minimum we need to
> send a PARTIAL AUX record at the pt_guest_enter(), when we turn the host
> tracing off.

How do you do that? :)

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ