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, 5 Apr 2012 19:18:45 +0200
From:	Robert Richter <robert.richter@....com>
To:	David Ahern <dsahern@...il.com>
CC:	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Ingo Molnar <mingo@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/4] perf tools: Use sw counter only if hw pmu is not
 detected

On 05.04.12 10:59:04, David Ahern wrote:
> On 4/5/12 10:26 AM, Robert Richter wrote:
> > Use cpu-clock-tick sw counter for cpu-cycles only if there is no hw
> > pmu available. This is the case if the syscall reports ENOENT. In
> > other cases (e.g. invalid attributes) we don't want the sw counter to
> > be used.
> 
> Isn't the invalid attributes case handled by the
> '} else if (err == EINVAL) {'
> case before this switch is done?

Yes, but it does not jump out the code path. It is only doing some
diagnostics and retries the syscall with some modified attributes or
so.

I had have the case what a syscall failed due to invalid attributes
and then the sw counter was setup. I got odd results and I needed some
time debugging this to realize what was going on.

-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