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: <20120906195645.GD8285@erda.amd.com>
Date:	Thu, 6 Sep 2012 21:56:45 +0200
From:	Robert Richter <robert.richter@....com>
To:	David Ahern <dsahern@...il.com>
CC:	<acme@...stprotocols.net>, <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Gleb Natapov <gleb@...hat.com>
Subject: Re: [PATCH 08/11] perf tool: precise mode requires exclude_guest

On 06.09.12 13:17:19, David Ahern wrote:
> On 9/6/12 1:02 PM, Robert Richter wrote:
> > just found your patch...

I tested the patch and it runs ok with my kernel patch that checks
syscall attributes for ibs. perf tools falls back and clears
exclude_guest/_host bits in attr. It also should work if the kernel
ignores those bits (without my patch).

Acked-by: Robert Richter <robert.richter@....com>

> > To summarize how I think it should work:
> >
> >   -e cycles:p ..... Enable exclude_guest bit. If the syscall fails,
> >                     fall back by disabling the guest bit and send
> >                     syscall again
> 
> I think the fallback scenarios are getting out of hand -- too many and 
> too many combinations. For this case (:p only) I proposed setting 
> exclude_guest. It should not fail if the pebs/ibs is supported. If so, 
> give the user a helpful message. e.g., https://lkml.org/lkml/2012/7/20/440
> 
> 
> >
> >   -e cycles:pGH ... Do not enable exclude_guest/_host. Do not fall back
> >                     on syscall errors.
> 
> In this case give the user a message that the requested combination is 
> invalid. I have a patch similar to the one above for this.

Yes, but cases where only guest or host-only mode is supported are
rare.

> 
> >
> > Same for the case the p modifier is not set.
> >
> > So we have the following:
> >
> >   G           ... set exclude_host bit, clear exclude_guest
> >   H           ... set exclude_guest bit, clear exclude_host
> >   GH          ... clear both exclude_guest/_host
> >   <no G or H> ... default (set exclude_host bit, clear exclude_guest),
> >                   but fall back on syscall errors to clear both
> >                   exclude_guest/_host
> 
> you lost me on the last one. If the user specifies no attributes on the 
> events then exclude_host/exclude_guest is controlled by the 
> perf_host/perf_guest variables - see event_attr_init().

As you said above, falling back by disabling flags becomes unhandy.
Current implementation falls back without (?) notice even if the user
explicitly demanded G or H. Falling back should only be the case if no
G/H modifiers are given. This is what I meant here.

> > The modifier parser should be correctly implemented and should work
> > with ibs. Will test this patch.
> 
> Thanks!

Sorry far being late a bit with all this.

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center

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