Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp292417pxb; Thu, 31 Mar 2022 05:42:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeRBcUsE30s3hhrCrVbHAjukVxBmXr5qdYnxMN1WkSU3Kg8ggGcJX4zKqHfAKe4WSsnitZ X-Received: by 2002:a63:788f:0:b0:386:3116:818c with SMTP id t137-20020a63788f000000b003863116818cmr10419192pgc.414.1648730571085; Thu, 31 Mar 2022 05:42:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648730571; cv=none; d=google.com; s=arc-20160816; b=jlkHURbP/94pJV4qfwKVCTtBbTRRw3ZKGMyX4GtZ09Lf7Uswu3qJga8HY6CAu6kLNs s8qQmO7xiIDdsBbp3I2MksY/Gfg74rBXGDEKL/3PBWAuAAOhicg2Yh2Q9BK7To7NZqu7 QK5tUEeuL51ZLu1+qJR5N7KY4f14TDZF8MGvVKe5bvF/7M8xQJx50dOn9XxKmu/Mhetc MDEWsM7lfV1PbQD6kF5vqccAZPisA0r6pMx+0ouyWD049EXVNNhBjsvDMXdLFNumUsNB ux4BKH6M0ZeaEssQJNvR+G6iPd53s+2JLBzD+PB7+naYq558l/91zIlJes102W8QklFj GCng== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=FVX7m8PokvejVbBT0wLGG/0fZjizACNdSaleDzg4mLk=; b=lRoItWTu0heiJtdDSI30kFvW+aY56ZNSDQ1L7lyJzfdjlqOhJNNgznc016q9n9MWpa ccp8Rg317riY/RMt9I7rmzEDZH2yQc78CYxOJ9WGNniy0AGsLuGGcdCww8zRvpkxgpLt twEX4bCs6EeXKu79Mn214y2KUkZYtgp+6wbecG3uAOabIn5Lm3j0yIZU9mgtw41RcK9n Q/Hd4KF9s2ru/r0c2+1GuoziYk1pPEH7zx7ynhM/FgUfr79Z4ymmWI1UWOS4PC9s06jr 2Cnl0Z7bQM5/YeYBfr4Jcez/t/yh2FE1e+VP2JVziATKyD6wkOoi/zaI5QvHoteBHfIL +bVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="ei/Fg2tH"; dkim=neutral (no key) header.i=@suse.de header.b=X2DWzkLo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a17090a800300b001bf0a6e46bfsi2826947pjn.144.2022.03.31.05.42.37; Thu, 31 Mar 2022 05:42:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="ei/Fg2tH"; dkim=neutral (no key) header.i=@suse.de header.b=X2DWzkLo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233729AbiCaJVX (ORCPT + 99 others); Thu, 31 Mar 2022 05:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231474AbiCaJVR (ORCPT ); Thu, 31 Mar 2022 05:21:17 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A95F1C3D; Thu, 31 Mar 2022 02:19:29 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 62ACD1FD05; Thu, 31 Mar 2022 09:19:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1648718368; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FVX7m8PokvejVbBT0wLGG/0fZjizACNdSaleDzg4mLk=; b=ei/Fg2tHarGnz8vJ7LMsRcqmb1ymtDqtC7cpjuqou8aiuSePhoVQGesh7C1c6/GHS7BhN0 aPRyDcT8CEUEquymJMPawOmtWBZPXITHFp/G2mOotI8QY0+mYwHNb7eIdGjI4fZWDJV5s0 l3srqBu4LAWrNCvljhyakT2xet4OFMM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1648718368; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FVX7m8PokvejVbBT0wLGG/0fZjizACNdSaleDzg4mLk=; b=X2DWzkLocSFsEb28/cz5K8Wg9TzmTAXV0qX6aEgyDZJ+/+XZVK21/3KCewo4TMnxWBwmP0 Y5MU7MxMpF77vBBA== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 51D33132DC; Thu, 31 Mar 2022 09:19:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ChPuEyByRWK9NgAAMHmgww (envelope-from ); Thu, 31 Mar 2022 09:19:28 +0000 Date: Thu, 31 Mar 2022 11:19:28 +0200 From: Borislav Petkov To: Dov Murik Cc: linux-efi@vger.kernel.org, Ashish Kalra , Brijesh Singh , Tom Lendacky , Ard Biesheuvel , James Morris , "Serge E. Hallyn" , Andi Kleen , Greg KH , Andrew Scull , Dave Hansen , "Dr. David Alan Gilbert" , Gerd Hoffmann , Lenny Szubowicz , Peter Gonda , Matthew Garrett , James Bottomley , Tobin Feldman-Fitzthum , Jim Cadden , Daniele Buono , linux-coco@lists.linux.dev, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 0/4] Allow guest access to EFI confidential computing secret area Message-ID: References: <20220228114254.1099945-1-dovmurik@linux.ibm.com> <7696ba46-91c7-7119-bd68-b3521459cf37@linux.ibm.com> <247080bd-fef5-c892-7753-f9b7cf650166@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <247080bd-fef5-c892-7753-f9b7cf650166@linux.ibm.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 30, 2022 at 09:11:54AM +0300, Dov Murik wrote: > If that's the case, we don't need a secure channel and secret injection. > You can use a simple "sev=debug" (or whatever) in the kernel > command-line to indicate your needs. Yeah, that would work for a normal SEV guest. However, if it is an -ES guest, you need to somehow tell it as the guest owner: "hey you're being debugged and that's fine." Because if you want to singlestep the thing, you're going to land in the #VC handler and destroy registers so you want to save them first if you're being debugged and then shovel them out to the host somehow. And that's another question but first things first. And "if you're being debugged" needs to be somehow told the guest through a secure channel so that the HV doesn't go and simply enable debugging by booting with "sev=debug" and bypass it all. And SNP has access to the policy in the attestation report, says Tom, so that's possible there. So we need a way to add the debugging aspect to the measurement and be able to recreate that measurement quickly so that a simple debugging session of a kernel in a guest can work pretty much the same with a SEV* guest. I'm still digging the details tho... -- Regards/Gruss, Boris. SUSE Software Solutions Germany GmbH, GF: Ivo Totev, HRB 36809, AG Nürnberg