Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1093546rwl; Thu, 10 Aug 2023 06:26:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFN/rhmB47AdiYS9wiwo/ZcdHeoZKfETCJArz85X2XZdGg4gCcbYMCzvg4ekOrzAIAcqOl7 X-Received: by 2002:a17:906:304e:b0:99b:d4f5:a518 with SMTP id d14-20020a170906304e00b0099bd4f5a518mr2160844ejd.13.1691674006589; Thu, 10 Aug 2023 06:26:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691674006; cv=none; d=google.com; s=arc-20160816; b=E/16mAgDlTB17MuuijlpxxFaXDWceF73sOkmV2P5r+g2lyF0ogFZ9rKWYQ9ROyk73L 2p6dufLuUmcU8YBihbX0cKyB3P5MFsUs6ZzMt2CmcSaIb4srUviGoqemfgznDaKgO6L/ K2fuuUdmWolpMPwC6zYyC52E5YZwSpRSMzkVA9F4APqiYiPG8mjTdD/iVm4nQlhvH1rr ipfuSQ4ax/eSnwsV+ynbRgZqJSnv7gB4mUMHIsa9/YsDJCCYf0oQueTpfValXa49n8iO xWm89Wl9nqhcYsgzyNX5GNerJtoQyMfBSEzQ/aiOCyXVKNFtMxbxHduok8xF6yu90W9U 90VQ== 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=E7oT9arX/kjdLffGRAnKE53sSXpKCypTPGvWWboVfMg=; fh=t4sShX7IwO9kl1mRuKQdOUjW81gEWUOqhUM7Gt25iYw=; b=pdsVpTbGYLS6Fbhzp0OZ3l9ZOD/dgjmx5+PvoEq4ViQq90QBnQu+yHwYJn0XcEyK32 ze5btO7DSGH0vroWmigAvspd7GizlY8YTkLYKjfdcovfCldm9vb5Hz19u8QXrqzi9fkw jtfnaMuQ2LN7hCLPFrBBRciTIQ3S4Y976gxb79QkVAGm5uyYMb6KMKBpSACcGOYX9yt0 TfnspADCf8j2FBdlRdihlptJlMBIE6GXMYIzoG+rhMvRrNqFAEjBG5n/HFU+K5L4hGrP zch51olzDqDKmIkX9NM4dyXC+PHZfIWVRd1V80aC5zyX0eVVF++tQB+XwBpP+sr8x3/Z QHNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=alien8 header.b=Vqcufvc4; 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=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lm21-20020a170906981500b00992acfe04b8si1628179ejb.150.2023.08.10.06.26.21; Thu, 10 Aug 2023 06:26:46 -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=@alien8.de header.s=alien8 header.b=Vqcufvc4; 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=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235240AbjHJMvh (ORCPT + 99 others); Thu, 10 Aug 2023 08:51:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235080AbjHJMvg (ORCPT ); Thu, 10 Aug 2023 08:51:36 -0400 Received: from mail.alien8.de (mail.alien8.de [IPv6:2a01:4f9:3051:3f93::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE083C5 for ; Thu, 10 Aug 2023 05:51:35 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id 47D2B40E01A0; Thu, 10 Aug 2023 12:51:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Ea89pFpdl3we; Thu, 10 Aug 2023 12:51:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1691671892; bh=E7oT9arX/kjdLffGRAnKE53sSXpKCypTPGvWWboVfMg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Vqcufvc4wgeA2lN5TDP/YKIIDg8piONGBF1kQ+2xcl/wPnrRt6Z7xs9G7iMAK1Zeb 6BuoEM4Dv8Ks3M/7/UayY3IqCs4jpBMPcLlnra+Tjg+jzW0c5VOwskf5C70VdlDeFd MRXMsTSaG2zbcfAXFa/hu308PbrWZ2OL45OIUMBofA7/Tra/ClvXYX08QUd2j7ybHQ zdQh+6KSYybH63gRSCz1YalB+Ecq8ZcxN1OpaLjMZ7HwJf6o2IhDvXXLp/WhBWAos2 FHRT5ELJ0a2jB9bQqyGJaFaeXmrCFdLqwO/p2P3odw9mrKflKtAFfDsFskk/1MU27F Y4mukUKJWZkQMBGWMmdUWdr0aGdVtXsHRwCdfosf5rdZK77OcnX4IOrUlDaXiw66jG WmPkP2f//lZkhrJL19ASmuLITi3KFm5ELIcaEwL+LOV25HNQLdKOodZFFhwElBY3Ae i25qOqcAoLECTNmCF+fFpO6XIWmcRxlT6MwWFO8kotEdJA61UrMsUIEDtOzn+HBacG M1VSoc8pZNpyWPjyTj5Hu1P3rQ8ieu64++LKz93k1HKASoJKkv8yuCyxcNEUcxmN+x WLhsCGBcthyOkIMKX3WXHEPgcs4sa1FOMe+B37Ta3fDFBySkUijo1WPyJPKK5hbdwO nSqXyN0VYHGX23tHSo/iGTPk= Received: from zn.tnic (pd9530d32.dip0.t-ipconnect.de [217.83.13.50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id DD2E840E0185; Thu, 10 Aug 2023 12:51:27 +0000 (UTC) Date: Thu, 10 Aug 2023 14:51:22 +0200 From: Borislav Petkov To: Nathan Chancellor 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: <20230810125122.GIZNTdSuFvA3Cjfexq@fat_crate.local> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230810101649.GA1795474@dev-arch.thelio-3990X> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, 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 03:16:49AM -0700, Nathan Chancellor wrote: > Just to clarify, this is the guest kernel at -rc5 and the host kernel > with the SRSO mitigations applied? If so, that's the problem. The guest > kernel does not have to have the SRSO mitigations applied to see this > problem. Sorry I should have made that more clear! If not though, that's > interesting because I was running -rc5 on the host without issues. Well, how do you even build CPU_SRSO with clang? config CPU_SRSO bool "Mitigate speculative RAS overflow on AMD" depends on CPU_SUP_AMD && X86_64 && RETHUNK ^^^^^^^ config RETHUNK bool "Enable return-thunks" depends on RETPOLINE && CC_HAS_RETURN_THUNK ^^^^^^^^^^^^^^^^^^^ config CC_HAS_RETURN_THUNK def_bool $(cc-option,-mfunction-return=thunk-extern) $ clang -mfunction-return=thunk-extern clang: error: unknown argument: '-mfunction-return=thunk-extern' clang: error: no input files $ clang --version Debian clang version 14.0.6 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin Hmmm. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette