Received: by 2002:ab2:f03:0:b0:1ef:ffd0:ce49 with SMTP id i3csp1415lqf; Tue, 26 Mar 2024 11:53:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/SS5QMny2hotxXEgAdEnVCjeAwyJxFQts833Oz3eYIB8VXRsW5MYS+f6TpG1+xR/Q2Om+TVL57r22xqH5CfDS1lnHXqkr2Cmg84b4yw== X-Google-Smtp-Source: AGHT+IEUaRriWMNu4jjnub1itfCH4Djdvo8YT54gatoNSkr5QM9uNkrx7kGvA3K8kdrhvW5mFlmu X-Received: by 2002:ac2:5045:0:b0:513:c43a:f0bc with SMTP id a5-20020ac25045000000b00513c43af0bcmr294055lfm.4.1711479001843; Tue, 26 Mar 2024 11:50:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711479001; cv=pass; d=google.com; s=arc-20160816; b=QEW79dLiquHJV/4ysCkB/+f1BNDmdzeTHSWbVkfK/iPeoH0fDUg1u4HXUBqpH+qjHl 2FCMxQu2ou9C2MLOvQWxah9gKIXmEZO7P9w7bOcfAuJRh7+4H8HG0ztQIe8XJtvMCBff yVdBRKJo6z3QptNhHhAtCHiB6ReNwcSJoqC5wtML0RhSKnTmutHjigBAtwZNypYeF8QC lVVSoecOr2sKxcuTun1avf6HpwwuIOdYC04KAPu+satIGfZif4czqr5x0nfHiclVXiZY 30bda7Qz7AUQM4iUDO//OxPF591MfMuxzVS1Hb+tjxg/NvPdDOnJiOpeJOBlOA5jJIT+ WAIA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=qpJ0s9mgqDi9poJ2LlURQxY6izyk1I7sBvDyMngbG9s=; fh=Vqo9V8Ytzs/wqw58IPWCIgS2s/zNjX3M5NB9x0Hwa/w=; b=dp2LU6HN8758f6MLUB/oYRQO/kLAsaKyUNjrFRwkhHy/EFmWTQxM2OUI4yFayr2Xgz Zj/jLaBwBp+UnSzmKMvMCLXFjhksxDn46iyqxDCdBnvVAkd/foZDJPx3AVvwCn1MEMGE cxEyp0zq+rokpA6yiSzcPahDC3ukgexs6rc9jwgDQzK4vijS19aXSRp+zK2UjLC12uAS JdrjHZQ7C7nAG9cBYvk/s3QaxqciSlvi3tWm9g7nsuHbZD3Ax5Jc0+iN+/gLV8ldMlUL 5sROKrGrq5D0FuU6/RcO33v3bPcQyyv/rbZH+dPbhlsMUTFMeAhG9Lh1gaVSFurPywRz xgbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PBwJPZa5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119714-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fk26-20020a056402399a00b0056bda0e1bc0si4070198edb.195.2024.03.26.11.49.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Mar 2024 11:50:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-119714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PBwJPZa5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-119714-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-119714-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4056F1F267D8 for ; Tue, 26 Mar 2024 18:49:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CC5313C67E; Tue, 26 Mar 2024 18:49:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PBwJPZa5" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5F6CB128839; Tue, 26 Mar 2024 18:49:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711478970; cv=none; b=uR+oUOvHy6LgOsL/JlQVERzVpElSPfg1D9jqsVU4k69cgYO1WhWgYem/pHO0VbwopVa96/gRc6QbjcZKMdNED+eexmC94N+Hh5Z42fekXzYiPsdEi5xmVMSpuXSyfRxyNdAC1W6o5Jxi/t/gfStYZMs4tnH1uZafIWYFJLMIFZI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711478970; c=relaxed/simple; bh=UU2VDr3u/3TXCOqy+TTP1ocWAPAmrxpuuTkUu5erUDk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TFqar4zSaqP+UX8NNHkUwxESs8Cbs9li+LySpNtmYTBwcXStYMZvFzbJLus4tGH6w7WsoT9zXxUVvPVUKUBBpKumLT8xCKhk0mXrT6oBekAmRH9OGunOI2oMoScsPeTwULRPVU+f2NAAhEK9DKFzNJemqFVeqjsqSNw9EDRqLqI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PBwJPZa5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB2DBC433F1; Tue, 26 Mar 2024 18:49:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711478969; bh=UU2VDr3u/3TXCOqy+TTP1ocWAPAmrxpuuTkUu5erUDk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PBwJPZa5DPG76Ku/rLXmTHS2TSZtuV1OhnF2IcXykh8DO9dhbAx6Rj+MiH36XNYm0 z/CCvjUf/DfFy+oYzImWu29MntAO08O+h+gjiVqCXht566Q2IJeQc51ukzqV8Afn7W iSzzlxZqv0ul84yT6zg3aLv8A/EvTXVbuHUvqxDE8qSzLjDN8/eLrAr70f5rDCS77Z an332I9toO+IxNlKk9tevAEZKF40UGoJz4JAGRgr0r+tQjSYYFXk6+rxZliOdd28Jo 79OqNa0pZC85cYV/WVkq8Mt/UkAYC9EXpv2WFwfgarN4bcizLd3LUZC951mYtBwhDv RMiijqOlPD0Zw== Date: Tue, 26 Mar 2024 18:49:25 +0000 From: Conor Dooley To: Sami Tolvanen Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , Kees Cook , linux-riscv@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Linux Kernel Functional Testing Subject: Re: [PATCH] riscv: Mark __se_sys_* functions __used Message-ID: <20240326-proofing-projector-0b8eef253667@spud> References: <20240326153712.1839482-2-samitolvanen@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="UzV3RQm1Ipc55SDT" Content-Disposition: inline In-Reply-To: <20240326153712.1839482-2-samitolvanen@google.com> --UzV3RQm1Ipc55SDT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 26, 2024 at 03:37:13PM +0000, Sami Tolvanen wrote: > Clang doesn't think ___se_sys_* functions used even though they are > aliased to __se_sys_*, resulting in -Wunused-function warnings when > building rv32. For example: >=20 > mm/oom_kill.c:1195:1: warning: unused function '___se_sys_process_mrel= ease' [-Wunused-function] > 1195 | SYSCALL_DEFINE2(process_mrelease, int, pidfd, unsigned int, fl= ags) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~ > include/linux/syscalls.h:221:36: note: expanded from macro 'SYSCALL_DE= FINE2' > 221 | #define SYSCALL_DEFINE2(name, ...) SYSCALL_DEFINEx(2, _##name,= __VA_ARGS__) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~ > include/linux/syscalls.h:231:2: note: expanded from macro 'SYSCALL_DEF= INEx' > 231 | __SYSCALL_DEFINEx(x, sname, __VA_ARGS__) > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/syscall_wrapper.h:81:2: note: expanded from mac= ro '__SYSCALL_DEFINEx' > 81 | __SYSCALL_SE_DEFINEx(x, sys, name, __VA_ARGS__) = \ > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/riscv/include/asm/syscall_wrapper.h:40:14: note: expanded from ma= cro '__SYSCALL_SE_DEFINEx' > 40 | static long ___se_##prefix##name(__MAP(x,__SC_LONG,__V= A_ARGS__)) > | ^~~~~~~~~~~~~~~~~~~~ > :30:1: note: expanded from here > 30 | ___se_sys_process_mrelease > | ^~~~~~~~~~~~~~~~~~~~~~~~~~ > 1 warning generated. >=20 > Mark the functions __used explicitly to fix the Clang warnings. >=20 > Fixes: a9ad73295cc1 ("riscv: Fix syscall wrapper for >word-size arguments= ") > Reported-by: Linux Kernel Functional Testing > Tested-by: Linux Kernel Functional Testing > Signed-off-by: Sami Tolvanen Oh neat, thanks. This was generating a shed load of noise in CI :) Tested-by: Conor Dooley Thanks, Conor. > --- > arch/riscv/include/asm/syscall_wrapper.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/arch/riscv/include/asm/syscall_wrapper.h b/arch/riscv/includ= e/asm/syscall_wrapper.h > index 980094c2e976..ac80216549ff 100644 > --- a/arch/riscv/include/asm/syscall_wrapper.h > +++ b/arch/riscv/include/asm/syscall_wrapper.h > @@ -36,7 +36,8 @@ asmlinkage long __riscv_sys_ni_syscall(const struct pt_= regs *); > ulong) \ > __attribute__((alias(__stringify(___se_##prefix##name)))); \ > __diag_pop(); \ > - static long noinline ___se_##prefix##name(__MAP(x,__SC_LONG,__VA_ARGS__= )); \ > + static long noinline ___se_##prefix##name(__MAP(x,__SC_LONG,__VA_ARGS__= )) \ > + __used; \ > static long ___se_##prefix##name(__MAP(x,__SC_LONG,__VA_ARGS__)) > =20 > #define SC_RISCV_REGS_TO_ARGS(x, ...) \ >=20 > base-commit: 4cece764965020c22cff7665b18a012006359095 > --=20 > 2.44.0.396.g6e790dbe36-goog >=20 >=20 > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv --UzV3RQm1Ipc55SDT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZgMYtQAKCRB4tDGHoIJi 0lpHAP9MHNkX3etDTKmHZ6qt1m7X45+uBOZZWopKhVa5d8UFvAD/YTeTIdZXASl8 l+cYdYHZwoR710Xt9ZyEhVuNCGR0Igs= =jNoi -----END PGP SIGNATURE----- --UzV3RQm1Ipc55SDT--