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]
Date:   Mon, 12 Dec 2022 11:13:41 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Athira Rajeev <atrajeev@...ux.vnet.ibm.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>,
        linux-perf-users@...r.kernel.org, bpf@...r.kernel.org,
        Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 2/3] perf build: Use libtraceevent from the system

Em Thu, Dec 08, 2022 at 03:05:29PM -0800, Ian Rogers escreveu:
> On Thu, Dec 8, 2022 at 3:00 PM Ian Rogers <irogers@...gle.com> wrote:
> > On Thu, Dec 8, 2022 at 2:32 PM Arnaldo Carvalho de Melo <acme@...nel.org> wrote:
> > > commit a0ec3ef4590e7e82339b6f318e671a6b69fd94e8
> > > Author: Arnaldo Carvalho de Melo <acme@...hat.com>
> > > Date:   Thu Dec 8 19:28:58 2022 -0300

> > >     perf tools: Add test to check if libtracevent has TEP_FIELD_IS_RELATIVE

> > Could HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE be a version rather
> > than feature check, something like:

> > #define MAKE_LIBTRACEEVENT_VERSION(maj, mid, min) (maj * 255 *255 +
> > mid * 255 + min)
> > #define HAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
> > (LIBTRACEEVENT_VERSION >= MAKE_LIBTRACEEVENT_VERSION(1, 5, 0)

> > Note, we have LIBTRACEEVENT_VERSION computed in Makefile.config by way
> > of pkg-config.
 
> LIBTRACEEVENT_VERSION had a workaround if pkg-config wasn't present to
> default to 1.1.0 for its use in:
> https://lore.kernel.org/linux-perf-users/20210923001024.550263-4-irogers@google.com/
> We should un-revert that change now the -Itools/lib issue is resolved
> (1.1 traceevent headers compiled against newer system libtraceevent
> library).

Can you please send that un-revert as a proper patch?

Meanwhile, I came up with this quick hack on top of what I had, seems to
be enough, will test it with systems with libtraceevent <= 1.5.0, where
TEP_FIELD_IS_RELATIVE was introduced.

Will do it after removing the tools/build/feature/ TEP_FIELD_IS_RELATIVE
big hammer check.

- Arnaldo

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index e29975664f06bd61..52a4dc029111c1e2 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -1197,8 +1197,8 @@ ifneq ($(NO_LIBTRACEEVENT),1)
     LIBTRACEEVENT_VERSION_CPP := $(shell expr $(LIBTRACEEVENT_VERSION_1) \* 255 \* 255 + $(LIBTRACEEVENT_VERSION_2) \* 255 + $(LIBTRACEEVENT_VERSION_3))
     CFLAGS += -DLIBTRACEEVENT_VERSION=$(LIBTRACEEVENT_VERSION_CPP)
     $(call detected,CONFIG_LIBTRACEEVENT)
-    $(call feature_check,libtraceevent-tep_field_is_relative)
-    ifeq ($(feature-libtraceevent-tep_field_is_relative), 1)
+    LIBTRACEEVENT_VERSION_WITH_TEP_FIELD_IS_RELATIVE := $(shell expr 1 \* 255 \* 255 + 5 \* 255 + 0) # 1.5.0
+    ifeq ($(shell test $(LIBTRACEEVENT_VERSION_CPP) -gt $(LIBTRACEEVENT_VERSION_WITH_TEP_FIELD_IS_RELATIVE); echo $$?),0)
       CFLAGS += -DHAVE_LIBTRACEEVENT_TEP_FIELD_IS_RELATIVE
     endif
   else

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ