From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96EFF23BD for ; Wed, 28 Jun 2023 06:46:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FDFEC433C0; Wed, 28 Jun 2023 06:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1687934771; bh=/fBZ9cbSiRyinkC8H30RlCqMLrhBXaEf9+MR3DHs4I0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gJIzgLxArGj7Io7qmYRX/fDLAClIv/nZa8WwlJeGEn59EQ7DpbRTwClBZWwlz+xqu iU4VZxFf4XYSNWuTUY+M6g8MgwA6/yEKiy4quy30WS2JZD3v0B2TPOp+4elt0MRqWz 6zaOyP4tHrSxKnx51WIY5rZ3AyPx6yEhjbuQbP7s= Date: Wed, 28 Jun 2023 08:46:08 +0200 From: "gregkh@linuxfoundation.org" To: "Huang, Kai" Cc: "Williams, Dan J" , "dionnaglaze@google.com" , "corbet@lwn.net" , "Aktas, Erdem" , "linux-coco@lists.linux.dev" , "shuah@kernel.org" , "Du, Fan" , "Luck, Tony" , "dave.hansen@linux.intel.com" , "brijesh.singh@amd.com" , "joey.gouly@arm.com" , "qinkun@apache.org" , "kirill.shutemov@linux.intel.com" , "mingo@redhat.com" , "linux-kernel@vger.kernel.org" , "tglx@linutronix.de" , "linux-doc@vger.kernel.org" , "wander@redhat.com" , "atishp@rivosinc.com" , "hpa@zytor.com" , "chongc@google.com" , "bp@alien8.de" , "linux-kselftest@vger.kernel.org" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "dhowells@redhat.com" , "Yu, Guorui" , "x86@kernel.org" Subject: Re: [PATCH v3 3/3] selftests/tdx: Test GetQuote TDX attestation feature Message-ID: <2023062805-drove-privatize-ae2c@gregkh> References: <972e1d5c5ec53e2757fb17a586558c5385e987dd.1684048511.git.sathyanarayanan.kuppuswamy@linux.intel.com> <64876bf6c30e2_1433ac29415@dwillia2-xfh.jf.intel.com.notmuch> <64961c3baf8ce_142af829436@dwillia2-xfh.jf.intel.com.notmuch> <9437b176-e15a-3cec-e5cb-68ff57dbc25c@linux.intel.com> <649b7a9b69cb6_11e68529473@dwillia2-xfh.jf.intel.com.notmuch> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jun 28, 2023 at 02:16:45AM +0000, Huang, Kai wrote: > > You really shouldn't be putting attestation validation logic in the > > kernel. > > Agreed. The data blob for remote verification should be just some data blob to > the kernel. I think the kernel shouldn't even try to understand the data blob > is for which architecture. From the kernel's perspective, it should be just > some data blob that the kernel gets from hardware/firmware or whatever embedded > in the root-of-trust in the hardware after taking some input from usrspace for > the unique identity of the blob that can be used to, e.g., mitigate replay- > attack, etc. Great, then use the common "data blob" api that we have in the kernel for a very long time now, the "firwmare download" api, or the sysfs binary file api. Both of them just use the kernel as a pass-through and do not touch the data at all. No need for crazy custom ioctls and all that mess :) thanks, greg k-h