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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 1244CCCF9E5 for ; Mon, 27 Oct 2025 20:59:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id C7CA5613FC; Mon, 27 Oct 2025 20:59:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id hLzAqNmkoJ0l; Mon, 27 Oct 2025 20:59:16 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org B320C613F9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1761598756; bh=yprLLzu/23+hltQ8hDoRSGSE9VYBXZzoi6lRcgP6GUU=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=LQltO+dDsrgwZDgn+j9Ue4aYTwg1cnyCntMGYRtk5LtZH+LTK5nMIhrNnb7CLmRGG QHbJmYZHq2mwUoY0L9oFn11ncojTf2tAtUHhi5ufOwvbSIrTkHR2dVun7WMQddo3WY RG/KmqttOV1VxF/5PbjQ4TMXzPnvEmwNXlgN8KdwmpLNeuSZ0i11mUfvcS2BoNmxZc 4JUFLnK9b9LeddiA0IfeOPVTrveML/OHXwvqwp/l0Hag2BG2nz/oxloFyYwMtPBP5l FqtgbZ0ywBUz7zX5PBLZXTntrHejpVxiERnEWWoOp9hgf3gZk2Ls13zvx6gW0oV+3R BE67AqKBAFaXA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id B320C613F9; Mon, 27 Oct 2025 20:59:16 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 2FA6E939 for ; Mon, 27 Oct 2025 20:59:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2115141585 for ; Mon, 27 Oct 2025 20:59:15 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id v477ybY37dMV for ; Mon, 27 Oct 2025 20:59:14 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=nathan@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 758ED41584 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 758ED41584 Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) by smtp4.osuosl.org (Postfix) with ESMTPS id 758ED41584 for ; Mon, 27 Oct 2025 20:59:14 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 46FC5612EE; Mon, 27 Oct 2025 20:59:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16BB8C4CEF1; Mon, 27 Oct 2025 20:59:08 +0000 (UTC) Date: Mon, 27 Oct 2025 13:59:06 -0700 From: Nathan Chancellor To: Sami Tolvanen Cc: Linus Walleij , Kees Cook , Alexander Lobakin , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Nick Desaulniers , Bill Wendling , Justin Stitt , Russell King , Tony Nguyen , Michal Kubiak , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Message-ID: <20251027205906.GC3183341@ax162> References: <20251025-idpf-fix-arm-kcfi-build-error-v1-0-ec57221153ae@kernel.org> <20251025-idpf-fix-arm-kcfi-build-error-v1-2-ec57221153ae@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761598752; bh=yprLLzu/23+hltQ8hDoRSGSE9VYBXZzoi6lRcgP6GUU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b1yBFjqe7L7wiSakMaFxsykOaqlqtoXS31LKAHj3epXm3lgg8XIkT42EhxqZMwgO3 YE7454XpIAkuPSYsGIFN/QE3es/tu2qd9U+QkuR3owshZPsToFp83dDaCtkCVgoRzO 35KmyTDhGtTE2j+vKr6oONd4rMigXy3t7Mz/aWAaFUSWnkXbr3O2K/CfP3fGUjZjVR ocs11llI7nRErN6nMomsXTtegUW8LQSEQwpUWBFap/NFEJuaM5hZR/g+S8dZg0YoP4 kMd/jISG6W4xXr1WRJwsmFiTwkZDgYkTmhOkqHuSDGeAngmyCunnKdLx+yPfkVqrjL S34035HO3C3Gw== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=b1yBFjqe Subject: Re: [Intel-wired-lan] [PATCH 2/3] ARM: Select ARCH_USES_CFI_GENERIC_LLVM_PASS X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Hi Sami, On Mon, Oct 27, 2025 at 08:53:49AM -0700, Sami Tolvanen wrote: > Instead of working around issues with the generic pass, would it make > more sense to just disable arm32 CFI with older Clang versions > entirely? Linus, any thoughts? That would certainly get to the heart of the problem. I have no real strong opinion about keeping these older versions working, especially since we have no idea how many people are actively using CONFIG_CFI on ARM. I will say that this particular issue is rather exceptional (i.e., I don't know how often this would really come up in the future) because this code is relying on the fact that these indirect calls will be made direct by the compiler and checking for it, which does not seem like it would be really common in the kernel otherwise. We would likely have to forbid future use of the generic pass as well. Cheers, Nathan 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 ACD45CCF9EA for ; Mon, 27 Oct 2025 20:59:20 +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:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yprLLzu/23+hltQ8hDoRSGSE9VYBXZzoi6lRcgP6GUU=; b=2JipovSE3E13qvbCs8KWw8GQMf I6hFMy1A1SLHNYYYX3SvieGYS6kO1Nfx0TIj67dxkDXxTJ2w4E22xUxluB2qqXzFSBcjA8j8pJnDj t38hNTPI+UWoUzs7LlhuS2tVaqmtRlYf/8KbYY6c9FM0XB2Nz0KVsk3TuCHzZYwGU9Cpllt0A1AgF at4astUFkprxVLjnELM8dzRcm3+X8LquWAJvu8YDSaObvqjWrQamaSOII3ZuPnI57bFClMtrmsnvk pyg7UDtMcEbo/mMqQXFlzbcgYZELe/OGjT1prvY7gUi4lT6DMXf8kAG91+aKyNUJu2xTMdcLZ84/W cLJzg2cA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vDUJ8-0000000ElPI-3Nsu; Mon, 27 Oct 2025 20:59:14 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vDUJ7-0000000ElP7-3eh7 for linux-arm-kernel@lists.infradead.org; Mon, 27 Oct 2025 20:59:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 46FC5612EE; Mon, 27 Oct 2025 20:59:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16BB8C4CEF1; Mon, 27 Oct 2025 20:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761598752; bh=yprLLzu/23+hltQ8hDoRSGSE9VYBXZzoi6lRcgP6GUU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b1yBFjqe7L7wiSakMaFxsykOaqlqtoXS31LKAHj3epXm3lgg8XIkT42EhxqZMwgO3 YE7454XpIAkuPSYsGIFN/QE3es/tu2qd9U+QkuR3owshZPsToFp83dDaCtkCVgoRzO 35KmyTDhGtTE2j+vKr6oONd4rMigXy3t7Mz/aWAaFUSWnkXbr3O2K/CfP3fGUjZjVR ocs11llI7nRErN6nMomsXTtegUW8LQSEQwpUWBFap/NFEJuaM5hZR/g+S8dZg0YoP4 kMd/jISG6W4xXr1WRJwsmFiTwkZDgYkTmhOkqHuSDGeAngmyCunnKdLx+yPfkVqrjL S34035HO3C3Gw== Date: Mon, 27 Oct 2025 13:59:06 -0700 From: Nathan Chancellor To: Sami Tolvanen Cc: Linus Walleij , Kees Cook , Alexander Lobakin , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Nick Desaulniers , Bill Wendling , Justin Stitt , Russell King , Tony Nguyen , Michal Kubiak , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Subject: Re: [PATCH 2/3] ARM: Select ARCH_USES_CFI_GENERIC_LLVM_PASS Message-ID: <20251027205906.GC3183341@ax162> References: <20251025-idpf-fix-arm-kcfi-build-error-v1-0-ec57221153ae@kernel.org> <20251025-idpf-fix-arm-kcfi-build-error-v1-2-ec57221153ae@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Hi Sami, On Mon, Oct 27, 2025 at 08:53:49AM -0700, Sami Tolvanen wrote: > Instead of working around issues with the generic pass, would it make > more sense to just disable arm32 CFI with older Clang versions > entirely? Linus, any thoughts? That would certainly get to the heart of the problem. I have no real strong opinion about keeping these older versions working, especially since we have no idea how many people are actively using CONFIG_CFI on ARM. I will say that this particular issue is rather exceptional (i.e., I don't know how often this would really come up in the future) because this code is relying on the fact that these indirect calls will be made direct by the compiler and checking for it, which does not seem like it would be really common in the kernel otherwise. We would likely have to forbid future use of the generic pass as well. Cheers, Nathan