Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6266362rwr; Mon, 24 Apr 2023 17:06:06 -0700 (PDT) X-Google-Smtp-Source: AKy350afP7Ykv4cL/VIxpniTn0P5sb8NRYEzUB6+Pu0gQ1+/YHExp+B4KpR8YCMQEwoKDkBEBq12 X-Received: by 2002:a17:902:d4d1:b0:19a:9880:175f with SMTP id o17-20020a170902d4d100b0019a9880175fmr18848842plg.51.1682381165775; Mon, 24 Apr 2023 17:06:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682381165; cv=none; d=google.com; s=arc-20160816; b=CYu5GSZXYNUtjtpd0qbNoYI0XqulxGCR6b5bT/k9eGzghjhy8NPgNdg+3xjXbW0R0m +sKmTyNG4wQOQ6cDP8TKDUC5L8r1mUVWgFAt1JWIyl1+SsLLIpz6ZeQ66Cnt6zWj3BI3 c3sBhia6mDojnHa2FUcytwvwpklRrI/pnNLCGybEtUhjH9FHi5EpYlq5VoPCVjOxNg/V AWc8kLU8hOwvxd1cvbAjNRPfR5OE/NJa8W839NsW/x0XezOhHtFZfJNZhN8DY9woitCJ UaW7s0/4nTU/pQVddBEWY+Xxt3OMlmALqCytodataARZ4r/1xCRyUGcZFFY8fhroEnxz fADA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LYB5d1xKtNTCp2R97z8yjNNpNqqTjR9qXSAD2RbrKOQ=; b=XTTzI1tEIV79xy7VY7W2lRPXWIN5CPTmu+jMHgw4gFEPzCyeOVkZi9CJzoEZO1f3FY sLz+KzPe9+2bojMp4Um/J6vh4gfMlovSnXp659bED4ns3mxzSDcIregWHvXRlRKUt2BZ KE1zPN9CMMq0F/rcUZkNY1Ae+BVE6BmoHL3cu57QKP+HFfjKr3P9tnkFZQkw/i0e32zb lHbTWe3d/HMrGzb4WgG0rz3tMlKkjpkr7IqorMghrfneTPBTKmWZB/Gj08PwJJAuT0mL SYVM0dCotXQHeEXX8DOs91+rmsalx0hOuwbDlEIJe+aFfk/KN2M9WgbsviE2v1nAh5/r dWcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YI0iQsJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a170903228900b0019f28eff6f9si11795354plh.502.2023.04.24.17.05.36; Mon, 24 Apr 2023 17:06:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YI0iQsJD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232569AbjDYAB2 (ORCPT + 99 others); Mon, 24 Apr 2023 20:01:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232314AbjDYAB0 (ORCPT ); Mon, 24 Apr 2023 20:01:26 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6180865A0; Mon, 24 Apr 2023 17:01:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E893C62A62; Tue, 25 Apr 2023 00:01:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83958C433EF; Tue, 25 Apr 2023 00:01:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682380881; bh=DOtLRFklRFNIwZwR+mJSNOC+/SMlST+wjhFM31DemZU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YI0iQsJDzXLdF4K3zTSApDcaUBWn9bHvayuO0rQWGCq+s9Z0Rx4zWYGy1kQE0dpf4 L+843nKU0eXmKvlbaK51nYQOBeNu7hB8e0cnIl9BX8ZNYmkQvemsQADHsJ0kMFacHo Dh7RP9kcb37iT39U86Oe06X8pTB/VNpsjMJgaD0DdgIoo9JIYRt18wYZFXFoagNoBO zx2gzzC55BHVVhuJXz6QVNlF1cN42IgJQrSsqV6i+diMwdy6cnL0TxCdS4Ta8w8Zns N01FWvAtskWhlNsWN26V6y0slo5reC62c1iluzpBQwSVJ0h6OJu16KVe37pSFjMvPL rnWFjCSTt9mHQ== From: SeongJae Park To: Sasha Levin , gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, "David Gow" , =?UTF-8?q?Sergio=20Gonz=C3=A1lez=20Collado?= , "Richard Weinberger" , tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org Subject: Re: [PATCH AUTOSEL 6.1 04/13] rust: arch/um: Disable FP/SIMD instruction to match x86 Date: Tue, 25 Apr 2023 00:01:18 +0000 Message-Id: <20230425000118.45838-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314124325.470931-4-sashal@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Sasha and Greg, On Tue, 14 Mar 2023 08:43:16 -0400 Sasha Levin wrote: > From: David Gow > > [ Upstream commit 8849818679478933dd1d9718741f4daa3f4e8b86 ] > > The kernel disables all SSE and similar FP/SIMD instructions on > x86-based architectures (partly because we shouldn't be using floats in > the kernel, and partly to avoid the need for stack alignment, see: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 ) > > UML does not do the same thing, which isn't in itself a problem, but > does add to the list of differences between UML and "normal" x86 builds. > > In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when > building with SSE, so disabling it fixes rust builds with earlier > compiler versions, see: > https://github.com/Rust-for-Linux/linux/pull/881 > > Signed-off-by: David Gow > Reviewed-by: Sergio González Collado > Signed-off-by: Richard Weinberger > Signed-off-by: Sasha Levin There is a followup fix of this patch that merged into the mainline by commit a3046a618a28 ("um: Only disable SSE on clang to work around old GCC bugs"), but it has not added to 6.1.y so far. Without it, compiling on some setup using an old version of gcc fails, as the followup is also mentioning. I also confirmed the issue can be reproduced on latest 6.1.y. Could you please add the followup fix to 6.1.y? I confirmed the commit can be cleanly cherry-picked on latest 6.1.y, and fixes the issue as expected. Thanks, SJ > --- > arch/x86/Makefile.um | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/x86/Makefile.um b/arch/x86/Makefile.um > index b3c1ae084180d..d2e95d1d4db77 100644 > --- a/arch/x86/Makefile.um > +++ b/arch/x86/Makefile.um > @@ -1,6 +1,12 @@ > # SPDX-License-Identifier: GPL-2.0 > core-y += arch/x86/crypto/ > > +# > +# Disable SSE and other FP/SIMD instructions to match normal x86 > +# > +KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx > +KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2 > + > ifeq ($(CONFIG_X86_32),y) > START := 0x8048000 > > -- > 2.39.2 > >