From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=192.198.163.11 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794912340; b=EqKZFE3jZt1jqwAiA0qW5ZgItQzkksTnHPYHmSXaaY3jT0S6mVexfjrJqoti9ksm5Dc6 7BIUjgzVSHNM+1gcQC6X709Znm08+QK2aVB06tfLjQHXoNChJc4XMLZtbCa4KflF6pZgG aLvsVZnGjrbDkU8SQNmBmctAIveLbhZy3FCCX7WUaEqVMGhpRfI2Uyss44TmY5bX06DAC +38376+9CPk65sdMEGXiAFVbJS/fNgecIyAwgz8ddHjBNYJsP9fIbkZn6BuWk9gwYTwOi bc0cKbf9rZFS9bPHCNUuptyA0CilnECjVhAjdDEng5Vzc7yKxHZGeMVEGxONYhYUH1Q== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794912340; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:X-IronPort-AV:Received:X-CSE-ConnectionGUID: X-CSE-MsgGUID:X-ExtLoop1:X-IronPort-AV:Received:Date:From:To:Cc: Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=+QOfZWAWfuxgKbStyVvWkdAdsygA1smra+vivVT1w/I=; b=SefwU0J1J0JkXHZW4nzuC+eNDW8RTGwxTU/dgLvNe6/uU4HzXo0YZb/BFKxV3JCESpwu whmqDMnyLxAloLiUPICCNcEcdTKIt9qQFjLsZr0cEJLxu1f+qIX4Djk/2qIS9LLnxFM9W gNIdSY6G/oeNv2yENRVhgptrjkak7tpa7+f2JOBMq4Muow9qwHkNk2kGhmlkkEDTUSqCA HU+Z0g7JOHni4FlsVLuw+EeNpAylq5iDGgOLmyl8YHSIdQ0AOJkh3kuLMuyep9R8u6Ucf NAxshFThwRKE2od1HolzGC1RnoIUsPN3wnUFbIFkYflD0mW6aKVLZqlR2rzaMVeB53Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=IzWGHHgp; arc=none smtp.remote-ip=192.198.163.11 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B186606A323 for ; Tue, 17 Nov 2026 10:45:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9B186606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=IzWGHHgp DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1794912340; x=1826448340; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=tV++jvHacqiiQ1xuEHsqeJB+olHXNyNtM4oKWmXmp4Y=; b=IzWGHHgpg+tOw3iOu4MXL3DquFE1+uGOtNixpH0R77OComVG7rIULMQi 4CwRo2ooox3jL/5mex5xt4VFFMtPOOHw7TuvmuZtFg3VkBWsrFqrlrvTx e0YrCqqeSljSkb4knhaAFpxZAp2tNszzkfDcHVs59Fptv8I2UInksH4TN Kab33S/pfhW1AGB0fZ4a6jW8MEYnUAmCq9P940QGRMstyZjD17weBMrAY /v/joj34x6ZuhHXGpoWSYLt5MJ/xfzBvOUn7MzY9w3siB2ZL1+Ve0LSuz tnhMiq7LIfeEDn8P9WOBj53WMTUptvMG62djc/tcwcauBpWn1V1MTmqD2 g==; X-CSE-ConnectionGUID: B1zcMuNrSruZ9j9k2Cn0MA== X-CSE-MsgGUID: rNKCEc4LR9yODIinSlwwsw== X-IronPort-AV: E=McAfee;i="6800,10657,11968"; a="3601192" X-IronPort-AV: E=Sophos;i="6.27,218,1787036400"; d="scan'208";a="3601192" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2026 02:45:39 -0800 X-CSE-ConnectionGUID: e4RQ87EmSrqW1D+kS1axpg== X-CSE-MsgGUID: deuFrh1ATdKTC7VLwxn02A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,218,1787036400"; d="scan'208";a="9742682" Received: from yilunxu-optiplex-7050.sh.intel.com (HELO localhost) ([10.239.47.46]) by orviesa007.jf.intel.com with ESMTP; 17 Nov 2026 02:45:33 -0800 Date: Tue, 17 Nov 2026 18:36:45 +0800 From: Xu Yilun To: "Edgecombe, Rick P" Cc: "Tian, Kevin" , "Li, Xiaoyao" , "linux-coco@lists.linux.dev" , "Hansen, Dave" , "dave.hansen@linux.intel.com" , "kas@kernel.org" , "seanjc@google.com" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "pbonzini@redhat.com" , "Verma, Vishal L" , "jgg@nvidia.com" , "aneesh.kumar@kernel.org" , "nik.borisov@suse.com" , "hpa@zytor.com" , "tglx@kernel.org" , "nicolinc@nvidia.com" , "Peng, Chao P" , "Duan, Zhenzhong" , "bp@alien8.de" , "aik@amd.com" , "Gao, Chao" , "x86@kernel.org" Subject: Re: [RFC PATCH 06/15] virt: tdx-guest: Support TDI bind and unbind operations Message-ID: References: <20261110195745.GG738765@nvidia.com> <20261111001606.GH738765@nvidia.com> <49b19bcfa1b0658cc0aa5cd280acb439bbba8287.camel@intel.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49b19bcfa1b0658cc0aa5cd280acb439bbba8287.camel@intel.com> On Mon, Nov 16, 2026 at 11:57:23PM +0000, Edgecombe, Rick P wrote: > On Thu, 2026-11-12 at 20:56 +0800, Xu Yilun wrote: > > > > > > > > > > For errors that indicate uncooperative or buggy host, we elsewhere warn > > > > > in > > > > the > > > > > TDX wrappers. But in coco, not handling an error in the caller can be an > > > > avenue > > > > > to attack the guest. So I guess we would commonly need to handle these > > > > The secure firmware should guarantee the attack can't impact TSM > > security. > > We had some issues in core TDX guest where if the VMM lied to the guest it could > cause shared pages to be returned page allocator. Due to an error not getting > handled properly in many callers. This led to a debate about whether we should > even handle the error, or just panic the guest if we see weird responses from > the VMM. Ultimately we settled on a warn, due to the face that panic_on_warn > should be set. For x86 code at least, we should be consistent. I see. IIUC the problem is not the VMM lies or not, it is the guest itself not be consistent about the page attribute: The caller ignores the error and see the page private, but the guest PTE maps it share. Actually the guest can't tell if the VMM lies by GHCI return code, success or failure. The guest could alternatively ignore the return code, update its PTE and return success, later the HW can guard the inconsistency between the guest's view and the physical state when accessing the page. Of course the GHCI error detecting is useful to keep system stable when working with benigh VMM. So I agree that we propagate errors and handle in the caller for TDI LOCK/ATTESTATION/ACCEPT phase. But I also feel OK to treat UNLOCK as always success - the kernel rarely fails on exit. As long as the guest doesn't mess its own TDI state tracking, we are safe. > > So it was more about exposure to bugs then higher level issues. > > > For DDOS attack, the guest could always move the device to > > untrusted mode. > > DDOS attack? Sorry for the typo, DoS (Denial of Service).