From patchwork Fri Sep 6 16:09:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Cabaj X-Patchwork-Id: 1981973 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 4X0h534McRz1y1H for ; Sat, 7 Sep 2024 02:09: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 1smbWf-0004I0-Of; Fri, 06 Sep 2024 16:09: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 1smbWe-0004He-2J for kernel-team@lists.ubuntu.com; Fri, 06 Sep 2024 16:09:32 +0000 Received: from mail-io1-f71.google.com (mail-io1-f71.google.com [209.85.166.71]) (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 B60663F322 for ; Fri, 6 Sep 2024 16:09:31 +0000 (UTC) Received: by mail-io1-f71.google.com with SMTP id ca18e2360f4ac-82a206312eeso513619239f.1 for ; Fri, 06 Sep 2024 09:09:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725638970; x=1726243770; 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=dtVmGHHHylmadwGOSQjw6uf1tAtwasB3G7JHBUnGiW6Q01L7FLmJcFAF0TkQsy4Eks bo+Om6lSlIgN5atudbW0YKgccHmiVhaQEFOYo9SzSshe1DgrSHXaRIB3c0Jdej3PZgRW 106u2b4zxJ9uQlwyEoox2x3fP5PUXy31X741sKS6KtzUt4wZF/LXFUb+Z9pEHIibWQlu wmV2nh5LLZZ9fWM95hzaJ1IgFpa0HbBfArx38jln8cVwq4Ey01GyWmyz3IxPCCITbDjY oPf+3xIB5L0KobZf0kZw8N5x0uXCo31H/3dRPf0nkyVQ+fg44iOlQHk6bFbt1X2ScISI jiwA== X-Gm-Message-State: AOJu0Yzf5c+imOs20z01PmAtkKu7q5lrmApRr7tm8mTwl/YekNcIMBqP HJPXRZ+ZlydgOs/ga+kQr5uMsjrtW89QCrBJzUslgqMdv25FCqhGvAxVV28HUYVP3bRKNhMGOvK KCMrje1NnxacKjsJkta3Cow78CSZ36eeTq/QwqrDY0pFaGNLxBl0FmXoLeFoVh/SS/F76o61ZiV qgX8JpPmcitg== X-Received: by 2002:a05:6602:6c0a:b0:7fa:4e03:abcd with SMTP id ca18e2360f4ac-82a962319dfmr465729239f.14.1725638970284; Fri, 06 Sep 2024 09:09:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFeuxBiqZ+0OcuZWDjS38nWjqy8FyYwQScgI6iTzH1gOK5aH/S/JnIqriE2ZCUDcfKseeyEOQ== X-Received: by 2002:a05:6602:6c0a:b0:7fa:4e03:abcd with SMTP id ca18e2360f4ac-82a962319dfmr465722239f.14.1725638969645; Fri, 06 Sep 2024 09:09: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-4d08ac35407sm222274173.30.2024.09.06.09.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 09:09:29 -0700 (PDT) From: John Cabaj To: kernel-team@lists.ubuntu.com Subject: [SRU][o/n:linux-azure][PATCH 1/1] Revert "UBUNTU: SAUCE: x86/hyperv: temporarily disable CET SS on SEV-SNP due to a paravisor bug" Date: Fri, 6 Sep 2024 11:09:22 -0500 Message-ID: <20240906160926.750390-2-john.cabaj@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240906160926.750390-1-john.cabaj@canonical.com> References: <20240906160926.750390-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(); }