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]
Date:   Mon, 23 May 2022 09:54:57 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Michael Petlan <mpetlan@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        James Clark <james.clark@....com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Quentin Monnet <quentin@...valent.com>,
        Dave Marchevsky <davemarchevsky@...com>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        Lv Ruyi <lv.ruyi@....com.cn>, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        bpf@...r.kernel.org, Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 0/5] perf_counts clean up and perf stat report bug fix

Em Wed, May 18, 2022 at 08:20:00PM -0700, Ian Rogers escreveu:
> perf_counts takes a CPU map index as an argument, however, there were
> a few places where this hadn't been cleaned up and the index was
> called cpu. In part this led to the bug discovered by Michael Petlan in:
> https://lore.kernel.org/linux-perf-users/CAP-5=fWQR=sCuiSMktvUtcbOLidEpUJLCybVF6=BRvORcDOq+g@mail.gmail.com/
> 
> Fix the bug, tidy up more of the arguments passed to perf_counts, add
> a test to ensure the bug isn't reintroduced and add a helper macro to
> iterate over just CPU map indices.

Applied 2-5 to perf/core. The first is already in 5.18


Thanks,

- Arnaldo
 
> Ian Rogers (5):
>   perf stat: Fix and validate inputs in stat events
>   perf stat: Add stat record+report test
>   perf cpumap: Add perf_cpu_map__for_each_idx
>   perf bpf_counter: Tidy use of CPU map index
>   perf stat: Make use of index clearer with perf_counts
> 
>  tools/lib/perf/include/perf/cpumap.h |  3 ++
>  tools/perf/tests/shell/stat.sh       | 13 ++++++
>  tools/perf/util/bpf_counter.c        | 61 ++++++++++++++++------------
>  tools/perf/util/stat-display.c       | 22 +++++-----
>  tools/perf/util/stat.c               | 27 ++++++++----
>  5 files changed, 81 insertions(+), 45 deletions(-)
> 
> -- 
> 2.36.1.124.g0e6072fb45-goog

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ