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: <CAM9d7chEbYU6mnCsAo7+rGH7PCtJy8NT7BedLBT8Lda8fbjy5A@mail.gmail.com>
Date:   Tue, 4 May 2021 12:43:37 -0700
From:   Namhyung Kim <namhyung@...nel.org>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>, Leo Yan <leo.yan@...aro.org>,
        John Garry <john.garry@...wei.com>,
        Will Deacon <will@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-arm-kernel@...ts.infradead.org,
        Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH] perf arm: Fix off-by-one directory paths.

Hi Ian,

On Tue, May 4, 2021 at 12:12 PM Ian Rogers <irogers@...gle.com> wrote:
>
> Relative path include works in the regular build due to -I paths but may
> fail in other situations.

Right, can we simply change them all to have a relative path from the
$(srctree)/tools/perf ?  I think it'd be cleaner and easier to maintain.

Thanks,
Namhyung

>
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>  tools/perf/arch/arm/util/auxtrace.c         |  8 +++----
>  tools/perf/arch/arm/util/cs-etm.c           | 24 ++++++++++-----------
>  tools/perf/arch/arm/util/perf_regs.c        |  2 +-
>  tools/perf/arch/arm/util/pmu.c              |  2 +-
>  tools/perf/arch/arm/util/unwind-libdw.c     |  6 +++---
>  tools/perf/arch/arm/util/unwind-libunwind.c |  4 ++--
>  6 files changed, 23 insertions(+), 23 deletions(-)
>
> diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c
> index b187bddbd01a..7ed57222465e 100644
> --- a/tools/perf/arch/arm/util/auxtrace.c
> +++ b/tools/perf/arch/arm/util/auxtrace.c
> @@ -8,10 +8,10 @@
>  #include <linux/coresight-pmu.h>
>  #include <linux/zalloc.h>
>
> -#include "../../util/auxtrace.h"
> -#include "../../util/debug.h"
> -#include "../../util/evlist.h"
> -#include "../../util/pmu.h"
> +#include "../../../util/auxtrace.h"
> +#include "../../../util/debug.h"
> +#include "../../../util/evlist.h"
> +#include "../../../util/pmu.h"
>  #include "cs-etm.h"
>  #include "arm-spe.h"
>
> diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
> index d942f118d32c..67c7fb8d7eb0 100644
> --- a/tools/perf/arch/arm/util/cs-etm.c
> +++ b/tools/perf/arch/arm/util/cs-etm.c
> @@ -16,19 +16,19 @@
>  #include <linux/zalloc.h>
>
>  #include "cs-etm.h"
> -#include "../../util/debug.h"
> -#include "../../util/record.h"
> -#include "../../util/auxtrace.h"
> -#include "../../util/cpumap.h"
> -#include "../../util/event.h"
> -#include "../../util/evlist.h"
> -#include "../../util/evsel.h"
> -#include "../../util/perf_api_probe.h"
> -#include "../../util/evsel_config.h"
> -#include "../../util/pmu.h"
> -#include "../../util/cs-etm.h"
> +#include "../../../util/debug.h"
> +#include "../../../util/record.h"
> +#include "../../../util/auxtrace.h"
> +#include "../../../util/cpumap.h"
> +#include "../../../util/event.h"
> +#include "../../../util/evlist.h"
> +#include "../../../util/evsel.h"
> +#include "../../../util/perf_api_probe.h"
> +#include "../../../util/evsel_config.h"
> +#include "../../../util/pmu.h"
> +#include "../../../util/cs-etm.h"
>  #include <internal/lib.h> // page_size
> -#include "../../util/session.h"
> +#include "../../../util/session.h"
>
>  #include <errno.h>
>  #include <stdlib.h>
> diff --git a/tools/perf/arch/arm/util/perf_regs.c b/tools/perf/arch/arm/util/perf_regs.c
> index 2864e2e3776d..2833e101a7c6 100644
> --- a/tools/perf/arch/arm/util/perf_regs.c
> +++ b/tools/perf/arch/arm/util/perf_regs.c
> @@ -1,5 +1,5 @@
>  // SPDX-License-Identifier: GPL-2.0
> -#include "../../util/perf_regs.h"
> +#include "../../../util/perf_regs.h"
>
>  const struct sample_reg sample_reg_masks[] = {
>         SMPL_REG_END
> diff --git a/tools/perf/arch/arm/util/pmu.c b/tools/perf/arch/arm/util/pmu.c
> index bbc297a7e2e3..b8b23b9dc598 100644
> --- a/tools/perf/arch/arm/util/pmu.c
> +++ b/tools/perf/arch/arm/util/pmu.c
> @@ -10,7 +10,7 @@
>  #include <linux/string.h>
>
>  #include "arm-spe.h"
> -#include "../../util/pmu.h"
> +#include "../../../util/pmu.h"
>
>  struct perf_event_attr
>  *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
> diff --git a/tools/perf/arch/arm/util/unwind-libdw.c b/tools/perf/arch/arm/util/unwind-libdw.c
> index 36ba4c69c3c5..b7692cb0c733 100644
> --- a/tools/perf/arch/arm/util/unwind-libdw.c
> +++ b/tools/perf/arch/arm/util/unwind-libdw.c
> @@ -1,8 +1,8 @@
>  // SPDX-License-Identifier: GPL-2.0
>  #include <elfutils/libdwfl.h>
> -#include "../../util/unwind-libdw.h"
> -#include "../../util/perf_regs.h"
> -#include "../../util/event.h"
> +#include "../../../util/unwind-libdw.h"
> +#include "../../../util/perf_regs.h"
> +#include "../../../util/event.h"
>
>  bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg)
>  {
> diff --git a/tools/perf/arch/arm/util/unwind-libunwind.c b/tools/perf/arch/arm/util/unwind-libunwind.c
> index 3a550225dfaf..438906bf0014 100644
> --- a/tools/perf/arch/arm/util/unwind-libunwind.c
> +++ b/tools/perf/arch/arm/util/unwind-libunwind.c
> @@ -3,8 +3,8 @@
>  #include <errno.h>
>  #include <libunwind.h>
>  #include "perf_regs.h"
> -#include "../../util/unwind.h"
> -#include "../../util/debug.h"
> +#include "../../../util/unwind.h"
> +#include "../../../util/debug.h"
>
>  int libunwind__arch_reg_id(int regnum)
>  {
> --
> 2.31.1.607.g51e8a6a459-goog
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ