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: <536C0DA8.4090608@intel.com>
Date:	Thu, 08 May 2014 16:05:12 -0700
From:	Dave Hansen <dave.hansen@...el.com>
To:	Thomas Gleixner <tglx@...utronix.de>
CC:	x86@...nel.org, Peter Zijlstra <peterz@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Gleb Natapov <gleb@...hat.com>,
	Steven Rostedt <rostedt@...dmis.org>
Subject: Re: KVM_GUEST support breaks page fault tracing

On 05/08/2014 03:24 PM, Thomas Gleixner wrote:
>> > I noticed on some of my systems that page fault tracing doesn't work:
>> > 
>> > 	cd /sys/kernel/debug/tracing
>> > 	echo 1 > events/exceptions/enable
>> > 	cat trace;
>> > 	# nothing shows up
>> > 
>> > I eventually traced it down to CONFIG_KVM_GUEST.  At least in a KVM VM,
>> > enabling that option breaks page fault tracing, and disabling fixes it.
>> >  I tried on some old kernels and this does not appear to be a
>> > regression: it never worked.
>> > 
>> > Anybody have any theories about what is going on?

Looks like the KVM code calls do_page_fault() directly:

> dotraplinkage void __kprobes
> do_async_page_fault(struct pt_regs *regs, unsigned long error_code)
> {
>         enum ctx_state prev_state;
> 
>         switch (kvm_read_and_reset_pf_reason()) {
>         default:
>                 do_page_fault(regs, error_code);
>                 break;
>         case KVM_PV_REASON_PAGE_NOT_PRESENT:

That seems to explain my problems in a VM.  Any objections to doing
something like the attached patch?

View attachment "muck-with-kvm-guest-code.patch" of type "text/x-patch" (1422 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ