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]
Message-ID: <gsntldzwd37f.fsf@coltonlewis-kvm.c.googlers.com>
Date: Thu, 12 Sep 2024 20:31:00 +0000
From: Colton Lewis <coltonlewis@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: kvm@...r.kernel.org, oliver.upton@...ux.dev, peterz@...radead.org, 
	mingo@...hat.com, acme@...nel.org, namhyung@...nel.org, mark.rutland@....com, 
	alexander.shishkin@...ux.intel.com, jolsa@...nel.org, irogers@...gle.com, 
	adrian.hunter@...el.com, kan.liang@...ux.intel.com, will@...nel.org, 
	linux@...linux.org.uk, catalin.marinas@....com, mpe@...erman.id.au, 
	npiggin@...il.com, christophe.leroy@...roup.eu, naveen@...nel.org, 
	hca@...ux.ibm.com, gor@...ux.ibm.com, agordeev@...ux.ibm.com, 
	borntraeger@...ux.ibm.com, svens@...ux.ibm.com, tglx@...utronix.de, 
	bp@...en8.de, dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com, 
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-arm-kernel@...ts.infradead.org, linuxppc-dev@...ts.ozlabs.org, 
	linux-s390@...r.kernel.org
Subject: Re: [PATCH v2 5/5] perf: Correct perf sampling with guest VMs

Sean Christopherson <seanjc@...gle.com> writes:

> On Wed, Sep 11, 2024, Colton Lewis wrote:
>> Previously any PMU overflow interrupt that fired while a VCPU was
>> loaded was recorded as a guest event whether it truly was or not. This
>> resulted in nonsense perf recordings that did not honor
>> perf_event_attr.exclude_guest and recorded guest IPs where it should
>> have recorded host IPs.

>> Rework the sampling logic to only record guest samples for events with
>> exclude_guest clear. This way any host-only events with exclude_guest
>> set will never see unexpected guest samples. The behaviour of events
>> with exclude_guest clear is unchanged.

> Nit, "with exclude_guest clear" is easy to misread as simply "with  
> exclude_guest"
> (I did so at least three times).  Maybe

>    The behavior of exclude_guest=0 events is unchanged.

> or

>    The behavior of events without exclude_guest is unchanged.

> I think it's also worth explicitly calling out that events that are  
> configured
> to sample both host and guest may still be prone to misattributing a PMI  
> that
> arrived in the host as a guest event, depending on the KVM arch and/or  
> vendor
> behavior.

Done

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ