From patchwork Fri Sep 6 17:43:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Cabaj X-Patchwork-Id: 1981998 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X0k9T4htnz1y1D for ; Sat, 7 Sep 2024 03:43:41 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1smczd-0005kr-1w; Fri, 06 Sep 2024 17:43:33 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1smcza-0005kC-1b for kernel-team@lists.ubuntu.com; Fri, 06 Sep 2024 17:43:30 +0000 Received: from mail-io1-f69.google.com (mail-io1-f69.google.com [209.85.166.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id DE0A43F322 for ; Fri, 6 Sep 2024 17:43:29 +0000 (UTC) Received: by mail-io1-f69.google.com with SMTP id ca18e2360f4ac-82a319f6520so546410739f.3 for ; Fri, 06 Sep 2024 10:43:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725644609; x=1726249409; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LSosY2M6pymEFuVVVEFw56fmRe/8zwksSm1WOiDMMks=; b=ZjLIQB1tgkVpWZKmfJXsCPGjB2WE8IpBwFVEApYsLIOq9RYr36bUzA7p+iZtF4anTN cadrzL/IHJurvgmjhA/Ao3YacMqvc0O0JqMlwwnTp00LvlWmdQnqNL9prMjP8sCZLfTA V3cl4KuwVSQsvW9lB4GRHH2VQRGfM2g7skhm05V8B7j3CIfp82f5N2oa/GkF+kwWoWl3 KUiR4/FqGCwjRDQdr1aSM1X0JL3V21o+L/VtQiBJKw4fmGTx8x3wMQET06Dxyv9WvHjl +ILejJwdpsReIvz3X+FzJix5Cna0QI49PqGSS0mLisY2Goh7QcjtouynpKpUgpnMAOwY +GXQ== X-Gm-Message-State: AOJu0YyuIynYwrTX7njMlLm4hhwjlYW6KLoTSSWjZmCjcvdQyiMKFbTr Ocp2PmOs4UXYzDiIc/Tb7D4Eczn/TvrHghp2jKcromLSSWfRZGVOH1yYyqIIirT1lSq2oDtAHDZ YUncJOFesPYWwCHHh588nXNM2/8L+mcb2F9EJN4m0A5zLyYPJ1C+j3mUooipqqeutsGTRdk6tsD 8YeqXWeAV0xA== X-Received: by 2002:a05:6602:6209:b0:82a:49ed:cad5 with SMTP id ca18e2360f4ac-82a9617381bmr404062739f.3.1725644608704; Fri, 06 Sep 2024 10:43:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGcHIw0978rLgQVDtanY1j4iKoJ9JrmDJUqLSr0Ccz1KUfQhlniHSsDgzizkQAPWIhMnmZ7Zg== X-Received: by 2002:a05:6602:6209:b0:82a:49ed:cad5 with SMTP id ca18e2360f4ac-82a9617381bmr404060939f.3.1725644608388; Fri, 06 Sep 2024 10:43:28 -0700 (PDT) Received: from smtp.gmail.com (h208-73-92-250.mdtnwi.broadband.dynamic.tds.net. [208.73.92.250]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4d083846631sm524731173.85.2024.09.06.10.43.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 10:43:28 -0700 (PDT) From: John Cabaj To: kernel-team@lists.ubuntu.com Subject: [SRU][noble:linux-azure][PATCH 1/1 v2] Revert "UBUNTU: SAUCE: x86/hyperv: temporarily disable CET SS on SEV-SNP due to a paravisor bug" Date: Fri, 6 Sep 2024 12:43:24 -0500 Message-ID: <20240906174326.773072-2-john.cabaj@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240906174326.773072-1-john.cabaj@canonical.com> References: <20240906174326.773072-1-john.cabaj@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2079841 This reverts commit 8ce273422c040ec77c8bfa58c7d7dbbb570710d0. Signed-off-by: John Cabaj --- arch/x86/kernel/cpu/mshyperv.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index c9dee20fa8a9..82a356fbde4e 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c @@ -581,27 +581,6 @@ static void __init ms_hyperv_init_platform(void) if (!(ms_hyperv.features & HV_ACCESS_TSC_INVARIANT)) mark_tsc_unstable("running on Hyper-V"); - /* - * Mask CET Shadow Stack on SEV-SNP due to a CPUID emulation bug in - * the paravisor on old Azure SEV-SNP hosts, e.g., 10.0.20348.2867-2-0. - * Due to the bug, paranoid_xstate_size_valid() in a v6.6 or newer - * kernel prints a warning "XSAVE consistency problem: size 848 != kernel_size 832" - * and the kernel disables XSAVE completely; the early 'init' program or - * any later program may get core-dumped due to "invalid opcode", if - * they assume XSAVE is available (e.g., it looks like - * libgnutls.so.30.27.0 tries to unconditionally use XSAVE. - * - * Note: the SNP paravisor bug only affects a v6.6+ Linux kernel - * (CET Shadow Stack is firstly enabled in v6.6) when the VM is a "v5" - * SNP VM on Azure. A "v6" SNP VM is not affected, and a TDX VM is also - * not affectd since the versions of paravisor for them are already - * fixed. The fix for the "v5" VMs would roll out around September or - * October, 2024. - */ - if (ms_hyperv.paravisor_present && - hv_get_isolation_type() == HV_ISOLATION_TYPE_SNP) - setup_clear_cpu_cap(X86_FEATURE_SHSTK); - hardlockup_detector_disable(); }