From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 077A1C982D9 for ; Thu, 17 Sep 2026 23:46:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GHqjaxd54GWu9W/8p3KKPNSDycNa549CMUboaCB2NGo=; b=WdSxuWxUf0zJfLtUpNUtzZ0lsF BvhKpL4PmOvGsxKzj+uzGJm7yBIdXhlIdSDTS8sG/aijeAGBNVD3jweGM/xlE4Y6A0dgxHinPiO64 LoBuYfR8XxyUJ/mFcW/I7E1QlJ0cNZPniS6HZvW/PKsH4cEeSAAtaxfNVkfZi2qDA4jqQIhdWMckG /JVVbF8qUUBk8ADzdi7RW6bi9nxKUiIPsIU5Ik2Lj5F6TLFnte8IQyh1SDaprGDcrS0eciyqf1trq /xlnOmvzswrvtJZAiABETmMTjzsRXnQVngq0LXgUCDze718ey6frSbm1XJSU7KTs+S8BOB4/NiavK yNiKO1ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7LoU-0000000CxM4-3WIX; Thu, 17 Sep 2026 23:46:47 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7LoN-0000000CxIr-3WYr for linux-arm-kernel@bombadil.infradead.org; Thu, 17 Sep 2026 23:46:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Cc:To:In-Reply-To:References: Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=GHqjaxd54GWu9W/8p3KKPNSDycNa549CMUboaCB2NGo=; b=WHfSdFhw/1NLXSU2+3LXAz9qfs 6Q09anG/34rgWvHGlSMDIpw8JnQZFt2hzrs/ItVo4eVeWw5i0bSreGMh63BU0xSk3bAVBCt+8s9Pn Q9MZanOFdGdXXQJW3+J03zrGM8wCRtFES5lPKzfGfNK0bzUEMpQ5Ie5LocP1ldDLge4aynIwQFrFs +NRiR4NeYqJ73mTHaAVOJzEcHqic/GfQk73BqWckODDtwVK5TFpXtXGhTIniDxtVWkPEXY/e8aWk4 Q3YJTCd6MFHo8pSXmByo/Ue6dJGVefS/2PQkRQJIyJn0UJfUlWeBc7wzHvEtbAAOGfOHjrqQVi8Aq 7SZFx4Dg==; Received: from fanzine2.igalia.com ([213.97.179.56]) by desiato.infradead.org with esmtps (Exim 4.99.2 #2 (Red Hat Linux)) id 1x7LoJ-00000009OYs-43GS for linux-arm-kernel@lists.infradead.org; Thu, 17 Sep 2026 23:46:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Cc:To:Message-Id:Content-Transfer-Encoding:Content-Type: MIME-Version:Subject:Date:From:From:Reply-To; bh=GHqjaxd54GWu9W/8p3KKPNSDycNa549CMUboaCB2NGo=; b=IDGqoscKagaXGi4N9/+xJkTG+G EVK4FMQc1FFFDBEZhg1GEyMSMm4SaJSzca8B86Ak9Qtjl/MYuPfKEDTcDUydx8AQdJN7KQSgm+erm AsnFbcZFYPCnBEhE4oZOscsJTGOoHYFg44+WRimhZNpDEDtqypbeLIMxd0QNFX/Mq0upaVuCbhfaD OM4cIWSFljpT4f/vJ0mblPADCuIYriEudeA3EaU0071dKQbEghy6WZRb5mYKbrcDNhcgP6STFy6Tt sGBUfaZBb/3Q6+3ucQ+uSsStyrDayolu/Zg/nSuPyOuvkqn4BkNmLVol1a5K2RNIhjG7mG53qx0Pc cyyhFBNA==; Received: from [177.172.123.214] (helo=[192.168.15.100]) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1x7LoE-003hU7-H1; Fri, 18 Sep 2026 01:46:30 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= Date: Thu, 17 Sep 2026 20:46:07 -0300 Subject: [PATCH v7 04/13] arm: Use the common syscall table MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260917-tonyk-syscall_table-v7-4-f4cd8f8e3265@igalia.com> References: <20260917-tonyk-syscall_table-v7-0-f4cd8f8e3265@igalia.com> In-Reply-To: <20260917-tonyk-syscall_table-v7-0-f4cd8f8e3265@igalia.com> To: Masami Hiramatsu , Arnd Bergmanon Cc: Christian Brauner , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, kernel-dev@igalia.com, Thomas Bogendoerfer , linux-alpha@vger.kernel.org, linux-s390@vger.kernel.org, linux-arm-kernel@lists.infradead.org, soc@lists.linux.dev, linux-mips@vger.kernel.org, sparclinux@vger.kernel.org, =?utf-8?q?Andr=C3=A9_Almeida?= X-Mailer: b4 0.15.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260918_004636_117485_6449B980 X-CRM114-Status: UNSURE ( 7.88 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove some of the duplicated code by using the common syscall number table. Signed-off-by: André Almeida --- Changes from v6: - Added back syscalls from 403 to 423 to local table. arm32 can't use the common table for those syscalls, because arm doesn't implements compat_ entry points for syscalls like pselect6, ppoll, etc., and OABI uses compat_ entry points when it's available, so this would cause a build error. --- arch/arm/tools/Makefile | 14 ++++++++----- arch/arm/tools/syscall.tbl | 49 ---------------------------------------------- 2 files changed, 9 insertions(+), 54 deletions(-) diff --git a/arch/arm/tools/Makefile b/arch/arm/tools/Makefile index 28b6da8ac5f6..b7d8d96ab015 100644 --- a/arch/arm/tools/Makefile +++ b/arch/arm/tools/Makefile @@ -12,6 +12,8 @@ syshdr := $(srctree)/scripts/syscallhdr.sh sysnr := $(src)/syscallnr.sh systbl := $(srctree)/scripts/syscalltbl.sh syscall := $(src)/syscall.tbl +syscalltbl_common := $(srctree)/scripts/syscall_common.tbl +abis := common,clone3 gen-y := $(gen)/calls-oabi.S gen-y += $(gen)/calls-eabi.S @@ -38,20 +40,22 @@ $(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 $< $@ quiet_cmd_systbl = SYSTBL $@ - cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis common,$* $< $@ + cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis $(abis),$* \ + --common-tbl $(syscalltbl_common) $< $@ quiet_cmd_sysnr = SYSNR $@ cmd_sysnr = $(CONFIG_SHELL) $(sysnr) $< $@ -$(uapi)/unistd-%.h: $(syscall) $(syshdr) FORCE +$(uapi)/unistd-%.h: $(syscall) $(syscalltbl_common) $(syshdr) FORCE $(call if_changed,syshdr) -$(kapi)/unistd-nr.h: $(syscall) $(sysnr) FORCE +$(kapi)/unistd-nr.h: $(syscalltbl_common) $(sysnr) FORCE $(call if_changed,sysnr) -$(gen)/calls-%.S: $(syscall) $(systbl) FORCE +$(gen)/calls-%.S: $(syscall) $(syscalltbl_common) $(systbl) FORCE $(call if_changed,systbl) diff --git a/arch/arm/tools/syscall.tbl b/arch/arm/tools/syscall.tbl index 55717ed32c27..bccded328911 100644 --- a/arch/arm/tools/syscall.tbl +++ b/arch/arm/tools/syscall.tbl @@ -438,52 +438,3 @@ 421 common rt_sigtimedwait_time64 sys_rt_sigtimedwait 422 common futex_time64 sys_futex 423 common sched_rr_get_interval_time64 sys_sched_rr_get_interval -424 common pidfd_send_signal sys_pidfd_send_signal -425 common io_uring_setup sys_io_uring_setup -426 common io_uring_enter sys_io_uring_enter -427 common io_uring_register sys_io_uring_register -428 common open_tree sys_open_tree -429 common move_mount sys_move_mount -430 common fsopen sys_fsopen -431 common fsconfig sys_fsconfig -432 common fsmount sys_fsmount -433 common fspick sys_fspick -434 common pidfd_open sys_pidfd_open -435 common clone3 sys_clone3 -436 common close_range sys_close_range -437 common openat2 sys_openat2 -438 common pidfd_getfd sys_pidfd_getfd -439 common faccessat2 sys_faccessat2 -440 common process_madvise sys_process_madvise -441 common epoll_pwait2 sys_epoll_pwait2 -442 common mount_setattr sys_mount_setattr -443 common quotactl_fd sys_quotactl_fd -444 common landlock_create_ruleset sys_landlock_create_ruleset -445 common landlock_add_rule sys_landlock_add_rule -446 common landlock_restrict_self sys_landlock_restrict_self -# 447 reserved for memfd_secret -448 common process_mrelease sys_process_mrelease -449 common futex_waitv sys_futex_waitv -450 common set_mempolicy_home_node sys_set_mempolicy_home_node -451 common cachestat sys_cachestat -452 common fchmodat2 sys_fchmodat2 -453 common map_shadow_stack sys_map_shadow_stack -454 common futex_wake sys_futex_wake -455 common futex_wait sys_futex_wait -456 common futex_requeue sys_futex_requeue -457 common statmount sys_statmount -458 common listmount sys_listmount -459 common lsm_get_self_attr sys_lsm_get_self_attr -460 common lsm_set_self_attr sys_lsm_set_self_attr -461 common lsm_list_modules sys_lsm_list_modules -462 common mseal sys_mseal -463 common setxattrat sys_setxattrat -464 common getxattrat sys_getxattrat -465 common listxattrat sys_listxattrat -466 common removexattrat sys_removexattrat -467 common open_tree_attr sys_open_tree_attr -468 common file_getattr sys_file_getattr -469 common file_setattr sys_file_setattr -470 common listns sys_listns -471 common rseq_slice_yield sys_rseq_slice_yield -472 common fchroot sys_fchroot -- 2.55.0