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 6ED63C982D8 for ; Sat, 19 Sep 2026 00:31:41 +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=1Mqf8IivruERMP6fZwT8V4CKtJjvaF7LKzl37WPzoRE=; b=Lv9j5HVg7wngfP8gZNxF/gTR6A ngZpRnTmftRDoWGDajiWanU5J500P37ZlYizYDmJ0EyH1FM41A4heObi2XV8l9qtvdur5osg2gRE9 msQtLQ0FdGDvRmcYAWVu8ix9N1Rw2ogapIuX5o6Z6oI5AHwOr/910ME88nghtd0dufHu03FqRi7Ga kZzs8FaXwhGS4YywI/jJWSkQhjqT6xqiZ1EW5qNPSkZLifpMHf1IcZ/RT2jLBG3YtmGvD27ViYctP mYtbE2r5OwZ8P2nnzrJeTbeLaX5jAMwU836Gbsim8GgOFnsh2hjYu7+394LxFIVBARStJfJZIvcmC fclv7W9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7izG-0000000FklH-3jHu; Sat, 19 Sep 2026 00:31:26 +0000 Received: from fanzine2.igalia.com ([213.97.179.56]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x7izB-0000000Fkic-1EM8 for linux-arm-kernel@lists.infradead.org; Sat, 19 Sep 2026 00:31:24 +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=1Mqf8IivruERMP6fZwT8V4CKtJjvaF7LKzl37WPzoRE=; b=V5bA52/5f49aYc2wfJiWNjECNw B5sDME9+xcxRopAUcb1VJsj/aWSFvtND3Pdwsxi95Um/XbJYBTlHkThG8ta1uit1cemKqYQEM3wRI nQRQjN4YXzNk/PYFFhCH+wW3r9Gqx9JKFOdWJ9i38hgq5ATS1bhXgT4WqLiVmsKvJmD0uz0FrmXbh KkEUrFeq7QRX2c1/ynsaOhNEUq4Gk5S0oG4T1luFqw1hWvCrwfzNWeQ2RYi+j/U8P7PYs0JMgO/bZ rFbe/H9MFYodcA39OHTR2K34aRwkbAG4CTZd/itW6AeBuaTfTD4T0JpaiydmEK6hbut8llSaGUrWH uaTxF6PA==; 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 1x7iz5-004Bwz-Hg; Sat, 19 Sep 2026 02:31:15 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= Date: Fri, 18 Sep 2026 21:31:08 -0300 Subject: [PATCH v8 01/12] syscalls: Make --abis parsing more robust MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260918-tonyk-syscall_table-v8-1-0e2d60cad13e@igalia.com> References: <20260918-tonyk-syscall_table-v8-0-0e2d60cad13e@igalia.com> In-Reply-To: <20260918-tonyk-syscall_table-v8-0-0e2d60cad13e@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_173122_437199_85E92623 X-CRM114-Status: GOOD ( 10.09 ) 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 Some archs Makefile have something like this as the rule for making the syscall files: cmd_systbl = $(CONFIG_SHELL) $(systbl) --abis common,$* $< $@ The $* symbol is evaluated to the variable found at $(uapi)/unistd-%.h, where % is 32 or 64, resulting in e.g. `--abis common,32`. Sometimes the rule for the file won't have a %, resulting in a trailing comma e.g. `--abis common,`. Currently this input is transformed into (common|). This is problematic because grep will then match any ABI because of the trailing `|`. Make the syscalls scripts more robust by removing any trailing comma. Signed-off-by: André Almeida --- scripts/syscallhdr.sh | 2 +- scripts/syscalltbl.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/syscallhdr.sh b/scripts/syscallhdr.sh index 22e34cd46b9b..bad1ab606a0f 100755 --- a/scripts/syscallhdr.sh +++ b/scripts/syscallhdr.sh @@ -39,7 +39,7 @@ while [ $# -gt 0 ] do case $1 in --abis) - abis=$(echo "($2)" | tr ',' '|') + abis="($(echo "${2%,}" | tr ',' '|'))" shift 2;; --emit-nr) emit_nr=1 diff --git a/scripts/syscalltbl.sh b/scripts/syscalltbl.sh index 6a903b87a7c2..c4b1f85c2dd6 100755 --- a/scripts/syscalltbl.sh +++ b/scripts/syscalltbl.sh @@ -33,7 +33,7 @@ while [ $# -gt 0 ] do case $1 in --abis) - abis=$(echo "($2)" | tr ',' '|') + abis="($(echo "${2%,}" | tr ',' '|'))" shift 2;; -*) echo "$1: unknown option" >&2 -- 2.55.0