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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 9 Nov 2017 09:17:49 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Markus Trippelsdorf <markus@...ppelsdorf.de>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        linux-kernel@...r.kernel.org,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Arnaldo Carvalho de Melo <acme@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jiri Olsa <jolsa@...nel.org>, Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH] perf tools: Add reject option for parse-events.l

Reply-To: 
In-Reply-To: <20171109081319.GB236@x4>

On Thu, Nov 09, 2017 at 09:13:19AM +0100, Markus Trippelsdorf wrote:
> On 2017.11.05 at 15:40 +0100, Ingo Molnar wrote:
> > Linus,
> >
> > Please pull the latest perf-urgent-for-linus git tree from:
> >
> >    git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-urgent-for-linus
> >
> > Jiri Olsa (1):
> >       perf tools: Unwind properly location after REJECT
> 
> The patch above breaks the build for me:
> 
> util/parse-events.l: In function ‘parse_events_lex’:
> util/parse-events-flex.c:4722:16: error: ‘reject_used_but_not_detected’ undeclared (first use in this function)
>   */
>                 ^
> util/parse-events.l:159:2: note: in expansion of macro ‘REJECT’
>   REJECT
>   ^~~~~~
> util/parse-events.l:343:26: note: in expansion of macro ‘USER_REJECT’
>  {bpf_source}  { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_SOURCE); }
>                           ^~~~~~~~~~~
> util/parse-events-flex.c:4722:16: note: each undeclared identifier is reported only once for each function it appears in
>   */
>                 ^
> util/parse-events.l:159:2: note: in expansion of macro ‘REJECT’
>   REJECT
>   ^~~~~~
> util/parse-events.l:343:26: note: in expansion of macro ‘USER_REJECT’
>  {bpf_source}  { if (!isbpf(yyscanner)) USER_REJECT; return str(yyscanner, PE_BPF_SOURCE); }
>                           ^~~~~~~~~~~
> mv: cannot stat 'util/.parse-events-flex.o.tmp': No such file or directory

sry, we have a fix in queue already

jitka


---
Arnaldo reported broken build under some distros due to
flex no spotting the REJECT macro:

  CC       /tmp/build/perf/util/parse-events-flex.o
  util/parse-events.l: In function 'parse_events_lex':
  /tmp/build/perf/util/parse-events-flex.c:4734:16: error: \
  'reject_used_but_not_detected' undeclared (first use in this function)

It's happening because we put the REJECT under another
USER_REJECT macro in following commit:
  9445464bb831 perf tools: Unwind properly location after REJECT

Fortunately flex provides option for force it to use REJECT,
adding it to parse-events.l.

Reported-by: Arnaldo Carvalho de Melo <acme@...nel.org>
Reviewed-by: Andi Kleen <ak@...ux.intel.com>
Link: http://lkml.kernel.org/n/tip-7kdont984mw12ijk7rji6b8p@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
 tools/perf/util/parse-events.l | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
index bd3bba9a2e81..42d697423a3e 100644
--- a/tools/perf/util/parse-events.l
+++ b/tools/perf/util/parse-events.l
@@ -5,6 +5,7 @@
 %option stack
 %option bison-locations
 %option yylineno
+%option reject
 
 %{
 #include <errno.h>
-- 
2.13.6

Powered by blists - more mailing lists