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:   Tue, 25 Aug 2020 13:42:03 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     "Jin, Yao" <yao.jin@...ux.intel.com>
Cc:     Like Xu <like.xu@...ux.intel.com>, jolsa@...nel.org,
        peterz@...radead.org, mingo@...hat.com,
        alexander.shishkin@...ux.intel.com, Linux-kernel@...r.kernel.org,
        ak@...ux.intel.com, kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v3] perf parse-events: Set exclude_guest=1 for user-space
 counting

Em Tue, Aug 25, 2020 at 03:54:37PM +0800, Jin, Yao escreveu:
> Hi Arnaldo,
> 
> On 8/19/2020 11:05 AM, Like Xu wrote:
> > Hi Arnaldo,
> > 
> > On 2020/8/17 10:32, Jin, Yao wrote:
> > > Hi Arnaldo,
> > > 
> > > On 8/14/2020 8:47 PM, Arnaldo Carvalho de Melo wrote:
> > > > Em Fri, Aug 14, 2020 at 09:21:20AM +0800, Jin Yao escreveu:
> > > > > Currently if we run 'perf record -e cycles:u', exclude_guest=0.
> > > > > 
> > > > > But it doesn't make sense in most cases that we request for
> > > > > user-space counting but we also get the guest report.
> > > > > 
> > > > > Of course, we also need to consider perf kvm usage case that
> > > > > authorized perf users on the host may only want to count guest
> > > > > user space events. For example,
> > > > > 
> > > > > perf kvm --guest record -e cycles:u
> > > > Ok, probably this works, but what if I want to record guest user samples
> > > > without using 'perf kvm'?
> > > > 
> > > > Can we have a 'U' modifier, perhaps, for that?
> > > > 
> > > > I.e.
> > > > 
> > > > perf record -e cycles:uU would not set exclude_host not exclude_guest,
> > > > cycles:u excludes guest user, cycles:U excludes host user, would that be
> > > > possible?
> > > > 
> > > > Anyway, I think that with what we have, your patch makes sense, having a
> > > > way to, without using 'perf kvm' still be able to sample the guest can
> > > > be done on top. of this.
> > > > 
> > > > Xu, can we get your Reviewed-by if this addresses your concerns?
> > 
> > My concern is about do not break the perf kvm usages and Yao did it in v3.
> > 
> > Tested-by: Like Xu <like.xu@...ux.intel.com>
> > 
> 
> Can this patch be accepted?

Sure.

> > > > 
> > > > - Arnaldo
> > > 
> > > Do you suggest we will create a new modifier 'U' as a follow-up patch?
> > > 
> > > cycles:u - Count host user space but it doesn't count the guest user
> > > space (exclude_host = 0, exclude_guest = 1, exclude_kernel = 1,
> > > exclude_user = 0, exclude_hv = 1)
> > > 
> > > cycles:U - Count the guest user space but it doesn't count the host
> > > user space (exclude_host = 1, exclude_guest = 0, exclude_kernel = 1,
> > > exclude_user = 0, exclude_hv = 1)
> > > 
> > > Is above understanding correct?
> > 
> > Do we really need to support sample guests without using perf kvm?
> > 
> > If it's true, I would prefer "cycles:uG" to cover guest user space
> > events only, "cycles:kG" to cover guest kernel space events only,
> > and only host events are sampled without the ":G" modifier by default.
> > 
> > I am not sure if ":G" has been used in perf.
> > 
> 
> That may be another good idea I think. :)

I have to check, but I don't think that :G is used.

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ