From: sashiko-bot@kernel.org
To: "André Almeida" <andrealmeid@igalia.com>
Cc: linux-s390@vger.kernel.org, "Vasily Gorbik" <gor@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.vom>
Subject: Re: [PATCH v5 04/13] arm: Use the common syscall table
Date: Wed, 12 Aug 2026 18:10:03 +0000 [thread overview]
Message-ID: <20260812181003.D59DB1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260812-tonyk-syscall_table-v5-4-3d383927c609@igalia.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Using the common syscall table on 32-bit ARM breaks OABI compatibility for several time64 and wait syscalls due to missing or weak-linked `compat_sys_*` entry points.
- [High] Process substitution `< <(...)` breaks POSIX `/bin/sh` compatibility, causing kernel build failures on systems using dash.
--
--- Patch [4]: [PATCH v5 04/13] arm: Use the common syscall table ---
commit 4446b58b5d8e69028beb1ab8dad93b78f955eb73
Author: André Almeida <andrealmeid@igalia.com>
arm: Use the common syscall table
This commit updates the ARM architecture to use the common syscall table.
It replaces duplicated ARM-specific syscalls with the common ones by pulling
in syscall_common.tbl and updating the ABI list.
> diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile
> index 28b6da8ac5f64..fd73bf6db3bfe 100644
> --- a/arch/arm/tools/Makefile
> +++ b/arch/arm/tools/Makefile
[ ... ]
> @@ -38,11 +40,13 @@ $(kapi)/mach-types.h: $(src)/gen-mach-types $(src)/mach-types FORCE
> $(call if_changed,gen_mach)
>
> quiet_cmd_syshdr = SYSHDR $@
> - cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --abis common,$* \
> + cmd_syshdr = $(CONFIG_SHELL) $(syshdr) --abis $(abis),$* \
> + --common-tbl $(syscalltbl_common) \
> --offset __NR_SYSCALL_BASE $< $@
[Severity: High]
Does this execute scripts containing non-POSIX bashisms?
The scripts/syscallhdr.sh script uses process substitution which requires bash:
scripts/syscallhdr.sh:gen_hdr() {
...
done < <(grep -E "^[0-9A-Fa-fXx]+[[:space:]]+$abis" "$input")
}
scripts/syscalltbl.sh also uses a similar construct in gen_tbl().
This breaks POSIX /bin/sh compatibility and can cause kernel build failures
reporting "Syntax error: redirection unexpected" on distributions that use
dash as their default shell.
> quiet_cmd_systbl = SYSTBL $@
> - cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis common,$* $< $@
> + cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis),$* \
> + --common-tbl $(syscalltbl_common) $< $@
[Severity: High]
Does pulling in the common syscall table break OABI compatibility for
32-bit ARM?
The common table populates the compat column with compat_sys_* functions
intended for CONFIG_COMPAT, for example:
scripts/syscall_common.tbl:
413 32 pselect6_time64 sys_pselect6 compat_sys_pselect6_time64
However, ARM OABI redefines __SYSCALL_WITH_COMPAT to use the compat column
specifically for its own OABI wrappers, not for 64-bit-on-32-bit compat
wrappers:
arch/arm/kernel/entry-common.S:sys_oabi_call_table() {
#undef __SYSCALL_WITH_COMPAT
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, compat)
}
This clash causes build failures like "undefined reference to
compat_sys_pselect6_time64" during linking when CONFIG_OABI_COMPAT is enabled.
For syscalls with weak stubs in kernel/sys_ni.c (like io_pgetevents_time64),
the build succeeds but OABI binaries will silently receive -ENOSYS at runtime.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260812-tonyk-syscall_table-v5-0-3d383927c609@igalia.com?part=4
next prev parent reply other threads:[~2026-08-12 18:10 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 17:38 [PATCH v5 00/13] syscalls: Add a shared table for all archs André Almeida
2026-08-12 17:38 ` [PATCH v5 01/13] syscalls: Make --abis parsing more robust André Almeida
2026-08-12 17:50 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 02/13] syscalls: Create unified partial table for all archs André Almeida
2026-08-12 17:49 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 03/13] scripts/syscall.tbl: Use the common table André Almeida
2026-08-12 17:53 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 04/13] arm: Use the common syscall table André Almeida
2026-08-12 18:10 ` sashiko-bot [this message]
2026-08-12 17:38 ` [PATCH v5 05/13] s390: " André Almeida
2026-08-12 17:50 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 06/13] sparc: " André Almeida
2026-08-12 17:48 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 07/13] mips: Remove duplicated syscallnr.sh André Almeida
2026-08-12 17:48 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 08/13] mips: Get rid of custom mips ABIs for syscall tables André Almeida
2026-08-12 17:49 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 09/13] mips: Use the common syscall table André Almeida
2026-08-12 17:53 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 10/13] syscalls: Add an option for offsetting the common table André Almeida
2026-08-12 17:56 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 11/13] alpha: Define entry point for set_mempolicy_home_node syscall André Almeida
2026-08-12 17:57 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 12/13] alpha: Remove alpha_ prefix from custom syscall entries André Almeida
2026-08-12 17:58 ` sashiko-bot
2026-08-12 17:38 ` [PATCH v5 13/13] alpha: Use the common syscall table André Almeida
2026-08-12 18:01 ` sashiko-bot
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=20260812181003.D59DB1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=agordeev@linux.ibm.com \
--cc=andrealmeid@igalia.com \
--cc=borntraeger@linux.ibm.vom \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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