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: <YaAAjHUXqY8pkiOA@kernel.org>
Date:   Thu, 25 Nov 2021 18:30:52 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        John Garry <john.garry@...wei.com>,
        Kajol Jain <kjain@...ux.ibm.com>,
        "Paul A . Clarke" <pc@...ibm.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Konstantin Khlebnikov <koct9i@...il.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        eranian@...gle.com
Subject: Re: [PATCH v2 2/4] perf tools: Fix SMT not detected

Em Tue, Nov 23, 2021 at 04:12:29PM -0800, Ian Rogers escreveu:
> sysfs__read_int returns 0 on success, and so the fast read path was
> always failing.
> 
> Fixes: bb629484d924 (perf tools: Simplify checking if SMT is active.)
> Signed-off-by: Ian Rogers <irogers@...gle.com>

Thanks, applied to perf/urgent.

- Arnaldo

> ---
>  tools/perf/util/smt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/smt.c b/tools/perf/util/smt.c
> index 20bacd5972ad..34f1b1b1176c 100644
> --- a/tools/perf/util/smt.c
> +++ b/tools/perf/util/smt.c
> @@ -15,7 +15,7 @@ int smt_on(void)
>  	if (cached)
>  		return cached_result;
>  
> -	if (sysfs__read_int("devices/system/cpu/smt/active", &cached_result) > 0)
> +	if (sysfs__read_int("devices/system/cpu/smt/active", &cached_result) >= 0)
>  		goto done;
>  
>  	ncpu = sysconf(_SC_NPROCESSORS_CONF);
> -- 
> 2.34.0.rc2.393.gf8c9666880-goog

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ