Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2424371pxb; Tue, 9 Mar 2021 02:06:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJyncQWXRHuzShWVWG69Y+smJkiqifewFSpZ9moXJ0oDUmV1Qn+8I9pfaH576gaiyDTwji48 X-Received: by 2002:a17:906:c0c8:: with SMTP id bn8mr6290312ejb.445.1615284389233; Tue, 09 Mar 2021 02:06:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615284389; cv=none; d=google.com; s=arc-20160816; b=cAllgaZ+0jo7ecF0sOftQ8+HR++X5Ok3oXBIclPuAzj1En+WmYVzpFDis2JfkDyqYC lWKFQUwy+Hvh5q9KxBEgJGLMG3ybRZynMnss7jIayXcDSMOWGGVdmATsfk1ElVTWD1WK b/AnNtio24mQ+02OK/hrVGiCV2yxIKM/aDpvXKDuA0XV/9gc2jfohXzcHSLJtzywoHpN WJsogHEs+V/4Q4Eeg+AWRpRW2jULK5MmENCeNvNmvNHOa7uxObReAbIvLJNfSbEgDKe4 XHrvFExdBssoP3z+W7CAxZU2nJ/7tUQJNzBnJ9eKMcsyP/TZeMEUH7OqgW8REpcJEfHH Lxmw== 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; bh=b4Z+uew9zPaydbn9Oc/KaFsfCuKZqeRzmLs4reLTy1A=; b=YemfuiPlnOnuCFYoMxOxcHmJIaZVAPWPKQyO6asmCLsv+jO9cUB1AlmEj5oBBR88RI ixb+/B259JwIMhmtae/Of1g0W36vPQl2qYtPa8UAWKIkLn7BANH0/fBhe94qujMg5Mpn TFhese1hDEV2i8cLEfYnKrHa5CkBp2txplqkhFQymsoxmgY8ZfKPfrDib8H+ONDKcLzN cwfi4BYhCWoy81TRIkZMNrw7JwXDGo1Q8nuiKcJKkqiUb4kkjFllsevLEfUrLxAeHQhK c7h5qeSxvLo+NsDmkJTOIgZO95B68QgQrpUiCC0l82MUOhP79028kn2/ELJbLR77T2sU YBQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n5si8651796eji.285.2021.03.09.02.06.06; Tue, 09 Mar 2021 02:06:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229875AbhCIKC7 (ORCPT + 99 others); Tue, 9 Mar 2021 05:02:59 -0500 Received: from 8bytes.org ([81.169.241.247]:58086 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbhCIKCl (ORCPT ); Tue, 9 Mar 2021 05:02:41 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id B07012E2; Tue, 9 Mar 2021 11:02:39 +0100 (CET) Date: Tue, 9 Mar 2021 11:02:36 +0100 From: Joerg Roedel To: Borislav Petkov Cc: x86@kernel.org, Joerg Roedel , hpa@zytor.com, Andy Lutomirski , Dave Hansen , Peter Zijlstra , Jiri Slaby , Dan Williams , Tom Lendacky , Juergen Gross , Kees Cook , David Rientjes , Cfir Cohen , Erdem Aktas , Masami Hiramatsu , Mike Stunes , Sean Christopherson , Martin Radev , Arvind Sankar , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH 6/7] x86/boot/compressed/64: Check SEV encryption in 32-bit boot-path Message-ID: References: <20210210102135.30667-1-joro@8bytes.org> <20210210102135.30667-7-joro@8bytes.org> <20210302194353.GH15469@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210302194353.GH15469@zn.tnic> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 02, 2021 at 08:43:53PM +0100, Borislav Petkov wrote: > On Wed, Feb 10, 2021 at 11:21:34AM +0100, Joerg Roedel wrote: > > + /* > > + * Store the sme_me_mask as an indicator that SEV is active. It will be > > + * set again in startup_64(). > > So why bother? Or does something needs it before that? This was actually a bug. The startup32_check_sev_cbit() needs something to skip the check when SEV is not active. Therefore the value is set here in sme_me_mask, but the function later checks sev_status. I fixed it by setting sev_status to 1 here (indicates SEV is active). Regards, Joerg