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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120906190238.GA29278@erda.amd.com>
Date:	Thu, 6 Sep 2012 21:02:38 +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

David,

just found your patch...

On 20.07.12 17:25:53, David Ahern wrote:
> PEBS cannot be used with guest mode. If user adds :p modifier set
> exclude_guest as well.

> @@ -653,6 +653,9 @@ int parse_events_modifier(struct list_head *list, char *str)
>  			eH = 0;
>  		} else if (*str == 'p') {
>  			precise++;
> +			/* use of precise requires exclude_guest */
> +			if (!exclude_GH)
> +				eG = 1;

We should only enable exclude_guest if no G/H modifiers are given on
the command line. If I correctly read the code this is indicated by
exclude_GH and correctly implemented.

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

 -e cycles:pGH ... Do not enable exclude_guest/_host. Do not fall back
                   on syscall errors.

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

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

-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