From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 434792931C3; Wed, 12 Aug 2026 03:33:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786505592; cv=none; b=QDaVGk619Oe/zniDCLa8G6BWx5umFOObl2PqVgTTksx6qPFzKItIKERLEYQCs7sQNS22r3N/9DHC0aaaqJheOyKguV3C0ktTvFdMHum275L9dGg14zaXddEh4z+JO9gKCYSda5t68tji6GfWbEVogo18BkyTIbgU+Y6d7jt912o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786505592; c=relaxed/simple; bh=voYeUFRGxJF51AdGg0Ie0IWOP6zIt8JXqOyKZWKsO3I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=G37wHEeUmnlxDEDEznfzhQGIiJ+lvLSE1pNZPOWB1LRl6qFoM3j6Q5ETyfKOIoDQcvIKvqC1wXo1r20GQLkVrVRJlStcsKgE0vE0MtdACmkaUmCxh/fQvK/Hd1ftVs+WHNFWhDGrlNh9FYbHGx3bNEvySMUSMd8c9i2CKS/bMVY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=kxywSdhY; arc=none smtp.client-ip=213.97.179.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="kxywSdhY" 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=kxywSdhYM8iwMYkdwPYmup0Bdi MOYwwrKCFrodvQy/0LbrOe7WZX++WfWWs8s9tYm2lXtn+9ZYCJe6zAo3XSibg8/e4LZJKxLU/xzxx pqkHrxk5erxb7gw3Ubwp7jAOSz4EEfEq+qB9/fSRd4KwAsc2zNyV2gteCrb1DjAhiXmpd0jco6Za7 /tMXriG/MlrYEednzOM6wB9A8KGdgNYks3R92GFo39yQyRTv8pxL6borwgjLvdPbOxC9bT8JxymNe cVmpjAIwv5b61IZzupysVPl36EIRn/DqyNQ8ts9EVflkRl+epnCD6jQLiCGiuMJg7qj8vSd97whPj T4vysc7w==; Received: from [177.139.22.20] (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 1wtziD-00HTm1-Eu; Wed, 12 Aug 2026 05:33:05 +0200 From: =?utf-8?q?Andr=C3=A9_Almeida?= Date: Wed, 12 Aug 2026 00:32:57 -0300 Subject: [PATCH v4 01/12] syscalls: Make --abis parsing more robust Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260812-tonyk-syscall_table-v4-1-748d0229ad40@igalia.com> References: <20260812-tonyk-syscall_table-v4-0-748d0229ad40@igalia.com> In-Reply-To: <20260812-tonyk-syscall_table-v4-0-748d0229ad40@igalia.com> To: Thomas Gleixner , Nathan Chancellor , Masami Hiramatsu , Arnd Bergmanon Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, kernel-dev@igalia.com, =?utf-8?q?Andr=C3=A9_Almeida?= X-Mailer: b4 0.15.2 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