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] [day] [month] [year] [list]
Date:	Fri, 24 Aug 2012 09:36:00 +0800
From:	Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
To:	Marcelo Tosatti <mtosatti@...hat.com>
CC:	f@....cnet, Avi Kivity <avi@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>, KVM <kvm@...r.kernel.org>
Subject: Re: [PATCH] KVM: trace the events of mmu_notifier

On 08/23/2012 09:08 PM, Marcelo Tosatti wrote:
> On Thu, Aug 23, 2012 at 08:30:15PM +0800, Xiao Guangrong wrote:
>> On 08/23/2012 05:24 PM, Marcelo Tosatti wrote:
>>> On Tue, Aug 21, 2012 at 05:51:35PM +0800, Xiao Guangrong wrote:
>>>> mmu_notifier is the interface to broadcast the mm events to KVM, the
>>>> tracepoints introduced in this patch can trace all these events, it is
>>>> very helpful for us to notice and fix the bug caused by mm
>>>>
>>>> Signed-off-by: Xiao Guangrong <xiaoguangrong@...ux.vnet.ibm.com>
>>>> ---
>>>>  include/trace/events/kvm.h |  121 ++++++++++++++++++++++++++++++++++++++++++++
>>>>  virt/kvm/kvm_main.c        |   19 +++++++
>>>>  2 files changed, 140 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/include/trace/events/kvm.h b/include/trace/events/kvm.h
>>>> index 7ef9e75..a855ff9 100644
>>>> --- a/include/trace/events/kvm.h
>>>> +++ b/include/trace/events/kvm.h
>>>> @@ -309,6 +309,127 @@ TRACE_EVENT(
>>>>
>>>>  #endif
>>>>
>>>> +#if defined(CONFIG_MMU_NOTIFIER) && defined(KVM_ARCH_WANT_MMU_NOTIFIER)
>>>> +DECLARE_EVENT_CLASS(mmu_notifier_address_class,
>>>> +
>>>> +	TP_PROTO(struct kvm *kvm, unsigned long address),
>>>> +
>>>> +	TP_ARGS(kvm, address),
>>>> +
>>>> +	TP_STRUCT__entry(
>>>> +		__field(struct kvm *, kvm)
>>>> +		__field(unsigned long, address)
>>>> +	),
>>>> +
>>>> +	TP_fast_assign(
>>>> +		__entry->kvm = kvm;
>>>> +		__entry->address = address;
>>>> +	),
>>>> +
>>>> +	TP_printk("kvm %p address %lx", __entry->kvm, __entry->address)
>>>
>>>
>>> Perhaps the pointer was useful for debugging, but otherwise, i don't
>>> think it should be printed.
>>
>> But this is the only information to identify the guest if may guest
>> are running.
> 
> Can't you get to task_struct, then pid?

Qemu-kvm have many threads, that means, we hardly know which pids belong
to the same kvm.

> 
> A kernel pointer to identify a task is really weird (and not consistent 
> with the other tracepoints).

Okay, if you really dislike it, i can use perf record to filter the process
then perf script to show the result, but it is not so readable because some
tracepoints can not fully decoded by perf script.

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