From: Leo Yan <leo.yan@arm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
James Clark <james.clark@linaro.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Leo Yan <leo.yan@arm.com>
Subject: [PATCH v2 3/3] tools headers: Verify arm64's unistd_64.h
Date: Wed, 10 Dec 2025 14:44:57 +0000 [thread overview]
Message-ID: <20251210-perf_fix_syscall_header-v2-3-b18b6016e0ea@arm.com> (raw)
In-Reply-To: <20251210-perf_fix_syscall_header-v2-0-b18b6016e0ea@arm.com>
Add a consistency check between the generated arm64 unistd_64.h header
and the one stored under tools. This helps ensure that the syscall
definitions remain aligned with the kernel.
The new check reports mismatch such as:
diff -u tools/arch/arm64/include/uapi/asm/unistd_64.h /tmp/tmp.BYFZqJfzCC/generated/unistd_64.h
Signed-off-by: Leo Yan <leo.yan@arm.com>
---
| 9 +++++++++
1 file changed, 9 insertions(+)
--git a/tools/perf/check-headers.sh b/tools/perf/check-headers.sh
index e0537f275da2f79ea9e05b91300aa1e2f996e9f1..ebc09db1c6055bd29a7d8a4d7aba29e76a19cf5d 100755
--- a/tools/perf/check-headers.sh
+++ b/tools/perf/check-headers.sh
@@ -211,6 +211,15 @@ check_2 tools/perf/arch/parisc/entry/syscalls/syscall.tbl arch/parisc/entry/sysc
check_2 tools/perf/arch/arm64/entry/syscalls/syscall_32.tbl arch/arm64/entry/syscalls/syscall_32.tbl
check_2 tools/perf/arch/arm64/entry/syscalls/syscall_64.tbl arch/arm64/entry/syscalls/syscall_64.tbl
+# Generate Arm64's unistd_64.h dynamically and compare it with the one in tools.
+if tmpdir=$(mktemp -d); then
+ make -f scripts/Makefile.asm-headers srctree=$PWD SRCARCH=arm64 \
+ obj=$tmpdir/generated generic=include/uapi/asm-generic \
+ $tmpdir/generated/unistd_64.h > /dev/null
+ check_2 tools/arch/arm64/include/uapi/asm/unistd_64.h $tmpdir/generated/unistd_64.h
+ rm -rf $tmpdir
+fi
+
for i in "${BEAUTY_FILES[@]}"
do
beauty_check "$i" -B
--
2.34.1
prev parent reply other threads:[~2025-12-10 14:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-10 14:44 [PATCH v2 0/3] tools build: Fix arm64's unistd_64.h dependency Leo Yan
2025-12-10 14:44 ` [PATCH v2 1/3] tools headers: Add arm64's unistd_64.h Leo Yan
2025-12-10 14:44 ` [PATCH v2 2/3] Revert "perf tools: Fix arm64 build by generating unistd_64.h" Leo Yan
2025-12-10 14:44 ` Leo Yan [this message]
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=20251210-perf_fix_syscall_header-v2-3-b18b6016e0ea@arm.com \
--to=leo.yan@arm.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.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;
as well as URLs for NNTP newsgroup(s).