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: <20200417021113.GB5426@leoy-ThinkPad-X240s>
Date:   Fri, 17 Apr 2020 10:11:13 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Mike Leach <mike.leach@...aro.org>
Cc:     linux-arm-kernel@...ts.infradead.org, coresight@...ts.linaro.org,
        mathieu.poirier@...aro.org, linux-kernel@...r.kernel.org,
        peterz@...radead.org, mingo@...hat.com, acme@...nel.org
Subject: Re: [PATCH] perf: cs-etm: Update to build with latest opencsd
 version.

Hi Mike,

On Wed, Apr 15, 2020 at 09:14:20PM +0100, Mike Leach wrote:
> OpenCSD version v0.14.0 adds in a new output element. This is represented
> by a new value in the generic element type enum, which must be added to
> the handling code in perf cs-etm-decoder to prevent build errors due to
> build options on the perf project.
> 
> This element is not currently used by the perf decoder.
> 
> Tested on Linux 5.7-rc1.
> 
> Signed-off-by: Mike Leach <mike.leach@...aro.org>
> ---
>  tools/perf/util/cs-etm-decoder/cs-etm-decoder.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> 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 cd92a99eb89d..da4737cbc2ab 100644
> --- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> +++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
> @@ -564,6 +564,10 @@ static ocsd_datapath_resp_t cs_etm_decoder__gen_trace_elem_printer(
>  		resp = cs_etm_decoder__set_tid(etmq, packet_queue,
>  					       elem, trace_chan_id);
>  		break;
> +	/* Unused packet types */
> +#if OCSD_VER_NUM >= 0x0E00
> +	case OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH:
> +#endif

I don't think use macros to distinguish OpenCSD version number is a
good idea, this will get more and more code to checking version number
if later have more these kinds improvement and finally it's hard to
maintain.

Sugget just simply add the new case for
OCSD_GEN_TRC_ELEM_I_RANGE_NOPATH, considering if user uses an old version
OpenCSD and doesn't output this new element, the new added case doesn't
introduce issue for old OpenCSD lib.

Futhermore, suggest to change the code in
tools/build/feature/test-libopencsd.c, so can reflect the kernel 5.7
to require OpenCSD v0.14.0 or later version when build perf.

Thanks,
Leo

>  	case OCSD_GEN_TRC_ELEM_ADDR_NACC:
>  	case OCSD_GEN_TRC_ELEM_CYCLE_COUNT:
>  	case OCSD_GEN_TRC_ELEM_ADDR_UNKNOWN:
> -- 
> 2.17.1
> 
> _______________________________________________
> CoreSight mailing list
> CoreSight@...ts.linaro.org
> https://lists.linaro.org/mailman/listinfo/coresight

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ