From: James Clark <james.clark@linaro.org>
To: Namhyung Kim <namhyung@kernel.org>, Arnd Bergmann <arnd@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-perf-users@vger.kernel.org, linux-arch@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>,
Kan Liang <kan.liang@linux.intel.com>
Subject: Re: [PATCH 05/10] tools headers: Update the syscall table with the kernel sources
Date: Mon, 14 Apr 2025 17:28:36 +0100 [thread overview]
Message-ID: <f950fe96-34d3-4631-b04d-4a1584f4c2f1@linaro.org> (raw)
In-Reply-To: <20250410001125.391820-6-namhyung@kernel.org>
On 10/04/2025 1:11 am, Namhyung Kim wrote:
> To pick up the changes in:
>
> c4a16820d9019940 fs: add open_tree_attr()
> 2df1ad0d25803399 x86/arch_prctl: Simplify sys_arch_prctl()
> e632bca07c8eef1d arm64: generate 64-bit syscall.tbl
>
> This is basically to support the new open_tree_attr syscall. But it
> also needs to update asm-generic unistd.h header to get the new syscall
> number. And arm64 unistd.h header was converted to use the generic
> 64-bit header.
>
> Addressing this perf tools build warning:
>
> Warning: Kernel ABI header differences:
> diff -u tools/scripts/syscall.tbl scripts/syscall.tbl
> diff -u tools/perf/arch/x86/entry/syscalls/syscall_32.tbl arch/x86/entry/syscalls/syscall_32.tbl
> diff -u tools/perf/arch/x86/entry/syscalls/syscall_64.tbl arch/x86/entry/syscalls/syscall_64.tbl
> diff -u tools/perf/arch/powerpc/entry/syscalls/syscall.tbl arch/powerpc/kernel/syscalls/syscall.tbl
> diff -u tools/perf/arch/s390/entry/syscalls/syscall.tbl arch/s390/kernel/syscalls/syscall.tbl
> diff -u tools/perf/arch/mips/entry/syscalls/syscall_n64.tbl arch/mips/kernel/syscalls/syscall_n64.tbl
> diff -u tools/perf/arch/arm/entry/syscalls/syscall.tbl arch/arm/tools/syscall.tbl
> diff -u tools/perf/arch/sh/entry/syscalls/syscall.tbl arch/sh/kernel/syscalls/syscall.tbl
> diff -u tools/perf/arch/sparc/entry/syscalls/syscall.tbl arch/sparc/kernel/syscalls/syscall.tbl
> diff -u tools/perf/arch/xtensa/entry/syscalls/syscall.tbl arch/xtensa/kernel/syscalls/syscall.tbl
> diff -u tools/arch/arm64/include/uapi/asm/unistd.h arch/arm64/include/uapi/asm/unistd.h
> diff -u tools/include/uapi/asm-generic/unistd.h include/uapi/asm-generic/unistd.h
>
> Please see tools/include/uapi/README for further details.
>
> Cc: linux-arch@vger.kernel.org
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/arch/arm64/include/uapi/asm/unistd.h | 24 +------------------
> tools/include/uapi/asm-generic/unistd.h | 4 +++-
> .../perf/arch/arm/entry/syscalls/syscall.tbl | 1 +
> .../arch/mips/entry/syscalls/syscall_n64.tbl | 1 +
> .../arch/powerpc/entry/syscalls/syscall.tbl | 1 +
> .../perf/arch/s390/entry/syscalls/syscall.tbl | 1 +
> tools/perf/arch/sh/entry/syscalls/syscall.tbl | 1 +
> .../arch/sparc/entry/syscalls/syscall.tbl | 1 +
> .../arch/x86/entry/syscalls/syscall_32.tbl | 3 ++-
> .../arch/x86/entry/syscalls/syscall_64.tbl | 1 +
> .../arch/xtensa/entry/syscalls/syscall.tbl | 1 +
> tools/scripts/syscall.tbl | 1 +
> 12 files changed, 15 insertions(+), 25 deletions(-)
>
> diff --git a/tools/arch/arm64/include/uapi/asm/unistd.h b/tools/arch/arm64/include/uapi/asm/unistd.h
> index 9306726337fe005e..df36f23876e863ff 100644
> --- a/tools/arch/arm64/include/uapi/asm/unistd.h
> +++ b/tools/arch/arm64/include/uapi/asm/unistd.h
> @@ -1,24 +1,2 @@
> /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> -/*
> - * Copyright (C) 2012 ARM Ltd.
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - *
> - * This program is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> - * GNU General Public License for more details.
> - *
> - * You should have received a copy of the GNU General Public License
> - * along with this program. If not, see <http://www.gnu.org/licenses/>.
> - */
> -
> -#define __ARCH_WANT_RENAMEAT
> -#define __ARCH_WANT_NEW_STAT
> -#define __ARCH_WANT_SET_GET_RLIMIT
> -#define __ARCH_WANT_TIME32_SYSCALLS
> -#define __ARCH_WANT_MEMFD_SECRET
> -
> -#include <asm-generic/unistd.h>
> +#include <asm/unistd_64.h>
Hi Namhyung,
Since we're not including the generic syscalls here anymore we now need
to generate the syscall header file for the Perf build to work (build
error pasted at the end for reference).
I had a go at adding the rule for it, but I saw that we'd need to pull
in quite a bit from the kernel so it was blurring the lines about the
separation of the tools/ folder. For example this file has the arm64 defs:
arch/arm64/kernel/Makefile.syscalls
To make this common part of the makefile work:
scripts/Makefile.asm-headers
Maybe we can just copy or reimplement Makefile.syscalls, but I'm not
even sure if Makefile.asm-headers will work with the tools/ build
structure so maybe that has to be re-implemented too. Adding Arnd to see
what he thinks.
As far as I can tell this is a separate issue to the work that Charlie
and Ian did recently to build all arch's syscall numbers into Perf to
use for reporting, as this is requires a single header for the build.
Thanks
James
---
In file included from /usr/include/aarch64-linux-gnu/sys/syscall.h:24,
from evsel.c:4:
/home/jamcla02/workspace/linux/linux/tools/arch/arm64/include/uapi/asm/unistd.h:2:10:
fatal error: asm/unistd_64.h: No such file or directory
2 | #include <asm/unistd_64.h>
| ^~~~~~~~~~~~~~~~~
next prev parent reply other threads:[~2025-04-14 16:28 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 0:11 [PATCHSET 00/10] tools headers: Sync header files with the kernel Namhyung Kim
2025-04-10 0:11 ` [PATCH 01/10] tools headers: Update the KVM headers with the kernel sources Namhyung Kim
2025-04-10 0:11 ` [PATCH 02/10] tools headers: Update the socket " Namhyung Kim
2025-04-10 0:11 ` [PATCH 03/10] tools headers: Update the uapi/linux/perf_event.h copy " Namhyung Kim
2025-04-10 0:11 ` [PATCH 04/10] tools headers: Update the VFS headers " Namhyung Kim
2025-04-10 0:11 ` [PATCH 05/10] tools headers: Update the syscall table " Namhyung Kim
2025-04-14 16:28 ` James Clark [this message]
2025-04-16 13:26 ` James Clark
2025-04-23 9:24 ` Jon Hunter
2025-04-23 14:57 ` James Clark
2025-04-24 7:33 ` Jon Hunter
2025-04-10 0:11 ` [PATCH 06/10] tools headers: Update the uapi/linux/prctl.h copy " Namhyung Kim
2025-04-10 0:11 ` [PATCH 07/10] tools headers: Update the uapi/asm-generic/mman-common.h " Namhyung Kim
2025-04-10 0:11 ` [PATCH 08/10] tools headers: Update the linux/unaligned.h " Namhyung Kim
2025-04-10 0:11 ` [PATCH 09/10] tools headers: Update the x86 headers " Namhyung Kim
2025-04-10 0:11 ` [PATCH 10/10] tools headers: Update the arch/x86/lib/memset_64.S copy " Namhyung Kim
2025-04-10 6:02 ` [PATCHSET 00/10] tools headers: Sync header files with the kernel Ingo Molnar
2025-04-10 11:31 ` Venkat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f950fe96-34d3-4631-b04d-4a1584f4c2f1@linaro.org \
--to=james.clark@linaro.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=arnd@linaro.org \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®