From patchwork Fri Sep 6 17:43:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Cabaj X-Patchwork-Id: 1981999 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 4X0k9V2tnTz1y1K for ; Sat, 7 Sep 2024 03:43:42 +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-0005lP-Ln; 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 1smczb-0005kK-7D for kernel-team@lists.ubuntu.com; Fri, 06 Sep 2024 17:43:31 +0000 Received: from mail-io1-f70.google.com (mail-io1-f70.google.com [209.85.166.70]) (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 BEB693F0F8 for ; Fri, 6 Sep 2024 17:43:30 +0000 (UTC) Received: by mail-io1-f70.google.com with SMTP id ca18e2360f4ac-82a13f69336so571899139f.0 for ; Fri, 06 Sep 2024 10:43:30 -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=JBMA2pNm06SPRe1+4MrkT+5rgr3O8FikjTFLNRb2mK0=; b=mzZGGAmPaAYasLFl5/S5alage8OitFteFMJjYbYt7QU2KCceaIAaHQLW4zA9uHWxDE YdKFCLLWxm4LM8TjGZ62zjJC20/bYzO/caYnIWqEokLFQ5/+pLm2niHaCuQVbLz/HBcL +Q+g9PRLNq4F11wZT7JUmQqVdVfth/LhJkxj4aqc4xpFAxRffpU82uS96XGvIjSYhbsu 0fBtg27qNO2BDtu1BLFgkw8PaSbBYsMsQdDqQuWYRTiLxwEjMyIp5hGdIvj8wjdP1Mb7 f4E8lJuookIjLPRGa4LJHf7zKuggRTFxgPN/LW5rH4LP2jG1KyuigFCMjfLMVZTXRugK pkgA== X-Gm-Message-State: AOJu0Yzv2UASaRnNfo7rKFVEO4IuBsuaoGAcGMksztNGCQv5TsGRMDWk hCUGbUy21NeWM+IEBi3aqZb44bh/4Z0dW4QUadtuJx3N8pvLzJ+nL/ax2QRq6LrcbkG3O9A3zND S0hewLtoQG6QJhalKoNxkFnAKUpN5+w7Q6iW48FPnJCKFE9LVKz3drzbb1SK2CHlSYWXJjri7rQ HyxacPX/hrUQ== X-Received: by 2002:a05:6602:29c5:b0:826:29d0:a16e with SMTP id ca18e2360f4ac-82a96224f8emr391706339f.13.1725644609581; Fri, 06 Sep 2024 10:43:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF7wfz7Vw3UVwfMaRQDBhAervCRD1sIMVEd3u7aEgQXAU8tL4/j6qPagQTecYF2miSqAkX5ng== X-Received: by 2002:a05:6602:29c5:b0:826:29d0:a16e with SMTP id ca18e2360f4ac-82a96224f8emr391703639f.13.1725644609233; Fri, 06 Sep 2024 10:43:29 -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.28 (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][oracular: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:25 -0500 Message-ID: <20240906174326.773072-3-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 29fa1211e69aa9a21be5517e795b99156a4df78e. 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(); }