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:   Tue, 19 Mar 2019 16:30:14 -0600
From:   Mathieu Poirier <mathieu.poirier@...aro.org>
To:     Solomon Tan <solomonbstoner@...tonmail.ch>
Cc:     "peterz@...radead.org" <peterz@...radead.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "acme@...nel.org" <acme@...nel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "suzuki.poulose@....com" <suzuki.poulose@....com>,
        "alexander.shishkin@...ux.intel.com" 
        <alexander.shishkin@...ux.intel.com>,
        "jolsa@...hat.com" <jolsa@...hat.com>,
        "namhyung@...nel.org" <namhyung@...nel.org>
Subject: Re: [PATCH] perf tools: Add missing case value

Hi Solomon,

On Tue, Mar 19, 2019 at 04:11:37PM +0000, Solomon Tan wrote:
> This patch fixes the following error message during compilation of `tools/perf`, as seen in https://github.com/Linaro/OpenCSD/issues/17.

The rule for changelogs is the same as it is for patches, i.e lines should be
wrapped at 80 characters.  Also it is not a good idea to reference a github
issue since it is bound to disappear over time.  Just mentioning you
encountered a compilation error will do just fine.

> 
> ```
>   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) {
>   ^~~~~~

The above is over 80 characters but it should be kept that way because this is
what you got from the compiler.


>   CC       util/intel-pt-decoder/intel-pt-decoder.o
> cc1: all warnings being treated as errors
> ```
> 
> Signed-off-by: solomon-ubuntu <solomonbstoner@...tonmail.ch>
> ---
>  tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> 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 8c155575c6c5..2a8bf6b45a30 100644
> --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> @@ -374,6 +374,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:

Perfect.

Because we are using an enumeration that can only be found in version 11 of the
library, compiling with version 10 will also give us an error.  As such we need
to bump the mandatory version number in "tools/build/feature/test-libopencsd.c".

Your next revision should read [PATCH v3], because it will be the third
iteration of it.

Mathieu

>  	case OCSD_INSTR_OTHER:
>  	default:
>  		packet->last_instr_taken_branch = false;
> -- 
> 
> 2.17.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ