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: <aCzxYS_knO4rokdi@x1>
Date: Tue, 20 May 2025 18:17:21 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: langfei@...wei.com, Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, Namhyung Kim <namhyung@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Kan Liang <kan.liang@...ux.intel.com>,
	Nathan Chancellor <nathan@...nel.org>,
	Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
	Bill Wendling <morbo@...gle.com>,
	Justin Stitt <justinstitt@...gle.com>,
	James Clark <james.clark@...aro.org>,
	Chaitanya S Prakash <chaitanyas.prakash@....com>,
	Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
	Stephen Brennan <stephen.s.brennan@...cle.com>,
	Howard Chu <howardchu95@...il.com>,
	linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
	llvm@...ts.linux.dev
Subject: Re: [PATCH v1 1/3] perf dso: Minor refactor to allow Wthread-safety
 analysis

On Mon, May 19, 2025 at 03:46:43PM -0700, Ian Rogers wrote:
> The pattern:
> ```
> if (x) {
>    lock(...)
> }
> block1;
> if (x) {
>    unlock(...)
> }
> ```
> defeats clang's -Wthread-safety analysis where it complains of locks
> held on one path and not another. Add helper functions for "block1"
> then restructure as:
> ```
> if (x) {
>    lock(...);
>    block1();
>    unlock(...);
> } else {
>    block1();
> }
> ```

Got the three in the tmp.perf-tools-next branch, will try and test it
further and then push it out to perf-tools-next.

Thanks,

- Arnalod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ