From mboxrd@z Thu Jan 1 00:00:00 1970 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 AA04D1D5CE0; Mon, 11 May 2026 09:09:49 +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=1778490589; cv=none; b=US8hm6LmJYkoA9eq+XH38IjamJv9wpFWxYeCiOWIrZUZEqaOQzrB5JvE84rO9ibbYVxvu+fxnH0JSw8Jxzf7aofVth6k3bVZc1ngTTZMzbvREUGd3awg4b2ayFjv9MPBUsnwM7AImZunKDVJDYNhtuHapODAadeIEOwesZdytBw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778490589; c=relaxed/simple; bh=pnPO1CrEA1FQe9xDcrN7whB/TUmM3QUmKYvPyURJ78I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=i1q+FPMJyWQeeCOsmrlWiV5qXAIvuPdNMqdZ3/t6RwuGCBJqifbDqNEbpLgbE4s4wF2a3kfZvC2aPCOimjnZ/LUX3qpVcS+Hnoth5YDUAVfPJ0MBiC5z7MlnnWxWQJ8PxY3n1tza1es0F6k7vCrCWU4j5Mr/65PUJeulpIA66qY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=smQLFT2y; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="smQLFT2y" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 68FA0C2BCB0; Mon, 11 May 2026 09:09:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778490589; bh=pnPO1CrEA1FQe9xDcrN7whB/TUmM3QUmKYvPyURJ78I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=smQLFT2ynutYERKsr/eFczsT1AiyS7PWL5ILAAOFi2DcdHRZyLGrvLSD5pYCnf33V sh2YmSuGMr9hdnPr3W33ycWcAsCKgjbqIPscyZdEDtTJU6E6HweTvyN9eYJY/sJE26 OeJULwcO2tzROWxtiv/fuX3wvKdiWXW//6IU2NQDWnTQ/ifVv5gGl4hlzpd0EBFtQ2 RG4sJ83xAsShCOsz4b2VDDECW2Ru/xIV8lJ97Sd9WRdqUoKwqRdoTePBPeetnQy/iw o8RP8Y55fGLUC+ucvaqRElII6akzSkrVYHFbzMhe43L39ddHGN2ibhiH1+9UT3PxwB gSEqVcG+6uawQ== Date: Mon, 11 May 2026 18:09:43 +0900 From: Nathan Chancellor To: Alice Ryhl Cc: Russell King , Miguel Ojeda , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Christian Schrrefl , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] ARM: Do not select HAVE_RUST when KASAN is enabled Message-ID: <20260511090943.GA1029560@ax162> References: <20260511-arm-avoid-rust-with-kasan-v1-1-24d55f4a900b@kernel.org> 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: On Mon, May 11, 2026 at 08:21:48AM +0000, Alice Ryhl wrote: > On Mon, May 11, 2026 at 05:02:44PM +0900, Nathan Chancellor wrote: > > When KASAN is enabled, such as with allmodconfig, the build fails when > > building the Rust code with: > > > > error: kernel-address sanitizer is not supported for this target > > > > error: aborting due to 1 previous error > > > > make[4]: *** [rust/Makefile:654: rust/core.o] Error 1 > > > > The arm-unknown-linux-gnueabi target does not support KASAN, so avoid > > saying Rust is supported when it is enabled. > > > > Cc: stable@vger.kernel.org > > Fixes: ccb8ce526807 ("ARM: 9441/1: rust: Enable Rust support for ARMv7") > > Link: https://github.com/Rust-for-Linux/linux/issues/1234 > > Signed-off-by: Nathan Chancellor > > I would probably suggest moving the conditions out to a separate > RUSTC_SUPPORTS_ARM config option similar to what I did in commit > d077242d68a3 ("rust: support for shadow call stack sanitizer"). > > This way it will be simpler to adjust this logic when the target obtains > support for this sanitizer. Sure, I kept it simple for backporting purposes but I don't mind breaking out the dependencies into their own symbol, even though it feels like that could be done when support for the sanitizer is re-enabled, which would truly mirror what you did. No strong opinion though, so I will send a v2 after giving some time for other comments. > Also, we may need the same change for CONFIG_CFI too. I think the dependencies of HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC prevent RUST from being selected when CFI is enabled for ARM, so I don't think there is a problem there. -- Cheers, Nathan