Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp263670pxx; Thu, 29 Oct 2020 01:55:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXX1M/KLrfPMfnlUebD1s2LUzYMAk3J2iWUSnkwx3BFhHKElkqql9jQBRl+fc20MG5gVUN X-Received: by 2002:a17:906:fb86:: with SMTP id lr6mr2965783ejb.510.1603961724130; Thu, 29 Oct 2020 01:55:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603961724; cv=none; d=google.com; s=arc-20160816; b=fFLjq9I8mW8Z96626h8X8uxVR1NEK3FgBW1mzdVLOqJsHRx5+Q6QsFjDXEFoh7mtXk +PSsSO0SWmJnzJLSmnH8YSgVsaRjqbkfBplawbttk5OLbHGIGPzxlvtSKePQTHhgAcpK XNqcIsCg1FA6racUSdBblm4AWgaVFrPbvbAAWWfNFQRV6A9k8+0osy75ypAeBIQshgYG D5Wb860VEzxobezJETrxE7qInquP0zXUTTXKQQ/3MM1B+/BMZ1EkU97MpgC8c132YUp0 LQLazAuPMdXKIqoDAwyl+eoKIC55N9sDCHJirQb96E2CooTe8qei/sr1sKvac+/Wsb7t 7UrQ== 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=BYfD5IrwTFjHGqIBMmi1X0ZanerIo/9ZT/0F9fypW3o=; b=C+LJN249yA/BbE5YC0SBRzNR6m/e1Ket0RUjRdMcJCeE9H0Rwp1r/DPQAozTwws8LY Y5BhoAxxR7FGpjP/3K76rZIeAD0CaLmep5oEn6AH6dotWADUsGYRZhd47YkphFLkVeZe OUHJyxOde9wsoS4Kr/0C1jd9gBuh0DSP5Lq15paSnhn4fH4FggUUajoL63m7O3aB+PV9 FRI9s+TU8XmNrZbxyWE46nEyZ172NhliR1LXlcGDvO35LKnM2Cawvk6IoFn6dwNL8sUJ +e8DEyoppriIrmF4i/1gQhAZE/q2iTlkY1byXb2gk2rnNmOUmeCrwJsqk/im5eDdyjGa 6DqA== 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 oi22si1537016ejb.754.2020.10.29.01.55.02; Thu, 29 Oct 2020 01:55:24 -0700 (PDT) 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 S1727486AbgJ2CMN (ORCPT + 99 others); Wed, 28 Oct 2020 22:12:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726817AbgJ1Vg1 (ORCPT ); Wed, 28 Oct 2020 17:36:27 -0400 Received: from theia.8bytes.org (8bytes.org [IPv6:2a01:238:4383:600:38bc:a715:4b6d:a889]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 940CBC0613D5 for ; Wed, 28 Oct 2020 14:36:27 -0700 (PDT) Received: by theia.8bytes.org (Postfix, from userid 1000) id 471CE4C4; Wed, 28 Oct 2020 09:38:21 +0100 (CET) Date: Wed, 28 Oct 2020 09:38:19 +0100 From: Joerg Roedel To: Borislav Petkov Cc: x86@kernel.org, Joerg Roedel , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Kees Cook , Arvind Sankar , Martin Radev , Tom Lendacky , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 3/5] x86/boot/compressed/64: Check SEV encryption in 64-bit boot-path Message-ID: <20201028083819.GC18723@8bytes.org> References: <20201021123938.3696-1-joro@8bytes.org> <20201021123938.3696-4-joro@8bytes.org> <20201027110812.GC15580@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201027110812.GC15580@zn.tnic> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 27, 2020 at 12:08:12PM +0100, Borislav Petkov wrote: > On Wed, Oct 21, 2020 at 02:39:36PM +0200, Joerg Roedel wrote: > > diff --git a/arch/x86/kernel/sev_verify_cbit.S b/arch/x86/kernel/sev_verify_cbit.S > > new file mode 100644 > > index 000000000000..5075458ecad0 > > --- /dev/null > > +++ b/arch/x86/kernel/sev_verify_cbit.S > > Why a separate file? You're using it just like verify_cpu.S and this is > kinda verifying CPU so you could simply add the functionality there... verify_cpu.S is also used on 32bit and this function is 64bit code. It can be made working with some #ifdef'fery but I think it is cleaner to just keep it in a separate file, also given that sev_verify_cbit() is not needed at every place verify_cpu() is called. > Yeah, can you please use the callee-clobbered registers in the order as > they're used by the ABI, see arch/x86/entry/calling.h. > > Because I'm looking at this and wondering are rsi, rdx and rcx somehow > live here and you're avoiding them... Makes sense, will update the function. Regards, Joerg