Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1246911rwl; Thu, 10 Aug 2023 08:26:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGM5SGr/XE5T9u1Q0e2ujO0m+3fgw8lSAIafy1N7ixgmNCFW+czqEsfWFYL15KNFmbk/2PM X-Received: by 2002:a17:902:70cb:b0:1b8:6cab:db7f with SMTP id l11-20020a17090270cb00b001b86cabdb7fmr2161650plt.53.1691681198893; Thu, 10 Aug 2023 08:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691681198; cv=none; d=google.com; s=arc-20160816; b=VS3J4IfyEW19q7PLMS6mcT7iQvHrOX80fZIE/KcbGsPiK+X8WR8BPpsw5L8WJ1JYLc 5bcCf9r70ihb17EIZFz9t0zU7yPFl9O9W8AF/NvMgrEPg7nNZBqH5g7+vJWi4yHb6H6Y LIRDwjCsSNf4r4ftgfCgGjjYY7/LcCZbNDkcq6i79DDEARznQz1ySf8dJryKdfVwt4qk dQM2WZqIFBO4cZYWAxSkY0l4a0LdcJnXsS6Twqm2W8U2t4Ea0CGfPBn9I7jcfEcQz43Q 3oP0QQMKZf1+cnbgZbtxQ0qF0sFTzTDFiQpehutBqrIVVEmS57m6vacVWYXhJLUU71wG QbKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vN/2vHgO+35H10EWWAmn2OYNb+p+z1/We/XeIxoY9Cs=; fh=qbL3oTtvI8s5YNAzoA11vdqTq8Zmmw9LvjvyLWw5wyA=; b=LFsynhAbAlsfh/e+iR830iBUorxB5wy4SjOQ/mz4OsCuA6JEcCiFmqIlLLBZ5WllQa C1XWh9g3dymFvxT9nUaE4TOTyekiqceXMK72e4CXGalL/Llm14lolKUmy0iNFtsiLEuh IDChBJbA+koyFk5XeaSPqdnXVuD33D7PVDEC0ipGelHVtKxpCdtJ8cG+BrYQSkSBYvKU OrRK/DTMkcjw3vUw0f5SLJUiChxaIccfQGL27+9c2ElVsGZBCgpwsD0oEdQL1xZinP0z mgPPTwmDVZQsK9fN/iYzlRN6Z+HjqIXLkqQAYnaKnAbkbWCE/EhyFukrAXGUFgndi1xD DYtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Vh2iW70Q; 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 i12-20020a17090332cc00b001b6ae9f8bb1si1757882plr.75.2023.08.10.08.26.25; Thu, 10 Aug 2023 08:26:38 -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=Vh2iW70Q; 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 S232883AbjHJPHL (ORCPT + 99 others); Thu, 10 Aug 2023 11:07:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235464AbjHJPHK (ORCPT ); Thu, 10 Aug 2023 11:07:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B55DE2686 for ; Thu, 10 Aug 2023 08:07:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5241265F85 for ; Thu, 10 Aug 2023 15:07:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57933C433BB; Thu, 10 Aug 2023 15:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691680028; bh=SedsBJA7SDym526YfYO6tDp0uAlB3IbI+3hK27IRyn0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vh2iW70QikbFOmOMjfuRuJ82L+EQsQ7E2UItOn6c8tGPwj+E527RBDc9QNoRPQ0Cr AMGUQxSCCaagQqYpnTzurzo3bEYvDmkOxeqBh2jVkOzITP/9U/EIAA7pmXPJ2uQbPT 1ml0UXYb5/s7ZdVrMsmlsPCj5G9/7MP9Gq6blwPIhIC+JV5o3ziGW9j6Q2Tg14Jitv QzhiPWCSjlGKq7oUO7UxI/VtrEr6V5GFWZf0dRk90aWzSi7tMkfROxmjeiybrI+6HO lBETbgyVLF4PvUFcsxXqDE5LJ/qpkEgn5PsTsA19/9azcBlaRy1lwHVvQmTFDbQ3Cl 4wjr2NZlPpKrg== Date: Thu, 10 Aug 2023 08:07:06 -0700 From: Nathan Chancellor To: Borislav Petkov Cc: x86@kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: Hang when booting guest kernels compiled with clang after SRSO mitigations Message-ID: <20230810150706.GA42856@dev-arch.thelio-3990X> References: <20230810013334.GA5354@dev-arch.thelio-3990X> <20230810081038.GAZNSbftb6DOgg/U7e@fat_crate.local> <20230810090835.GBZNSpE6tCw+Ci+9yh@fat_crate.local> <20230810101649.GA1795474@dev-arch.thelio-3990X> <20230810125122.GIZNTdSuFvA3Cjfexq@fat_crate.local> <20230810132706.GA3805855@dev-arch.thelio-3990X> <20230810133216.GKZNTm4KpohRR4gVsT@fat_crate.local> <20230810134056.GA130730@dev-arch.thelio-3990X> <20230810144344.GLZNT3oM6MLVdzGlyd@fat_crate.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230810144344.GLZNT3oM6MLVdzGlyd@fat_crate.local> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Thu, Aug 10, 2023 at 04:43:44PM +0200, Borislav Petkov wrote: > On Thu, Aug 10, 2023 at 06:40:56AM -0700, Nathan Chancellor wrote: > Linux version 6.5.0-rc5+ (root@vh) (gcc (Debian 10.2.1-3) 10.2.1 20201224, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Thu Aug 10 16:13:54 CEST 2023 > > ... > > [ 0.083541] Speculative Return Stack Overflow: Mitigation: safe RET I just tried Linux version 6.5.0-rc5-00039-g138bcddb86d8 (nathan@dev-arch.thelio-3990X) (x86_64-linux-gcc (GCC) 10.4.0, GNU ld (GNU Binutils) 2.39) #1 SMP PREEMPT_DYNAMIC Thu Aug 10 07:48:28 MST 2023 [ 0.000259] Speculative Return Stack Overflow: Mitigation: safe RET on the host... > [ 0.000000] Linux version 6.5.0-rc5 (root@vh) (Debian clang version 14.0.6, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Thu Aug 10 13:22:30 CEST 2023 with [ 0.000000] Linux version 6.5.0-rc5 (nathan@distrobox-6Sw1jticKJ.thelio-3990X) (Debian clang version 14.0.6, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Thu Aug 10 07:58:56 MST 2023 in the guest and I see the same problem. > Guest and host are up and running. > > There's something else missing. Configuration difference? Here is the one from the most recent build: https://gist.github.com/nathanchance/2d7ad0b9440a6a2ec5ba0b88e3e673a9 Is there any other information that could be relevant here? My microcode version according to dmesg, in case that matters. [ 2.408527] microcode: microcode updated early to new patch_level=0x0830107a Is that machine Zen 2? I see this issue on my Ryzen 3 4300G as well, which is also Zen 2. > Your host gcc is 13, maybe I should update... Seems like I can reproduce it with earlier versions of GCC (and I could reproduce it with clang) so it does not seem like it is toolchain related on the host side but might be interesting to test. I just use https://mirrors.edge.kernel.org/pub/tools/crosstool/ for easy access to multiple versions. Cheers, Nathan