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: <DM6PR11MB40250B31B839685B06D8A686D9579@DM6PR11MB4025.namprd11.prod.outlook.com>
Date:   Fri, 7 May 2021 05:27:47 +0000
From:   "Denys Zagorui -X (dzagorui - GLOBALLOGIC INC at Cisco)" 
        <dzagorui@...co.com>
To:     Jiri Olsa <jolsa@...hat.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "acme@...nel.org" <acme@...nel.org>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "alexander.shishkin@...ux.intel.com" 
        <alexander.shishkin@...ux.intel.com>,
        "namhyung@...nel.org" <namhyung@...nel.org>
Subject: Re: [PATCH v4 3/3] perf parse-events: add bison --file-prefix-map
 option

> I'm on system with:
>
> [root@...-02-guest15 perf]# bison --version
> bison (GNU Bison) 3.7.6
>
> but I don't see BISON_FILE_PREFIX_MAP set
>
> [root@...-02-guest15 perf]# cat .config-detected | grep BISON_FILE_PREFIX_MAP
> [root@...-02-guest15 perf]#

I forgot to mention that BISON_FILE_PREFIX_MAP is needed only if we build perf with O= .
Most probably that is why you don't see BISON_FILE_PREFIX_MAP. I'll mention this in commit
message.

Thanks,
Denys

________________________________________
From: Jiri Olsa <jolsa@...hat.com>
Sent: 06 May 2021 18:15
To: Denys Zagorui -X (dzagorui - GLOBALLOGIC INC at Cisco)
Cc: linux-kernel@...r.kernel.org; peterz@...radead.org; mingo@...hat.com; acme@...nel.org; mark.rutland@....com; alexander.shishkin@...ux.intel.com; namhyung@...nel.org
Subject: Re: [PATCH v4 3/3] perf parse-events: add bison --file-prefix-map option

On Fri, Apr 30, 2021 at 06:33:50AM -0700, Denys Zagorui wrote:
> bison stores full paths in generated files and those paths are stored in
> resulting perf binary. Starting from v3.7.1. those paths can be remapped
> by using --file-prefix-map option. So use this option if it possible to
> make perf binary more reproducible.
>
> Signed-off-by: Denys Zagorui <dzagorui@...co.com>
> ---
>  tools/perf/Makefile.config | 9 +++++++++
>  tools/perf/util/Build      | 6 +++---
>  2 files changed, 12 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index d8e59d31399a..2035bae6d5c5 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -195,6 +195,12 @@ ifeq ($(call get-executable,$(BISON)),)
>    dummy := $(error Error: $(BISON) is missing on this system, please install it)
>  endif
>
> +ifneq ($(OUTPUT),)
> +  ifeq ($(shell expr $(shell $(BISON) --version | grep bison | sed -e 's/.\+ \([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1\2\3/g') \>\= 371), 1)
> +    BISON_FILE_PREFIX_MAP := --file-prefix-map=$(OUTPUT)=
> +  endif
> +endif

I'm on system with:

[root@...-02-guest15 perf]# bison --version
bison (GNU Bison) 3.7.6

but I don't see BISON_FILE_PREFIX_MAP set

[root@...-02-guest15 perf]# cat .config-detected | grep BISON_FILE_PREFIX_MAP
[root@...-02-guest15 perf]#

jirka

> +
>  # Treat warnings as errors unless directed not to
>  ifneq ($(WERROR),0)
>    CORE_CFLAGS += -Werror
> @@ -1208,3 +1214,6 @@ $(call detected_var,LIBDIR)
>  $(call detected_var,GTK_CFLAGS)
>  $(call detected_var,PERL_EMBED_CCOPTS)
>  $(call detected_var,PYTHON_EMBED_CCOPTS)
> +ifneq ($(BISON_FILE_PREFIX_MAP),)
> +$(call detected_var,BISON_FILE_PREFIX_MAP)
> +endif
> diff --git a/tools/perf/util/Build b/tools/perf/util/Build
> index e3e12f9d4733..33476b1d28d5 100644
> --- a/tools/perf/util/Build
> +++ b/tools/perf/util/Build
> @@ -204,7 +204,7 @@ $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-flex.h: util/parse-
>
>  $(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/parse-events-bison.h: util/parse-events.y
>       $(call rule_mkdir)
> -     $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) \
> +     $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \
>               -o $(OUTPUT)util/parse-events-bison.c -p parse_events_
>
>  $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-flex.h: util/expr.l $(OUTPUT)util/expr-bison.c
> @@ -214,7 +214,7 @@ $(OUTPUT)util/expr-flex.c $(OUTPUT)util/expr-flex.h: util/expr.l $(OUTPUT)util/e
>
>  $(OUTPUT)util/expr-bison.c $(OUTPUT)util/expr-bison.h: util/expr.y
>       $(call rule_mkdir)
> -     $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) \
> +     $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \
>               -o $(OUTPUT)util/expr-bison.c -p expr_
>
>  $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-flex.h: util/pmu.l $(OUTPUT)util/pmu-bison.c
> @@ -224,7 +224,7 @@ $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-flex.h: util/pmu.l $(OUTPUT)util/pmu-
>
>  $(OUTPUT)util/pmu-bison.c $(OUTPUT)util/pmu-bison.h: util/pmu.y
>       $(call rule_mkdir)
> -     $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) \
> +     $(Q)$(call echo-cmd,bison)$(BISON) -v $< -d $(PARSER_DEBUG_BISON) $(BISON_FILE_PREFIX_MAP) \
>               -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_
>
>  FLEX_GE_26 := $(shell expr $(shell $(FLEX) --version | sed -e  's/flex \([0-9]\+\).\([0-9]\+\)/\1\2/g') \>\= 26)
> --
> 2.26.2.Cisco
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ