All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "André Almeida" <andrealmeid@igalia.com>
Cc: "Alexander Gordeev" <agordeev@linux.ibm.com>,
	"Vasily Gorbik" <gor@linux.ibm.com>,
	linux-s390@vger.kernel.org, "Heiko Carstens" <hca@linux.ibm.com>,
	"Christian Borntraeger" <borntraeger@linux.ibm.com>
Subject: Re: [PATCH v7 03/13] scripts/syscall.tbl: Use the common table
Date: Fri, 18 Sep 2026 00:02:04 +0000	[thread overview]
Message-ID: <20260918000205.2B8781F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260917-tonyk-syscall_table-v7-3-f4cd8f8e3265@igalia.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] perf: perf trace silently drops generic syscalls >= 403
- [Low] docs: adding-syscalls.rst directs developers to break the build
--

commit b66e7fc900570caaf1efbae8e5955a536079dad9
Author: André Almeida <andrealmeid@igalia.com>

scripts/syscall.tbl: Use the common table

Remove some of the duplicated code by using the common syscall number
table.

> diff --git a/scripts/Makefile.asm-headers b/scripts/Makefile.asm-headers
> index f1c3d287c14b0..b09dbc8992c32 100644
> --- a/scripts/Makefile.asm-headers
> +++ b/scripts/Makefile.asm-headers
[ ... ]
> @@ -15,9 +15,10 @@ all:
>  
>  src := $(srctree)/$(subst /generated,,$(obj))
>  
> -syscall_abis_32  += common,32
> -syscall_abis_64  += common,64
> +syscall_abis_32  += clone3,common,32
> +syscall_abis_64  += clone3,common,64
>  syscalltbl := $(srctree)/scripts/syscall.tbl
> +syscalltbl_common := $(srctree)/scripts/syscall_common.tbl

[Severity: Medium]
Does this change cause perf trace to silently drop generic syscalls >= 403?

The tools/perf/trace/beauty/syscalltbl.sh script is hardcoded to only
parse scripts/syscall.tbl for generic architectures like CSKY and RISC-V:

tools/perf/trace/beauty/syscalltbl.sh:build_tables() {
    build_tables "$tools_dir/scripts/syscall.tbl" "$outfile" \
        common,32,csky,time32,stat64,rlimit EM_CSKY
}

Because the newly introduced syscall_common.tbl is not parsed by perf trace,
local execution of perf trace on affected architectures will fail to resolve
the names of generic syscalls >= 403 (e.g., clone3, openat2, io_uring_setup),
displaying raw numbers instead.

> diff --git a/scripts/syscall.tbl b/scripts/syscall.tbl
> index 0ab5316051202..ee828d03094ed 100644
> --- a/scripts/syscall.tbl
> +++ b/scripts/syscall.tbl
> @@ -344,72 +344,3 @@
>  293	common	rseq				sys_rseq
>  294	common	kexec_file_load			sys_kexec_file_load
>  # 295 through 402 are unassigned to sync up with generic numbers don't use
> -403	32	clock_gettime64			sys_clock_gettime
> -404	32	clock_settime64			sys_clock_settime
[ ... ]
> -471	common	rseq_slice_yield		sys_rseq_slice_yield
> -472	common	fchroot				sys_fchroot

[Severity: Low]
With these entries moved, does Documentation/process/adding-syscalls.rst now
direct developers to break the build?

The documentation actively instructs developers to place new entries in the
now-deprecated primary table:

Documentation/process/adding-syscalls.rst:
    As scripts/syscall.tbl serves as a common syscall table across multiple
    architectures, a new entry is required in this table::

        468   common   xyzzy     sys_xyzzy

Because syscallhdr.sh and syscalltbl.sh append syscall_common.tbl (which
starts at 403) after processing syscall.tbl, a developer following these
instructions and adding a new generic syscall (e.g., 468) to syscall.tbl will
cause the internal nxt counter to exceed the first entry of the common table
(469 > 403). This triggers the strict ascending-order check and results in a
fatal "syscall table is not sorted" build error.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260917-tonyk-syscall_table-v7-0-f4cd8f8e3265@igalia.com?part=3

  reply	other threads:[~2026-09-18  0:02 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 23:46 [PATCH v7 00/13] syscalls: Add a shared table for all archs André Almeida
2026-09-17 23:46 ` [PATCH v7 01/13] syscalls: Make --abis parsing more robust André Almeida
2026-09-17 23:52   ` sashiko-bot
2026-09-17 23:46 ` [PATCH v7 02/13] syscalls: Create unified partial table for all archs André Almeida
2026-09-17 23:57   ` sashiko-bot
2026-09-17 23:46 ` [PATCH v7 03/13] scripts/syscall.tbl: Use the common table André Almeida
2026-09-18  0:02   ` sashiko-bot [this message]
2026-09-18  6:34   ` Arnd Bergmann
2026-09-18 19:58     ` André Almeida
2026-09-17 23:46 ` [PATCH v7 04/13] arm: Use the common syscall table André Almeida
2026-09-18  0:01   ` sashiko-bot
2026-09-18  6:22   ` Arnd Bergmann
2026-09-18 20:10     ` André Almeida
2026-09-17 23:46 ` [PATCH v7 05/13] s390: " André Almeida
2026-09-17 23:56   ` sashiko-bot
2026-09-17 23:46 ` [PATCH v7 06/13] sparc: " André Almeida
2026-09-17 23:53   ` sashiko-bot
2026-09-17 23:46 ` [PATCH v7 07/13] mips: Remove duplicated syscallnr.sh André Almeida
2026-09-17 23:51   ` sashiko-bot
2026-09-17 23:46 ` [PATCH v7 08/13] mips: Get rid of custom mips ABIs for syscall tables André Almeida
2026-09-17 23:54   ` sashiko-bot
2026-09-17 23:46 ` [PATCH v7 09/13] mips: Use the common syscall table André Almeida
2026-09-17 23:55   ` sashiko-bot
2026-09-18  6:56   ` Arnd Bergmann
2026-09-17 23:46 ` [PATCH v7 10/13] syscalls: Add an option for offsetting the common table André Almeida
2026-09-17 23:57   ` sashiko-bot
2026-09-17 23:46 ` [PATCH v7 11/13] alpha: Define entry point for set_mempolicy_home_node syscall André Almeida
2026-09-17 23:59   ` sashiko-bot
2026-09-18 11:36   ` Magnus Lindholm
2026-09-17 23:46 ` [PATCH v7 12/13] alpha: Remove alpha_ prefix from custom syscall entries André Almeida
2026-09-17 23:59   ` sashiko-bot
2026-09-18 10:54   ` Magnus Lindholm
2026-09-18 20:11     ` André Almeida
2026-09-17 23:46 ` [PATCH v7 13/13] alpha: Use the common syscall table André Almeida
2026-09-17 23:59   ` sashiko-bot
2026-09-18 10:57   ` Magnus Lindholm

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=20260918000205.2B8781F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=andrealmeid@igalia.com \
    --cc=borntraeger@linux.ibm.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.