Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18885270rwd; Wed, 28 Jun 2023 01:56:41 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6awwlLw18bllYnt49kUHDQqe77ix7vLluWI7Z8J2eCFShq3QZlxNe82joyKLocjcJ25l0l X-Received: by 2002:a17:906:da8a:b0:96f:e45f:92e9 with SMTP id xh10-20020a170906da8a00b0096fe45f92e9mr29533071ejb.16.1687942601059; Wed, 28 Jun 2023 01:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687942601; cv=none; d=google.com; s=arc-20160816; b=bUlbSX4xHQQj7dlCoOgdzVDPVMuxOLe8ZyxuiJvXZCXdU0FySY39OxKEqOIpXELfqK 7EHv0LP3xMGI68iTMCdZxTCamaMziVBrZ1HbZOrkA//wg5ZSh1kihziHbuHEUO4R7k9p NuDH98+TEol7AooM4c40J+9xDA2XMINvGWUKNwoiJP70jxyRX89m33AvjA3hTydPUNRA A3OXdM21IFjaLt13AQAZREEnDK7PX4kwrhnh/GvXXLXt3WHx7hgxdv0AnZZYnmd0cIeC q2nPJci9no8ugtExfqqu3LabA/dL1MidMYQ6MzoPxXQx51C8UxNsHzR74dWTp9F9Ge8p X7ug== 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:dkim-signature; bh=VwwcG9FmHIVHA/HXn0yaYl0EBCphGOUXOez/1MNHdXs=; fh=xJysLU1G/Gfq7Jy1sEKdarsKMczY1tztviAnTpWOKs4=; b=fpDLp4jxeKVC/qOl+bc7Ms9Ur+WhewizKGYf5gB1+7ffxUPRtPbmnHvy6v8Hal8Vpx Lc/s7gfm07V4gq682VGHcElV7KEiUqrZ4DslSAiO98cZZ2fdk9nV9t3NlEuCogt4NHcB 237uPoar2BJbBFrfl9z+FO8ZvxyZPQqSigJBmurzXGIWHn5bIpbAzsD9jBVkAf21esKW EK1G514NXD7ki1H3cT+HrgR41YT43LiLx8fpRsqwlBR0lJ9UA7k77MqH2SWPBr7z+Wtz JQQGaGKt+ZFMJ/hxgQIOHbVNsB0HJgYwyiDG/tI9eEQILdbXsb7A3uJ5omlHQPbRl0Ir qL5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gJIzgLxA; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020a17090622d600b009885713e1f7si5160153eja.367.2023.06.28.01.56.15; Wed, 28 Jun 2023 01:56:41 -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=@linuxfoundation.org header.s=korg header.b=gJIzgLxA; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232462AbjF1IJk (ORCPT + 99 others); Wed, 28 Jun 2023 04:09:40 -0400 Received: from dfw.source.kernel.org ([139.178.84.217]:48362 "EHLO dfw.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232292AbjF1IEt (ORCPT ); Wed, 28 Jun 2023 04:04:49 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9CB7B61323; 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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