Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp121936lqp; Thu, 4 Apr 2024 08:33:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJ7TnXRqyE2Vqn/Zl/5pE1zHKC0eBOl2CHTktQ96snooR0c9CTy6b9glnczjC2i6HKVIxQqCr8o6yrYTQ99tuGb7UV1h8BRZ67g6wbqg== X-Google-Smtp-Source: AGHT+IGWmke9Zm2jk4ZceTzqPHLAxkQUO7zbNQpsaRewrfN0Te+NAZkY4WmL3KL66nz/ePMejYfI X-Received: by 2002:a05:6871:319c:b0:220:be2c:6083 with SMTP id lv28-20020a056871319c00b00220be2c6083mr2267728oac.49.1712244823270; Thu, 04 Apr 2024 08:33:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712244823; cv=pass; d=google.com; s=arc-20160816; b=oBqbVpkmY57dGqb/YlD74QHd4TW9Mn7mfuUxVvXiOZfP7QfwaHAkMRIwHT6P1zfbsI ewj2Te00swaWZwgMxHohm8tM0MMYmgjmae8+wl9veDZXKFQcA8UVDFOLP43vHmCgR5sw Tom36/UO4WqHhQm7CUmV1yF0QGqJT8R3yQLDOptK8dCkYqen3dPdOGhSeQuxxNqoUd45 BnX1eOMR9OivCWxkC5gAyl0un9ShcF0vuzN8keVgm5rEyhgfM/cG+JZGQOsKq6pCokNQ odo24nWMtbT6kZg1Qw70FIFwIHVOqDzZ07xcc74+nzwZs39DGc9JDSECrjIRUhvbcCKC 4qrg== 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=VV5aU5kbS/JV0y3hn9vImJ6H1QF+06XI3h8AMunuf5I=; fh=OLKdHljAsWz+SdNgNGnUgzHzS/RTnmhebqqVmyxWftQ=; b=cXwvU1trqxIaYoKoXFDMX9IzUbUqJZOemNNxsrdUSd9tNYYX+jP52BKlsFM0eerLh4 NOtEad69VOnktP5a3YeK1cWngswgzCyFLSwL+ZrLgZhWGWjs7afsB/D5/s8pjYLPdh5f YXFZs+5H3Yy1FIPOBBrIhzoVCzlaivfUGZtwaNX9cek4Dneujcw8LpVVDPm+iE/X61H/ 9XJeBMZRdjM3v86cE4iwhgpoLUXhNn2FCnDhnzOTTGh/lzHv7dQMGr1VcvCJcbwswSiy 8eNof+ItvKVsyiQAwzVAxAjarLLqsamqApiQZFrM5rWqaJgNlKyTs3xEmWxw2wg9072z wg2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PQLRQoQ8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b7-20020a05620a04e700b0078bdddcd936si10565603qkh.342.2024.04.04.08.33.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 08:33:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PQLRQoQ8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131728-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131728-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id C1F8E1C27A84 for ; Thu, 4 Apr 2024 15:33:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6D3512A174; Thu, 4 Apr 2024 15:33:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PQLRQoQ8" 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 CA93C1292EE; Thu, 4 Apr 2024 15:33:01 +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=1712244781; cv=none; b=Ap1X0x0yW7X8vUxpvUpPFI5SX/oFwheKh1BRjk/8SOrov4vcKsrfuLWmdN1LGsek8AVy7WybS8Zs+pQB7wQf8u0Uc0WeFGB+lAliMz4WBJ5se+pR6XWYz8LCbyUIVLPbwMzzghIRj1voJ6xFMXhCP/Zf2y7TXs2vOzwm6Mp+QMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712244781; c=relaxed/simple; bh=+ihKIoYDSDX/L3rUTACaGuGGhf6TLUZ/+4aywDsnmIM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UEt5xSpdYo0uctKDX1QyToz6xN01HMRwwuwzURpBDcd3VELKQzzpo7gRiAql9aFF8mFNv7JzBZkpms7RATLwSjS36yQ2dRDH8f+6QEi/kTOtAts+YpzNgv2wLYliqdBCuFvEHRJ2qJL0Dv0bR23r6L+ZP43rrDto7pXeJg5Qehw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PQLRQoQ8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96471C433F1; Thu, 4 Apr 2024 15:33:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712244781; bh=+ihKIoYDSDX/L3rUTACaGuGGhf6TLUZ/+4aywDsnmIM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PQLRQoQ8m3JLC2Td7LqTr9Gyx8iw2LqCI4y/rdO3jtZZbS+Jx+i1K/p9KSnZBmeME +c29ns5saD6bgCr/l+2SX/f4nFyiiSIxm/5E9rcRe8PW0ZE7NZpGIwjxhx5E89VL15 82t9Vd7JFQgbffAMgIwa0aZMPBP883Z6LDkVPEtCDYG8PJHV9dhQXrPGeZxtYv/B+S TdPsbPup6lVeq9b/AlKD3BSDhXEVHVqOEnkLN8LdjH60jD/0MagUPdIpfuABSjbPKn Ca++IKiyI5MdVDhXG+zD+xnTEBgDZk67+RLYMxMdw2G32RjOdiVttZUzTgVOGqjsQP tS4iFvBCBEjKg== Date: Thu, 4 Apr 2024 08:32:58 -0700 From: Nathan Chancellor To: Conor Dooley Cc: linux-riscv@lists.infradead.org, Conor Dooley , stable@vger.kernel.org, Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, Sami Tolvanen , Kees Cook , llvm@lists.linux.dev Subject: Re: [PATCH v3] rust: make mutually exclusive with CFI_CLANG Message-ID: <20240404153258.GA852748@dev-arch.thelio-3990X> References: <20240404-providing-emporium-e652e359c711@spud> 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=us-ascii Content-Disposition: inline In-Reply-To: <20240404-providing-emporium-e652e359c711@spud> On Thu, Apr 04, 2024 at 03:17:02PM +0100, Conor Dooley wrote: > From: Conor Dooley > > On RISC-V and arm64, and presumably x86, if CFI_CLANG is enabled, > loading a rust module will trigger a kernel panic. Support for > sanitisers, including kcfi (CFI_CLANG), is in the works, but for now > they're nightly-only options in rustc. Make RUST depend on !CFI_CLANG > to prevent configuring a kernel without symmetrical support for kfi. > > Fixes: 2f7ab1267dc9 ("Kbuild: add Rust support") > cc: stable@vger.kernel.org > Signed-off-by: Conor Dooley Acked-by: Nathan Chancellor It seems like this won't be forgotten about but if there is not already an issue open for this somewhere, it would be good to have one, since we obviously want this for both C and Rust code. As a general meta comment not directed at anyone in particualr, I think these 'depends on !' should all have some sort of comment or description as to why they are disabled. I can infer from most of them but it would still be good to be explicit, especially since someone might want to work on fixing the ones that are due to missing support and such. > --- > Sending this one on its own, there's no explicit dep on this for the > riscv enabling patch, v3 to continue the numbering from there. Nothing > has changed since v2. > > CC: Miguel Ojeda > CC: Alex Gaynor > CC: Wedson Almeida Filho > CC: linux-kernel@vger.kernel.org (open list) > CC: rust-for-linux@vger.kernel.org > CC: Sami Tolvanen > CC: Kees Cook > CC: Nathan Chancellor > CC: llvm@lists.linux.dev > --- > init/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/init/Kconfig b/init/Kconfig > index aa02aec6aa7d..ad9a2da27dc9 100644 > --- a/init/Kconfig > +++ b/init/Kconfig > @@ -1899,6 +1899,7 @@ config RUST > bool "Rust support" > depends on HAVE_RUST > depends on RUST_IS_AVAILABLE > + depends on !CFI_CLANG > depends on !MODVERSIONS > depends on !GCC_PLUGINS > depends on !RANDSTRUCT > -- > 2.43.0 > >