Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp745200rwl; Fri, 31 Mar 2023 01:33:59 -0700 (PDT) X-Google-Smtp-Source: AKy350bYID03StqJIGX5+B0RbEkvLmem/3zv3eSXo7jytwBhq6hijZNJc3V8jsVyT1yto2niGmK9 X-Received: by 2002:a05:6a20:440c:b0:d7:19b3:a9bd with SMTP id ce12-20020a056a20440c00b000d719b3a9bdmr6349413pzb.4.1680251638765; Fri, 31 Mar 2023 01:33:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680251638; cv=none; d=google.com; s=arc-20160816; b=x9uHKOpwdpkdkLRR62gDbxcUdBrE59w2i1H42UH36/nN2x/eXEloK7rf4/kOmc4RAc zg3xTOqJVMqBLsPp5h0zXTFIg+Wx43Y5ubUIREIHjgXc3mbMEYHNFbGNiDHG9jw9KFM2 0SkgHAG/jD9EeZ7oz8l02SYky9+0zC/RP8/Ofq5wD9BDryl4s/s6OlG9w/QB9OhFfuep 5/PAlV+z7C0W08EjXpO4wQmgLmJ6Kxk9UIQlrMsdT6EAczxEJS30nqbG62UcLHcL0ryQ 1LRPOUtKZsJ6iaaPrpBpczIelx72X5eGHdHeaoKzMtz0/Su0sQilEZMxidxdju4PpA5x nsYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=RSbBrQxvK3Zv2tNZPMfiOGMRfwB7fZPJM1nMOAJuw4E=; b=PBfHFYLpb8nUs08hXm8KPm6m6JbS/g5L+lbvN/SOuyys0D2ILeEFcX4d204VxNtub7 neh4BteYNrlOQXhUFLTHnUneiVIBoIi+h6ddd1ILMF0Okj2/Y0DXWMa8PJTHySjwIkV/ MaWAzAc4kIJAL1Zf2r/MqGfs/7aXpJ+5bDVh0f/Fc1Qj+qq+oqBCWdp67Es7bO0F/91b DyTa2sLEk9HqP/aVoClrcbdb2nahr9kc8dybbcdB6fUys61kBIeBi3g9rW/3H5yYUnjj nu7VEieZ1kpCUFCtGxKVYUEei54O4vrh8H0a2/EHLAKCQr+65m+3Q5rDEbGD8U+M+yDG lGYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=EkzmyIqE; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j8-20020a63cf08000000b0050c0c9d2916si1680486pgg.870.2023.03.31.01.33.47; Fri, 31 Mar 2023 01:33:58 -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=@google.com header.s=20210112 header.b=EkzmyIqE; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230389AbjCaI0V (ORCPT + 99 others); Fri, 31 Mar 2023 04:26:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230148AbjCaI0J (ORCPT ); Fri, 31 Mar 2023 04:26:09 -0400 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E18ADB474 for ; Fri, 31 Mar 2023 01:25:56 -0700 (PDT) Received: by mail-io1-xd2f.google.com with SMTP id o10so1266268iou.5 for ; Fri, 31 Mar 2023 01:25:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680251156; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=RSbBrQxvK3Zv2tNZPMfiOGMRfwB7fZPJM1nMOAJuw4E=; b=EkzmyIqE/qzdfKz+QaH4eWIuvB5MG1CnkPUqi07ZIjaelNYnbne/Q2VNq3arhSz2Li 9YeAdnal3J7WFjrcmvlAhvj23lgL2YZM48+TEGSdJWrB/APtRkATFDM8LohTcPf0cboH WBqepQ6yJTBZKzuWelB+nZkuKxyxGN4xUhJ9Mn6zLRmyx85cFH4A61Knepons60Epqbc J4a8PcJpkm3MWtfGx7Zw1o70+lTU7ZolDPcKZu/doM7+bqqhWqua6H0BKjJQ6ajpGdv6 +toVmCd9VL4Vt/v/ElBoHzuE9z3J65Si+gkFLB3QoD3p7VM83QTxMJ8eDBIDBxX+46aw VtjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680251156; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=RSbBrQxvK3Zv2tNZPMfiOGMRfwB7fZPJM1nMOAJuw4E=; b=v9WkyYkzr7+lH+kEMwPU9BtmQw9DS5Lqy7uwxucdbN75J4F9QeicfrfVJWotTz74Tn 574tikRdcRHLygqHk45GQ6thIbq6iK0g1YtvIMWESv51hxYptff9wKWYSPMndsoZk0Pp X5qLuKYzdhmTHAngdO4ddkgC1PAtua8uSfm3o5ybkb9EI4bzUrVABWWXpDG2dqbqype/ 50Gs6r6dAa619Shz4WWajJhbbM/TbDqjBfnaATba3FjQjcelUzVaQRZtSl21MJ5nnjNm HGopiDnopy0VkUwqwPXGBTEFAZZU5SIr08C83VmqXAiaCV5dlu7Ug3dozuFIyv0cRA8Z P1Rg== X-Gm-Message-State: AO0yUKUqaoXMug5DmKM8cEWZtSccxTv222fnF3DRjxgmv7mByEgHhMt8 lRa0F4wQVbpPV6z8aQXKIEbQxTqKPHwhIdvYA8F/SA== X-Received: by 2002:a02:85a3:0:b0:3f6:e3c2:d4be with SMTP id d32-20020a0285a3000000b003f6e3c2d4bemr11295973jai.0.1680251156168; Fri, 31 Mar 2023 01:25:56 -0700 (PDT) MIME-Version: 1.0 References: <20230318041555.4192172-1-davidgow@google.com> In-Reply-To: <20230318041555.4192172-1-davidgow@google.com> From: David Gow Date: Fri, 31 Mar 2023 16:25:44 +0800 Message-ID: Subject: Re: [PATCH] arch:um: Only disable SSE on clang to work around old GCC bugs To: Richard Weinberger , Anton Ivanov , Johannes Berg Cc: linux-um@lists.infradead.org, x86@kernel.org, llvm@lists.linux.dev, rust-for-linux@vger.kernel.org, kunit-dev@googlegroups.com, linux-kernel@vger.kernel.org, SeongJae Park , Roberto Sassu , Miguel Ojeda , Nathan Chancellor , Ingo Molnar , Thomas Gleixner , Nick Desaulniers Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000518d8b05f82df561" X-Spam-Status: No, score=-15.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=unavailable 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 --000000000000518d8b05f82df561 Content-Type: text/plain; charset="UTF-8" On Sat, 18 Mar 2023 at 12:16, David Gow wrote: > > As part of the Rust support for UML, we disable SSE (and similar flags) > to match the normal x86 builds. This both makes sense (we ideally want a > similar configuration to x86), and works around a crash bug with SSE > generation under Rust with LLVM. > > However, this breaks compiling stdlib.h under gcc < 11, as the x86_64 > ABI requires floating-point return values be stored in an SSE register. > gcc 11 fixes this by only doing register allocation when a function is > actually used, and since we never use atof(), it shouldn't be a problem: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652 > > Nevertheless, only disable SSE on clang setups, as that's a simple way > of working around everyone's bugs. > > Fixes: 884981867947 ("rust: arch/um: Disable FP/SIMD instruction to match x86") > Reported-by: Roberto Sassu > Link: https://lore.kernel.org/linux-um/6df2ecef9011d85654a82acd607fdcbc93ad593c.camel@huaweicloud.com/ > Tested-by: Roberto Sassu > Tested-by: SeongJae Park > Signed-off-by: David Gow > --- Any chance we could get this picked up as a fix for 6.3? The UML build is still broken with older gcc versions. Cheers, -- David --000000000000518d8b05f82df561 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIPnwYJKoZIhvcNAQcCoIIPkDCCD4wCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg ggz5MIIEtjCCA56gAwIBAgIQeAMYYHb81ngUVR0WyMTzqzANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA3MjgwMDAwMDBaFw0yOTAzMTgwMDAwMDBaMFQxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMSowKAYDVQQDEyFHbG9iYWxTaWduIEF0bGFz IFIzIFNNSU1FIENBIDIwMjAwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvLe9xPU9W dpiHLAvX7kFnaFZPuJLey7LYaMO8P/xSngB9IN73mVc7YiLov12Fekdtn5kL8PjmDBEvTYmWsuQS 6VBo3vdlqqXZ0M9eMkjcKqijrmDRleudEoPDzTumwQ18VB/3I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