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:   Fri, 22 Mar 2019 10:29:17 -0600
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     Solomon Tan <solomonbobstoner@...il.com>,
        Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Suzuki K. Poulose" <suzuki.poulose@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Robert Walker <robert.walker@....com>,
        Solomon Tan <solomonbstoner@...tonmail.ch>
Subject: Re: [PATCH v5] perf tools: Add missing case value

On Thu, 21 Mar 2019 at 23:23, Solomon Tan <solomonbobstoner@...il.com> wrote:
>
> The following error was thrown when compiling `tools/perf` using OpenCSD
> v0.11.1. This patch fixes said error.
> ```
>   CC       util/intel-pt-decoder/intel-pt-log.o
>   CC       util/cs-etm-decoder/cs-etm-decoder.o
> util/cs-etm-decoder/cs-etm-decoder.c: In function
> ‘cs_etm_decoder__buffer_range’:
> util/cs-etm-decoder/cs-etm-decoder.c:370:2: error: enumeration value
> ‘OCSD_INSTR_WFI_WFE’ not handled in switch [-Werror=switch-enum]
>   switch (elem->last_i_type) {
>   ^~~~~~
>   CC       util/intel-pt-decoder/intel-pt-decoder.o
> cc1: all warnings being treated as errors
> ```
>
> Because `OCSD_INSTR_WFI_WFE` case was added only in v0.11.0, the minimum
> required OpenCSD library version for this patch is no longer v0.10.0.
>
> Signed-off-by: Solomon Tan <solomonbobstoner@...il.com>
> ---
>  tools/build/feature/test-libopencsd.c           | 4 ++--
>  tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 1 +
>  2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/build/feature/test-libopencsd.c b/tools/build/feature/test-libopencsd.c
> index d68eb4fb40cc..2b0e02c38870 100644
> --- a/tools/build/feature/test-libopencsd.c
> +++ b/tools/build/feature/test-libopencsd.c
> @@ -4,9 +4,9 @@
>  /*
>   * Check OpenCSD library version is sufficient to provide required features
>   */
> -#define OCSD_MIN_VER ((0 << 16) | (10 << 8) | (0))
> +#define OCSD_MIN_VER ((0 << 16) | (11 << 8) | (0))
>  #if !defined(OCSD_VER_NUM) || (OCSD_VER_NUM < OCSD_MIN_VER)
> -#error "OpenCSD >= 0.10.0 is required"
> +#error "OpenCSD >= 0.11.0 is required"
>  #endif
>
>  int main(void)
> diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> index ba4c623cd8de..39fe21e1cf93 100644
> --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> @@ -387,6 +387,7 @@ cs_etm_decoder__buffer_range(struct cs_etm_decoder *decoder,
>                 break;
>         case OCSD_INSTR_ISB:
>         case OCSD_INSTR_DSB_DMB:
> +       case OCSD_INSTR_WFI_WFE:
>         case OCSD_INSTR_OTHER:
>         default:
>                 packet->last_instr_taken_branch = false;
> --
> 2.19.1

Reviewed-by: Mathieu Poirier <mathieu.poirier@...aro.org>

Arnaldo, please add on your side if satisfied with the code.

Thanks,
Mathieu

>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ