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:	Thu, 9 Feb 2012 15:32:53 +0100
From:	Joerg Roedel <joerg.roedel@....com>
To:	Ingo Molnar <mingo@...e.hu>
CC:	David Ahern <dsahern@...il.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	LKML <linux-kernel@...r.kernel.org>,
	Jason Wang <jasowang@...hat.com>
Subject: Re: perf: record segfaults for cycles event when collecting data on
 a VM

On Thu, Feb 09, 2012 at 02:34:47PM +0100, Ingo Molnar wrote:
> 
> * Joerg Roedel <joerg.roedel@....com> wrote:

> > Well, there are two options:
> > 
> > 	1) Make sure machine == NULL does not happen. Changing the
> > 	   default of perf_guest back to false does exactly this for
> > 	   David's problem.
> 
> So what if it's turned on by the user? Do we still crash 
> occasionally?

It is only turned on by perf-kvm, and this path should setup a machine
object for guest samples.

> 
> > 	2) Make sure that a machine == NULL pointer is never
> > 	   dereferenced
> > 
> > I was going to fix it with option 1. Do you suggest option 2 is better?
> 
> Looks like the better fix. You said:
> 
> > Bottom line is that the perf-tool may receive samples tagged 
> > as GUEST_KERNEL even when guest-sampling is disabled (probably 
> > a race-condition). The perf-tool can not find a valid machine 
> > pointer for such a sample and passes NULL down to the other 
> > functions. And some functions don't seem to handle this.
> 
> tooling should never be surprised by getting some unexpected 
> sample via the perf.data or the ring-buffer - regardless of 
> whether that functionality is default enabled or manually 
> enabled.

Yeah, right. Guest samples may also show up intentionally when the event
modifiers are used. So crashing on machine==NULL needs to be fixed.


	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

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