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]
Message-ID: <CAP-5=fUPZ7+nAcxBp5sFBfxzkOH8kzWkLV0uziHqxYC0cDbbDw@mail.gmail.com>
Date:   Thu, 1 Jun 2023 23:42:00 -0700
From:   Ian Rogers <irogers@...gle.com>
To:     Ravi Bangoria <ravi.bangoria@....com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Stephen Rothwell <sfr@...b.auug.org.au>,
        Suzuki K Poulose <suzuki.poulose@....com>,
        Mike Leach <mike.leach@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        John Garry <john.g.garry@...cle.com>,
        Will Deacon <will@...nel.org>,
        James Clark <james.clark@....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>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Kajol Jain <kjain@...ux.ibm.com>,
        Jing Zhang <renyu.zj@...ux.alibaba.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        Madhavan Srinivasan <maddy@...ux.ibm.com>,
        Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
        Ming Wang <wangming01@...ngson.cn>,
        Huacai Chen <chenhuacai@...nel.org>,
        Sandipan Das <sandipan.das@....com>,
        Dmitrii Dolgov <9erthalion6@...il.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Ali Saidi <alisaidi@...zon.com>, Rob Herring <robh@...nel.org>,
        Thomas Richter <tmricht@...ux.ibm.com>,
        Kang Minchul <tegongkang@...il.com>,
        linux-kernel@...r.kernel.org, coresight@...ts.linaro.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf test amd: Fix build failure with amd-ibs-via-core-pmu.c
 -- Was: Re: [PATCH v5 27/34] perf pmu: Separate pmu and pmus

On Thu, Jun 1, 2023 at 10:30 PM Ravi Bangoria <ravi.bangoria@....com> wrote:
>
> On 27-May-23 12:52 PM, Ian Rogers wrote:
> > Separate and hide the pmus list in pmus.[ch]. Move pmus functionality
> > out of pmu.[ch] into pmus.[ch] renaming pmus functions which were
> > prefixed perf_pmu__ to perf_pmus__.
>
> I'm seeing perf tool build failures on linux-next because a patch[1] went in
> via Peter's tree needed some changes done by this patch.
>
> [1]: https://lore.kernel.org/lkml/168372562075.404.10852387134590654382.tip-bot2@tip-bot2
>
> Below patch fixes the issue.
>
> From c041b94df00baea024b64d4b19e37ee827484e74 Mon Sep 17 00:00:00 2001
> From: Ravi Bangoria <ravi.bangoria@....com>
> Date: Thu, 1 Jun 2023 15:23:22 +0530
> Subject: [PATCH] perf test amd: Fix build failure with amd-ibs-via-core-pmu.c
>
> Since amd-ibs-via-core-pmu.c was applied via Peter's tree, some of
> the changes came via Arnaldo's tree did not reflected in this file,
> which is causing build failures.
>
>   arch/x86/tests/amd-ibs-via-core-pmu.c:47:25: error: ‘pmus’ undeclared
>   (first use in this function)
>      47 |         if (list_empty(&pmus))
>         |                         ^~~~
>   arch/x86/tests/amd-ibs-via-core-pmu.c:48:17: error: implicit declaration
>   of function ‘perf_pmu__scan’; did you mean
>   perf_pmus__scan’? [-Werror=implicit-function-declaration]
>      48 |                 perf_pmu__scan(NULL);
>         |                 ^~~~~~~~~~~~~~
>         |                 perf_pmus__scan
>   arch/x86/tests/amd-ibs-via-core-pmu.c:50:19: error: implicit declaration
>   of function ‘perf_pmu__find’; did you mean
>   perf_pmus__find’? [-Werror=implicit-function-declaration]
>      50 |         ibs_pmu = perf_pmu__find("ibs_op");
>         |                   ^~~~~~~~~~~~~~
>         |                   perf_pmus__find
>
> Fix those.
>
> Fixes: 1eaf496ed386 ("perf pmu: Separate pmu and pmus")
> Signed-off-by: Ravi Bangoria <ravi.bangoria@....com>
> ---
>  tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c b/tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c
> index 2902798ca5c1..1e08b2455725 100644
> --- a/tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c
> +++ b/tools/perf/arch/x86/tests/amd-ibs-via-core-pmu.c
> @@ -44,10 +44,10 @@ int test__amd_ibs_via_core_pmu(struct test_suite *test __maybe_unused,
>         int ret = TEST_OK;
>         int fd, i;
>
> -       if (list_empty(&pmus))
> -               perf_pmu__scan(NULL);
> +       /* No way to know whether pmus list is already populated or not. */
> +       perf_pmus__scan(NULL);

Thanks Ravi, you should be able to just remove the 2 lines above. The
code will check to make sure the list is populated for the find below:
https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/util/pmus.c?h=perf-tools-next#n79

Thanks,
Ian

> -       ibs_pmu = perf_pmu__find("ibs_op");
> +       ibs_pmu = perf_pmus__find("ibs_op");
>         if (!ibs_pmu)
>                 return TEST_SKIP;
>
> --
> 2.40.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ