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] [day] [month] [year] [list]
Message-ID: <CAP-5=fV-d_X1uFYACEOJOxOY43+fj9aEm0_bp7NGSo9kZVMJ4Q@mail.gmail.com>
Date: Thu, 4 Dec 2025 10:19:59 -0800
From: Ian Rogers <irogers@...gle.com>
To: Leo Yan <leo.yan@....com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, James Clark <james.clark@...aro.org>, 
	linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 2/2] Revert "perf tools: Fix arm64 build by generating unistd_64.h"

On Thu, Dec 4, 2025 at 8:53 AM Leo Yan <leo.yan@....com> wrote:
>
> This reverts:
>
> commit 8988c4b91945 ("perf tools: Fix in-source libperf build")
> commit bfb713ea53c7 ("perf tools: Fix arm64 build by generating unistd_64.h")
>
> Since we now have a static unistd_64.h for the arm64 build, there is no
> need to generate unistd_64.h in libperf.  Revert all patches related to
> generating unistd_64.h.

Could we generate the file and then compare the two? We do something
like this for empty-pmu-events.c here:
https://web.git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/Build?h=perf-tools-next#n49

Similarly, could we get rid of the unistd_64.h generation and just add
a build time validation test? Generating the file is painful in many
ways, as this series testifies.

Thanks,
Ian

> Signed-off-by: Leo Yan <leo.yan@....com>
> ---
>  tools/lib/perf/Makefile    | 14 ++------------
>  tools/perf/Makefile.config |  1 -
>  2 files changed, 2 insertions(+), 13 deletions(-)
>
> diff --git a/tools/lib/perf/Makefile b/tools/lib/perf/Makefile
> index 7fbb50b74c00b3b99ac538821124e04bfbc6da6a..ffcfd777c45181960afc7505ef8f85d0b7ea7e8d 100644
> --- a/tools/lib/perf/Makefile
> +++ b/tools/lib/perf/Makefile
> @@ -42,7 +42,6 @@ libdir_relative_SQ = $(subst ','\'',$(libdir_relative))
>  TEST_ARGS := $(if $(V),-v)
>
>  INCLUDES = \
> --I$(OUTPUT)arch/$(SRCARCH)/include/generated/uapi \
>  -I$(srctree)/tools/lib/perf/include \
>  -I$(srctree)/tools/lib/ \
>  -I$(srctree)/tools/include \
> @@ -100,16 +99,7 @@ $(LIBAPI)-clean:
>         $(call QUIET_CLEAN, libapi)
>         $(Q)$(MAKE) -C $(LIB_DIR) O=$(OUTPUT) clean >/dev/null
>
> -uapi-asm := $(OUTPUT)arch/$(SRCARCH)/include/generated/uapi/asm
> -ifeq ($(SRCARCH),arm64)
> -       syscall-y := $(uapi-asm)/unistd_64.h
> -endif
> -uapi-asm-generic:
> -       $(if $(syscall-y),\
> -               $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-headers obj=$(uapi-asm) \
> -               generic=include/uapi/asm-generic $(syscall-y),)
> -
> -$(LIBPERF_IN): uapi-asm-generic FORCE
> +$(LIBPERF_IN): FORCE
>         $(Q)$(MAKE) $(build)=libperf
>
>  $(LIBPERF_A): $(LIBPERF_IN)
> @@ -130,7 +120,7 @@ all: fixdep
>  clean: $(LIBAPI)-clean
>         $(call QUIET_CLEAN, libperf) $(RM) $(LIBPERF_A) \
>                  *.o *~ *.a *.so *.so.$(VERSION) *.so.$(LIBPERF_VERSION) .*.d .*.cmd tests/*.o LIBPERF-CFLAGS $(LIBPERF_PC) \
> -                $(TESTS_STATIC) $(TESTS_SHARED) $(syscall-y)
> +                $(TESTS_STATIC) $(TESTS_SHARED)
>
>  TESTS_IN = tests-in.o
>
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 6b62fea21a0ad1caf99d75d06fc29d2b05007931..b1e39fe0cf40ce1419b19a11daccc18853d5cfe6 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -64,7 +64,6 @@ include $(srctree)/tools/scripts/Makefile.arch
>  $(call detected_var,SRCARCH)
>
>  CFLAGS += -I$(OUTPUT)arch/$(SRCARCH)/include/generated
> -CFLAGS += -I$(OUTPUT)libperf/arch/$(SRCARCH)/include/generated/uapi
>
>  # Additional ARCH settings for ppc
>  ifeq ($(SRCARCH),powerpc)
>
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ