Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp952693rwe; Wed, 24 Aug 2022 11:57:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR6zKP8gsxLZEzv9aVsP5/kymW0wCojGPVfJEjYFJo3rYNFk/jhnel6R2cAs2PvanRlJdpJr X-Received: by 2002:a17:907:6eaa:b0:73d:81db:64d0 with SMTP id sh42-20020a1709076eaa00b0073d81db64d0mr216518ejc.334.1661367479301; Wed, 24 Aug 2022 11:57:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661367479; cv=none; d=google.com; s=arc-20160816; b=BBKQJa7a6afyIVz3uCqG0K7NmYVwap11lheHp/z32LJXHt3msjeIMiryifsErtMwk1 dbXOShR9Ou/Kgo2PDAOLqOSYfkS3sl+K7w/4P2WVIji7zaDFGWDEv7UuI22MHUeVWQ9v PgsKT6YHFHLBth59waKij3R9s3jiPwpm+AejCwkTlqtCtQuDR7Az+05xZfZ0ALAXs9in Vyhoi2BfVYfWgmUf5UmkG5pAsjuqyy2qwWRCtXyBYt2jvtQuJBpHRuZ2EEl7EhhGHF1o F9LOSeCOyvXLGtXeEeobYJ6jPTJVwQrJ6gqrDUsAce/D632w0Ae91BWKFlgu96YzXtpz Woxg== 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=WK0v1hXG889a9fqR0dwBxVsBZk9FUHaTtJZfPydUhIc=; b=gRGkTV7NOwxEb/XGJtiWn0OmKG1iIwm6Vvg4SM8O9WQoLvHDurc8V0ioU1Y3AU2Tlp fUQhQjLznv2kL6oLqBQ36sSJJ/lrmHjHgVZdX3vQ/HIs99vwR6xvi56I0Tlfm6spZFWd mExhDOXeMAS7FGvt4L4nhOwqizb16OPzs0XUCmeE4R0qP2L65WC7MB/v/VMJFWeBDJaC rveEsr/tu26BQNAYcvLGfrGlmGqsL/mN57qDzSmEN4POjVjBcY00UA67lauy+n7JF+K7 J6aD07SiYuiFw/ItnDYm5jLE5+ycX7L5tzurpvcGhF+T6IbPwNHYdGGnuakYKwL/G48o QypA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=pqc6eljU; 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 l17-20020a056402255100b0043df9ca3ff8si5647172edb.50.2022.08.24.11.57.33; Wed, 24 Aug 2022 11:57:59 -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=dkim header.b=pqc6eljU; 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 S239880AbiHXSs4 (ORCPT + 99 others); Wed, 24 Aug 2022 14:48:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235430AbiHXSsy (ORCPT ); Wed, 24 Aug 2022 14:48:54 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98C5D7AC29; Wed, 24 Aug 2022 11:48:53 -0700 (PDT) Received: from zn.tnic (p200300ea971b9859329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971b:9859:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 1F7DD1EC0589; Wed, 24 Aug 2022 20:48:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1661366928; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=WK0v1hXG889a9fqR0dwBxVsBZk9FUHaTtJZfPydUhIc=; b=pqc6eljUoZBxhlQgJ2cDUW+RwMQZhRdZ1mo8y3pqZKKKvvGBXhK38x2By3ZTBXhsRdXiJl yZY8O9TbYmwKKqC2xzAFirjjOaUzktvF15qckD8yWgmTXaaHBH58L/aBc/rhFzLLqc29PT yp+B98UZgihGoEdu8p8pRdaIJaZvcx0= Date: Wed, 24 Aug 2022 20:48:44 +0200 From: Borislav Petkov To: Dave Hansen Cc: Tom Lendacky , linux-kernel@vger.kernel.org, x86@kernel.org, Thomas Gleixner , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Asish Kalra , Michael Roth , Joerg Roedel , "Kirill A. Shutemov" , stable@vger.kernel.org, Sean Christopherson Subject: Re: [PATCH] x86/sev: Don't use cc_platform_has() for early SEV-SNP calls Message-ID: References: <0c9b9a6c33ff4b8ce17a87a6c09db44d3b52bad3.1661291751.git.thomas.lendacky@amd.com> <10bc452f-3564-e41b-836d-e135a8f4260d@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <10bc452f-3564-e41b-836d-e135a8f4260d@intel.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Wed, Aug 24, 2022 at 11:43:10AM -0700, Dave Hansen wrote: > So, we don't have *ANY* control over where the compiler uses jump > tables. The kernel just happened to add some code that uses them, fell > over, and this adds a hack to get booting again. > > Isn't this a bigger problem? I had the same question already. Was thinking of maybe disabling the compiler from producing jump tables in the ident-mapped code. Tom's argument is that that might prevent the compiler from doing optimizations but I haven't talked to compiler folks whether those optimizations are even worth the effort. Regardless, the potential problem is limited: "# (jump-tables are implicitly disabled by RETPOLINE)" i.e., only RETPOLINE=n builds for now which should be a minority? I guess when this explodes somewhere else again, we will have to generalize a fix. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette