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 smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 7C5AACCF9EB for ; Thu, 30 Oct 2025 03:04:09 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2B32A40CAA; Thu, 30 Oct 2025 03:04:09 +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 CBXMyBYK3zkG; Thu, 30 Oct 2025 03:04:08 +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 smtp4.osuosl.org 6566D40CDE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1761793448; bh=jsjqieVlu7j26QztQ4gx8a0IlvRQKGUmWf0NzLPg2hg=; h=Date:From:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kkBECdd9VYfaNVsLhffNAdSrlcYNsQAmgzHWZG/PgivXw1eTa4IQcLYiD5dj7paFI 1zyS25peihrEeo2K8Z4+QcJK6Z1EvD0OnEt8M27GcBeenixWS5x1+ew7CrzdgD9g4I EpuaCMxik+Qkp7ZT/LQ6Z8jAhQ1hsH54sHXDeRUrzZBIpR5QIixHxKM+BLk4dwTlSE GMQ/KeqcogXJeyNY34+cRI77gzxxJnvBd+DkC2O2MOtk4D2M/LGExz7VNBC0er8bSG B1RiaHD9lni2b3Rhucun3n9bjZjZXqe6tHHsMVFVIlqFa3RlZu8YfiIcBbCn6awg9l wkbAuPxh0bLKA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 6566D40CDE; Thu, 30 Oct 2025 03:04:08 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id D1BA5CD for ; Thu, 30 Oct 2025 03:04:07 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id B761D40CDE for ; Thu, 30 Oct 2025 03:04:07 +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 DfJayfZMMCiJ for ; Thu, 30 Oct 2025 03:04:07 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c0a:e001:78e:0:1991:8:25; helo=sea.source.kernel.org; envelope-from=kees@kernel.org; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org EC6AE40CAA DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org EC6AE40CAA Received: from sea.source.kernel.org (sea.source.kernel.org [IPv6:2600:3c0a:e001:78e:0:1991:8:25]) by smtp4.osuosl.org (Postfix) with ESMTPS id EC6AE40CAA for ; Thu, 30 Oct 2025 03:04:06 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 227AC44CBE; Thu, 30 Oct 2025 03:04:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E68BDC4CEF7; Thu, 30 Oct 2025 03:04:05 +0000 (UTC) Date: Wed, 29 Oct 2025 20:04:05 -0700 From: Kees Cook To: Linus Walleij Cc: Sami Tolvanen , Nathan Chancellor , 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: <202510292002.10FDB135C3@keescook> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761793446; bh=AxveStPh2elBDvaO3K+y6I5FgqDnSBSlQMj0Px3/aIs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EZaDyQxgEBdxypDayV4zGIOC0hSpv/dimzVnZC6eD32j8HcYuLqXdqpfemFhJ/qjE fSS1UN28q2IgsCqqxMq6EZaVJTO2Xom8IuurL5aVSJ0D+E4E+9p2M8S4oyHxH0tVbc sCU/iAKPoST3uSPQc9greA1oCzdhXml2aOWtEpuNmUko0B61sesPBShgY8+NWmSOn/ cTjD20hRAUKrV8tlMd6uLlS5oeMvsLW2W06i4CZDEamhbPZ1ZoEJo0lUJbriX9rnhF yCOTw0XExmFAp14LIcsxAiAElyXWgreXbAg7nwlZIhQd5qxGigk62k+ULsEsw3a2qu BvjswhKmGmznw== 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, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=EZaDyQxg 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" On Mon, Oct 27, 2025 at 11:56:21PM +0100, Linus Walleij wrote: > On Mon, Oct 27, 2025 at 4:54 PM Sami Tolvanen wrote: > > On Sat, Oct 25, 2025 at 1:53 PM Nathan Chancellor wrote: > > > > > > Prior to clang 22.0.0 [1], ARM did not have an architecture specific > > > kCFI bundle lowering in the backend, which may cause issues. Select > > > CONFIG_ARCH_USES_CFI_GENERIC_LLVM_PASS to enable use of __nocfi_generic. > > > > > > Link: https://github.com/llvm/llvm-project/commit/d130f402642fba3d065aacb506cb061c899558de [1] > > > Link: https://github.com/ClangBuiltLinux/linux/issues/2124 > > > Signed-off-by: Nathan Chancellor > > I didn't know Kees stepped in and fixed this, christmas comes > early this year! I had it on my TODO to do this or get someone to > do this, but now it turns out I don't have to. > > > > + # https://github.com/llvm/llvm-project/commit/d130f402642fba3d065aacb506cb061c899558de > > > + select ARCH_USES_CFI_GENERIC_LLVM_PASS if CLANG_VERSION < 220000 > > > > 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? > > We have people using this with the default compilers that come with > Debiand and Fedora. I would say as soon as the latest release of > the major distributions supports this, we can drop support for older > compilers. Okay, it seems like the consensus is to take this series so we don't break existing users, even if they are rare. Unless someone screams, I'll take this via the hardening tree... -- Kees Cook 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 09441CCF9EE for ; Thu, 30 Oct 2025 03:04:18 +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-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jsjqieVlu7j26QztQ4gx8a0IlvRQKGUmWf0NzLPg2hg=; b=ETD+hZFh8oyLtWdj0DZYNbj0su LnVYeeLZ6nQ52q01gfFO5/lmnA0etPB9pIj9zKp5AyPx8uNTWEb1yHSah5QD1AWkBsmx/9uxz8ExN t0cz1DU+XT98Qzii3VHJivVg3y9RW1ihkt/KHbe+utL/8yVqk7z278/Epuu0e69wrjt+7Huoa40SX /5vZvRMWAHBPid+wQIqY+WXKdvE+8TxkqdoDpunHLvpRLzV6M46mfWRRZW6hxv5pHXBYoUcL00KbV VoGANKT9tfSF7eP5siAtcv4aqXi+SSUMKXM1c/QXTCe1ktln8N+OMYQp8CbrFRk7/V/C12z/nV/IW IW2ylM2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vEIxP-00000003OhJ-0422; Thu, 30 Oct 2025 03:04:11 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vEIxN-00000003Ogu-05Oc for linux-arm-kernel@lists.infradead.org; Thu, 30 Oct 2025 03:04:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 227AC44CBE; Thu, 30 Oct 2025 03:04:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E68BDC4CEF7; Thu, 30 Oct 2025 03:04:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761793446; bh=AxveStPh2elBDvaO3K+y6I5FgqDnSBSlQMj0Px3/aIs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EZaDyQxgEBdxypDayV4zGIOC0hSpv/dimzVnZC6eD32j8HcYuLqXdqpfemFhJ/qjE fSS1UN28q2IgsCqqxMq6EZaVJTO2Xom8IuurL5aVSJ0D+E4E+9p2M8S4oyHxH0tVbc sCU/iAKPoST3uSPQc9greA1oCzdhXml2aOWtEpuNmUko0B61sesPBShgY8+NWmSOn/ cTjD20hRAUKrV8tlMd6uLlS5oeMvsLW2W06i4CZDEamhbPZ1ZoEJo0lUJbriX9rnhF yCOTw0XExmFAp14LIcsxAiAElyXWgreXbAg7nwlZIhQd5qxGigk62k+ULsEsw3a2qu BvjswhKmGmznw== Date: Wed, 29 Oct 2025 20:04:05 -0700 From: Kees Cook To: Linus Walleij Cc: Sami Tolvanen , Nathan Chancellor , 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: <202510292002.10FDB135C3@keescook> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251029_200409_081450_15EDEC40 X-CRM114-Status: GOOD ( 18.19 ) 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 On Mon, Oct 27, 2025 at 11:56:21PM +0100, Linus Walleij wrote: > On Mon, Oct 27, 2025 at 4:54 PM Sami Tolvanen wrote: > > On Sat, Oct 25, 2025 at 1:53 PM Nathan Chancellor wrote: > > > > > > Prior to clang 22.0.0 [1], ARM did not have an architecture specific > > > kCFI bundle lowering in the backend, which may cause issues. Select > > > CONFIG_ARCH_USES_CFI_GENERIC_LLVM_PASS to enable use of __nocfi_generic. > > > > > > Link: https://github.com/llvm/llvm-project/commit/d130f402642fba3d065aacb506cb061c899558de [1] > > > Link: https://github.com/ClangBuiltLinux/linux/issues/2124 > > > Signed-off-by: Nathan Chancellor > > I didn't know Kees stepped in and fixed this, christmas comes > early this year! I had it on my TODO to do this or get someone to > do this, but now it turns out I don't have to. > > > > + # https://github.com/llvm/llvm-project/commit/d130f402642fba3d065aacb506cb061c899558de > > > + select ARCH_USES_CFI_GENERIC_LLVM_PASS if CLANG_VERSION < 220000 > > > > 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? > > We have people using this with the default compilers that come with > Debiand and Fedora. I would say as soon as the latest release of > the major distributions supports this, we can drop support for older > compilers. Okay, it seems like the consensus is to take this series so we don't break existing users, even if they are rare. Unless someone screams, I'll take this via the hardening tree... -- Kees Cook