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: <20211117144110.GC4771@leoy-ThinkPad-X240s>
Date:   Wed, 17 Nov 2021 22:41:10 +0800
From:   Leo Yan <leo.yan@...aro.org>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     German Gomez <german.gomez@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        James Clark <james.clark@....com>,
        Jiri Olsa <jolsa@...hat.com>,
        John Garry <john.garry@...wei.com>,
        Mark Rutland <mark.rutland@....com>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Will Deacon <will@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [FYI][PATCH 1/1] perf tools: Set COMPAT_NEED_REALLOCARRAY for
 CONFIG_AUXTRACE=1

On Wed, Nov 17, 2021 at 09:51:42AM -0300, Arnaldo Carvalho de Melo wrote:
> As it is being used in tools/perf/arch/arm64/util/arm-spe.c and the
> COMPAT_NEED_REALLOCARRAY was only being set when CORESIGHT=1 is set.

Thanks for the patch, Arnaldo.

This patch looks good to me.  But I cannot reproduce the build failure,
if without CORESIGHT=1 I still don't see the build failure.

I think we should apply below code as well, if COMPAT_NEED_REALLOCARRAY
is enabled for AUXTRACE, it will be applied for cs-etm as well.  For
this reason, we can remove the redundant definition for CORESIGHT.

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 07e65a061fd3..2dbf086d1155 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -477,9 +477,6 @@ ifdef CORESIGHT
   $(call feature_check,libopencsd)
   ifeq ($(feature-libopencsd), 1)
     CFLAGS += -DHAVE_CSTRACE_SUPPORT $(LIBOPENCSD_CFLAGS)
-    ifeq ($(feature-reallocarray), 0)
-      CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
-    endif
     LDFLAGS += $(LIBOPENCSD_LDFLAGS)
     EXTLIBS += $(OPENCSDLIBS)
     $(call detected,CONFIG_LIBOPENCSD)

Thanks,
Leo

> Fixes: 56c31cdff7c2a640 ("perf arm-spe: Implement find_snapshot callback")
> Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> Cc: German Gomez <german.gomez@....com>
> Cc: James Clark <james.clark@....com>
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: John Garry <john.garry@...wei.com>
> Cc: Leo Yan <leo.yan@...aro.org>
> Cc: Mark Rutland <mark.rutland@....com>
> Cc: Mathieu Poirier <mathieu.poirier@...aro.org>
> Cc: Namhyung Kim <namhyung@...nel.org>
> Cc: Will Deacon <will@...nel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> ---
>  tools/perf/Makefile.config | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 07e65a061fd3a13b..afd144725a0bf766 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -1010,6 +1010,9 @@ ifndef NO_AUXTRACE
>    ifndef NO_AUXTRACE
>      $(call detected,CONFIG_AUXTRACE)
>      CFLAGS += -DHAVE_AUXTRACE_SUPPORT
> +    ifeq ($(feature-reallocarray), 0)
> +      CFLAGS += -DCOMPAT_NEED_REALLOCARRAY
> +    endif
>    endif
>  endif
>  
> -- 
> 2.31.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ