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: <20260107171426.GE336318@e132581.arm.com>
Date: Wed, 7 Jan 2026 17:14:26 +0000
From: Leo Yan <leo.yan@....com>
To: Arnd Bergmann <arnd@...db.de>
Cc: James Clark <james.clark@...aro.org>, linux-kernel@...r.kernel.org,
	linux-perf-users@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>, Jiri Olsa <jolsa@...nel.org>,
	Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH v3 1/3] tools headers: Go back to include
 asm-generic/unistd.h for arm64

On Wed, Jan 07, 2026 at 04:21:28PM +0100, Arnd Bergmann wrote:

[...]

> >> I'm still a bit lost about why Arm64 copying
> >> the generated header is considered a special case when we already have these
> >> x86 ones.
> >
> > If arm64 maintains its own unistd.h, there is a concern that other
> > architectures will do the same, and we will end up maintaining
> > fragmented headers for each architecture.
> >
> > Later, if we need to support architecture specific syscalls, we should
> > explore better approaches, such as using generated headers (e.g.,
> > make headers) to provide UAPI headers instead.
> 
> I think the more important issue with the current code is that
> we don't support the older architectures besides x86: arm32, powerpc,
> s390, mips, etc all have a custom syscall.tbl file like x86 but
> don't have any asm/unistd.h installed in tools. If we want to
> support any of them in the future, we should start generating the
> files the same way we do for the kernel. There is already a copy
> of the syscall.tbl files in tools/perf/arch/*/entry/syscalls/syscall*.tbl
> and the arch/mips/kernel/syscalls/Makefile
> just not the corresponding scripts/syscallhdr.sh.

Thanks for the supplement, Arnd!

Using the syscall*.tbl files under tools/perf to generate unistd.h
headers is not a good idea for me.  These files are maintained within
tools/perf (mainly for perf beauty printing), but the generated
unistd.h headers are required by code outside of perf (e.g., libperf,
feature checks, etc.).

In fact, selftests already use dynamic headers (see [1]).  Seems to
me that we should apply the same approach to perf build.

Thanks,
Leo

[1] https://docs.kernel.org/dev-tools/kselftest.html#running-the-selftests-hotplug-tests-are-run-in-limited-mode

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ