From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FC90C12002 for ; Wed, 21 Jul 2021 13:40:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 35BC461245 for ; Wed, 21 Jul 2021 13:40:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 35BC461245 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id CB4516B0070; Wed, 21 Jul 2021 09:40:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C63A46B0071; Wed, 21 Jul 2021 09:40:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B2C9F6B0072; Wed, 21 Jul 2021 09:40:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0035.hostedemail.com [216.40.44.35]) by kanga.kvack.org (Postfix) with ESMTP id 99C396B0070 for ; Wed, 21 Jul 2021 09:40:32 -0400 (EDT) Received: from forelay.prod.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by fograve03.hostedemail.com (Postfix) with ESMTP id 5485A1854C265 for ; Wed, 21 Jul 2021 08:51:06 +0000 (UTC) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id BE46D1854BA17 for ; Wed, 21 Jul 2021 08:51:05 +0000 (UTC) X-FDA: 78385975290.29.8DBEBCC Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf12.hostedemail.com (Postfix) with ESMTP id 363A11000AD4 for ; Wed, 21 Jul 2021 08:51:05 +0000 (UTC) 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 E0EA81FE7F; Wed, 21 Jul 2021 08:51:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1626857462; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RgODuVW3AaV2E0f9UPQm0t7b6U8BHQyRuS3VzEAnXZ8=; b=FQSKW8knkTEp5/E1cgVIPc289sKfAUTSzNkE1RDQUVag449dya2FCrQ4WxTsEFPq3hbOup IlMThr1d7vBAcu43/0V08meLXkAHblcVJeJZ1+csntKarE4u5ZAUEiodSbud59QuoQNMoA c3T+BY1LHgezMA1UOpVS8RBnYtm7VDU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1626857462; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RgODuVW3AaV2E0f9UPQm0t7b6U8BHQyRuS3VzEAnXZ8=; b=ZkIIlxCXNeGrRWdra/1UuYLRW4ht9H4gfYF8hhS317yaWIwzhSjRcG+DfZjWd72WGo5zje 8iIhld61tRJIkuAg== 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 2CABD13B36; Wed, 21 Jul 2021 08:51:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uzk9Cfbf92CVFgAAMHmgww (envelope-from ); Wed, 21 Jul 2021 08:51:02 +0000 Date: Wed, 21 Jul 2021 10:51:00 +0200 From: Joerg Roedel To: Andi Kleen Cc: Erdem Aktas , Andy Lutomirski , David Rientjes , Borislav Petkov , Sean Christopherson , Andrew Morton , Vlastimil Babka , "Kirill A. Shutemov" , Brijesh Singh , Tom Lendacky , Jon Grimm , Thomas Gleixner , "Peter Zijlstra (Intel)" , Paolo Bonzini , Ingo Molnar , "Kaplan, David" , Varad Gautam , Dario Faggioli , the arch/x86 maintainers , linux-mm@kvack.org, linux-coco@lists.linux.dev Subject: Re: Runtime Memory Validation in Intel-TDX and AMD-SNP Message-ID: References: <20210720220113.GA535804@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210720220113.GA535804@tassilo.jf.intel.com> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 363A11000AD4 X-Stat-Signature: qd9ef8pihas8z1cfz6sak8mgd4cxq56a Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=FQSKW8kn; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=ZkIIlxCX; dmarc=none; spf=pass (imf12.hostedemail.com: domain of jroedel@suse.de designates 195.135.220.29 as permitted sender) smtp.mailfrom=jroedel@suse.de X-HE-Tag: 1626857465-70654 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jul 20, 2021 at 03:01:13PM -0700, Andi Kleen wrote: > On Tue, Jul 20, 2021 at 12:54:16PM -0700, Erdem Aktas wrote: > > I did not see any #VE implementation to handle SEPT violations when a > > page is in PENDING state. I am assuming that this needs to be > > supported at some point (If not then we need to discuss the use cases > > for such support). > > We actually plan to disable those #VEs, to avoid any problems with > the system call gap. Instead the plan is that the kernel will know > in advance what memory has been accepted or not, and accept it before > touching. This confuses me a bit, what happens when the VMM is malicious and re-maps an already accepted page and the TD tries to access it? My thinking was that this causes a #VE, but what happens instead when this #VE can be disabled? Regards, Joerg