From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.57.40 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796070948; b=qIOXHVxIvpNcUrFb9OxIghpEsr38fP6qyY2ku8+5rjFp5s2bDCqXdn04fDlei4wZCTCg oPsdpHtqf40WP1UGIfNe48xumrbcJs9MSEcVVL01BHwCz6htCC2LaV++wJ9pd7qsh+vTP aCS8g7caFteMvSSttNw6yeUarh5+I4w67LmnwqIs/xCFp+p2DzoQdHgpucHwsKMJNRgcc 9T4zUGdUvOwhrWWelakXS8dOLdxthjdYvDEk9EsOfun6pK1gjDioTAAbbvJ+dD3HoGl8I J7xrTPd2beAdKtoPTLKxMLwTEKZN99Gu2TizYgu/EZ39dBR0sHWdV7SuN+nV2R7Svfw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796070948; h=DMARC-Filter:DKIM-Signature:Received:Received:Date:From:To:Cc: Subject:Message-ID:References:Content-Type:Content-Disposition: In-Reply-To:X-ClientProxiedBy:MIME-Version:X-MS-PublicTrafficType: X-MS-TrafficTypeDiagnostic:X-MS-Office365-Filtering-Correlation-Id: X-MS-Exchange-SenderADCheck:X-MS-Exchange-AntiSpam-Relay: X-Microsoft-Antispam:X-Microsoft-Antispam-Message-Info: X-Forefront-Antispam-Report: X-MS-Exchange-AntiSpam-MessageData-ChunkCount: X-MS-Exchange-AntiSpam-MessageData-0:X-OriginatorOrg: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-AuthSource:X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-OriginalArrivalTime: X-MS-Exchange-CrossTenant-FromEntityHeader: X-MS-Exchange-CrossTenant-Id:X-MS-Exchange-CrossTenant-MailboxType: X-MS-Exchange-CrossTenant-UserPrincipalName: X-MS-Exchange-Transport-CrossTenantHeadersStamped; bh=VOzVz28NSop2rh6P+yZjiqr5wsN9sBC1wIoOOQYsCAA=; b=NYT9FmM3awLkaj3Y/DwYuCBqScA0DLJGddiKV8b3ralKrbh0NXVpYiOKiEs1pwq6+q45 vV4Sx/GnPCMstcDwo3wX6bcuwYZFIFLHFj/MLsy46/k+xWf4iHJvzuSX2V8fFb4AwSuwA VXY31g2WNBMhEqvo/y2XrfY3CMxWuKBMLkGUBo5gBZbA5CcZBd4I0smBqXBzCfbJATqYj mzZabKtSXGrgBD1xv3WrErMYX400gHnYwUDtuf2Eua6iky8HGaujCVkrF9zljbxj/6oq+ Zgqbx+T9Pwrde4InY0i+LEdZ2EDAg91/k9MjufleY99HHRqkeOVUgo3Q7UtfDWPqDXg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=cfiKqAgD; arc=pass header.oldest-pass=0 smtp.remote-ip=52.101.57.40 Received: from BN8PR05CU002.outbound.protection.outlook.com (mail-eastus2azon11011040.outbound.protection.outlook.com [52.101.57.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (secp384r1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38C2E606A320 for ; Mon, 30 Nov 2026 20:35:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 38C2E606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=cfiKqAgD ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hVQrYAng7nk9TTZL6gYVVH311d6gn/vETLfVtfefOxsBwJJUtk3n/zT4D0c+vSqIiDSD5gY4055wRy6kbVq3vDpAjx3bkk8h9rbDGfBHdNQX7mc8JAOwVFHeG+CVWne0LNZ7rAmVvOQ+So7cR2s/w4h/an3Kls82b4Mhngo0Bhb2/heXSeH+jJ3vvjveo53BlkMjDgGd3PeYQlC3pemim3o/yZ+ur+idMuxOrQ3mjJYTlX/4s/Zo0wCpq+g66ERLm0A1s44Nuc98a4HVl+Uaf+Jhbs7dOdL6yYI5g1na8TEuDZCjDWK7flp4cNRRAbYb9oqjdKosM7no7w1q66FeHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VOzVz28NSop2rh6P+yZjiqr5wsN9sBC1wIoOOQYsCAA=; b=eHfqV8qELlbSyX7PZKV5pUO9A/DIu+2imlaK2VLrmIsUYVjTGBrG5ZrayGCJRrEPr3oynPe14FYlJrR03NYlos2p3Oj2CgIeYo0rJB3+APfJI4v7yKj1d9P9hZUCxcfSg6FFllWud2hEU5mffLUcKUYSJTWEYyRmuU8Tpae5N+bjIM68Em1cShOWts3UMKlCajY3CD5M8KMoUGB5UslriKnhQTQjyHWWfEZTx9H7JDTDoE0g6Qr4CF3NO3P6ECPns5a59A2Y1cxkIsqB7b8DLCMfVHDlv+V3ei2YYPc0WUhIRFFeVJ6DAywqlhbqTDKyyMBjkFyjigmkOuL2Nw84Ng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VOzVz28NSop2rh6P+yZjiqr5wsN9sBC1wIoOOQYsCAA=; b=cfiKqAgDOdOr7z0CMiq1O/gOcliU83KBvqiLfXrP8q1iLQ3Eixelrrc2xxZXTNMo+e46rTN1UjradtdLz8sGWytciNTLHA2p9heTkQSyBfdODOYnZTrf2N95cVX54qm4Ps2g2eH04wlZ1bM1zZKZJOAJZPnFFeQaTZYRzmT80/HC+KgELsRw4Zi7k+INavvWavkNMSX1t4R/KNB3C7n3+T9lX+Z2XuacVf2d/j8HF7y3dO08kgIRc3AiFvQt4fYGfrb/Bsofkm4oOnbXrX8/pgE6dTxWwWB0zdeQgXJeTkUpD+pDfCy7r5766wGd4vTIV3RJXxp4q4hs2dkrFHKQFA== Authentication-Results: mx.microsoft.com 1; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CHBPR12MB731189.namprd12.prod.outlook.com (2603:10b6:610:33d::12) by CH9PR12MB952423.namprd12.prod.outlook.com (2603:10b6:610:353::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.662.11; Mon, 30 Nov 2026 20:35:40 +0000 Received: from CHBPR12MB731189.namprd12.prod.outlook.com ([fe80::b0e5:123d:fe06:e10d]) by CHBPR12MB731189.namprd12.prod.outlook.com ([fe80::b0e5:123d:fe06:e10d%6]) with mapi id 15.21.0662.012; Mon, 30 Nov 2026 20:35:40 +0000 Date: Mon, 30 Nov 2026 16:35:38 -0400 From: Jason Gunthorpe To: Jiri Pirko Cc: linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, david.quigley@intel.com, lukas@wunner.de, ksinyuk@kernel.org, rodrigo.vivi@intel.com, cedric.xing@intel.com, sameo@meta.com, drdeeglaze@gmail.com, James.Bottomley@hansenpartnership.com, aik@amd.com, jpiotrowski@nvidia.com, qinkun@google.com, pgonda@google.com, jic23@kernel.org, alistair.francis@wdc.com, ankita@nvidia.com, suzuki.poulose@arm.com, kas@kernel.org, rick.p.edgecombe@intel.com, elena.reshetova@intel.com, dave.hansen@linux.intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, peter.fang@intel.com, jarkko@kernel.org, zohar@linux.ibm.com, yeoreum.yun@arm.com, aneesh.kumar@kernel.org, dave.jiang@intel.com, nik.borisov@suse.com, sergii.dmytruk@3mdeb.com Subject: Re: [PATCH RFC v2 1/9] attestation: Add the base family specification and generated files Message-ID: <20261130203538.GB114472@nvidia.com> References: <20261113160838.2512652-1-jiri@resnulli.us> <20261113160838.2512652-2-jiri@resnulli.us> <179573913907.519186.8407997114208887089.b4-review@b4> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: YT4PR01CA0270.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:109::20) To CHBPR12MB731189.namprd12.prod.outlook.com (2603:10b6:610:33d::12) X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CHBPR12MB731189:EE_|CH9PR12MB952423:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b92319c-4ee1-46de-61c7-08df4f217f61 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016|23010399003|5023799004|11063799006|4143699003|261009223027099003|22082099003|18002099003|3023799007|261026140227099003|10067099003|56012099006|261102123227099003|261028144727099003|261026121527099003|261022105027099003|261022075727099003|261021121427099003; X-Microsoft-Antispam-Message-Info: SCmbL2xFhQDUdIBinrvz4CPvGJM91D+eJ4YEkIleJv9STBZqjq5Mo1Abnu/HwNDPxM+2BdRddiZGJ6SSh6w7/o3EnAmSZU/GfDsuPSki1k+cEfEvcThw/2gvlpMVUKEVh7obd/J7EnAnxgvr0AOC+bCmgXx1AQ/n/CRYK5fm75UWDdLbMGQILttrlQlBwvl0/kQSQ7BfATvs6GTOIaB6kMIHxIkGL7Z09/zFg+3bHHc7JD3+YnhiN54pgs7e/09orcQf8K4wNWL204BH/dwAUEKTFcImaOshcd64MG512wm5BLhEai6BdyRSXzXlsR7ys2X9Y9e56+xd51PE/vVKxqDjODSYCu782NuBArtvkwtuxAqNs8P/Tps0N5yZTQGc8bBumf6IxfMgCcwnZjbZrgbRe+9QD6CI3QSr4Yd9Xr93H15tWol4IV0ptjbsTIc0lIijCWjQycB870VGGvxbgdPezextoFXa02jhFyt4qHv+lI5EKXIBZPoCPF5pZ4is93OBeYIcoP0rd637LjCnRN76SATYJ4eoEfW6vBuN8f/0QC9qNi+hEDPylSvrxu3KsfjADP3Whe6WMdPRJZRMrakoVjKKDYL+ZFz2rtYILf98/vvBAQPj4oGXvhUHKiFx3NBUBVA50c22R/OYZRJqgSM/i6NOc+IsgdhSrDQBwQk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CHBPR12MB731189.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016)(23010399003)(5023799004)(11063799006)(4143699003)(261009223027099003)(22082099003)(18002099003)(3023799007)(261026140227099003)(10067099003)(56012099006)(261102123227099003)(261028144727099003)(261026121527099003)(261022105027099003)(261022075727099003)(261021121427099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?SDpUW6hKTu7XltB3sK65ShMk1pj6HkyQKBp3GuhoitUaxFVSg4AezeG5bEdA?= =?us-ascii?Q?bXqb6euS8JZzQKfOF3ibOzyF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ascii?Q?uUNAz0tUDUNtNiIrjUHMexLxnGbtKHMQGekMkeXxzFAFhPvAT/MbBAUkV+Gk?= =?us-ascii?Q?IX5UDrR6kxosW/vOPmR68Yy+ot9A2F12G3IGpWmZkNAPbYsOOvYNcl9eCxue?= =?us-ascii?Q?5Cjdz3RRh6IfF3L7/gMN6GYH8Dpvi+DmUQVFpHckgHxveZwTGIrZdt1PfuSN?= =?us-ascii?Q?95FGHb5fSHa9VGUha6G2HFbM9N93hXumVdzjCJ5B/8GQEQQzWZNXSQfkNvwI?= =?us-ascii?Q?VxCz/qJgghbeIplqpyMthNC5F9DvBrB1CJdpQ/NN7aTXCE9AaTJ79NGL5YLl?= =?us-ascii?Q?qBkWVBZ06qJdUcNcIlVBvRmHyldE0QM3+ty5rASxdHalT/Rl2t12nWdXQe5I?= =?us-ascii?Q?nGbnvga13P9E/RbA3fSTdzO8W/kxcm3/jyef1Dm+Mk8WxAdreSPQ/9CWDr3K?= =?us-ascii?Q?IAGnwufx1DS9DPfgRhg6lYFd7iWzz7shZ9I8w+8m+Z0yu9lQKY4FRZi8D/Bg?= =?us-ascii?Q?sMfXxQtROJ3ewHMRP69uT5lvgi/bCVDAGr9xCoCGH04RkD/BNuwMM5EoxbyD?= =?us-ascii?Q?GkpGKZXwe8n69lNxn34vudNDtjJmGQb1NA8UUusndyGOhPY+pnGy66YVYigu?= =?us-ascii?Q?+RTfeky9UNBiodeCh5q0VaN6eB0c3TaxEBXbiGOIhAVkhU98qMAzxK0RhNof?= =?us-ascii?Q?4qxnPASCWxdDV4SRZewtr10WWIm1XVD8Gr4lMK7rQSTt3n7ke5mCOgH5+gdE?= =?us-ascii?Q?rfcCiTRKo6OLLN4R+BF36DulAiNnkNplL5IF/oV0gnvXv6va?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b92319c-4ee1-46de-61c7-08df4f217f61 X-MS-Exchange-CrossTenant-AuthSource: CHBPR12MB731189.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2026 20:35:40.0533 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PYP6Cjj/5qrkE1qRDzszyFKKzm5RnbTtJ91H7mmvmHP75iZngRIgheoykpnMXLo2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH9PR12MB952423 On Mon, Nov 30, 2026 at 03:00:38PM +0100, Jiri Pirko wrote: > Nothing in this series takes a GUID. The referenced github all_2 > branch does, for now: its evidence-get carries over configfs-tsm's three > attributes as optional request fields, > > service-provider?: string(1..128) > service-guid?: binary(16) > service-manifest-version?: uint(..u32-max) > > all three or none, taken only by a device whose evidence caps have > the service flag. That is the GUID from userspace selecting an > opaque blob that you doubt. Perhaps we can do this differently: I would like this mess to either all be in the AMD YAML, probably in a form like this Or somehow more directly standardized into something actually usable by a generic collector. > As I understand the SVSM side, a guest under an SVSM has two > reports. The PSP's has the challenge as REPORT_DATA. The SVSM's has > SHA-512(challenge || manifest) there, the manifest being either the > table of all services or one service's own, which is what the GUID > selects. Same structure, different binding, so two formats, as you > say. Yeah, since the nonce calculation changes it fails my proposed test of 'can check the signature' because you can't validate the nonce without knowing about the || > For a guest under an SVSM that has a vTPM, device-get would list: > > id class > 0 signed the PSP's report > 1 signed the SVSM's report over all services > 2 auxiliary the services manifest, which 1 binds > 3 signed the SVSM's report over the vTPM > 4 auxiliary the vTPM's manifest, its EK public area, > which 3 binds > 5 cert-chain the certificate table OK, it seems reasonable and this gets rid of the GUIDs right? We basically hard wire a couple of the choices into the kernel and offer them as id #? > each with its format; the last two classes are on the branch, not > in this series. The caller names a report and its manifest by ID in > one evidence-get. The kernel maps GUIDs to formats and learns which > services are there from the services manifest, so no GUID crosses > the uAPI and a new service is a line in the kernel's table. How does userspace understand which ID is which of the three signed evidences? I don't think we should make ID uABI? > For the default I'd say the objects come in the provider's order of > preference, so generic userspace takes the first signed one whose > format it knows. Would that do, or do you want it explicit? That seems OK, as long as we can manage that code wise. The reason I suggested offering a default is so the driver can have some kind of natural order defining all the evidence it supports and not contort itself into a specific ordering to make id 0 something particular. > >> + # The longest the object gets; a blob this long always holds it. > >> + max-length: uint > >> + # A signed object's challenge lengths: each entry is one length, > >> + # or a range from min-length to max-length. > >> + challenge-lengths[8]?: > >> + # A single length. > >> + length?: uint(1..4K, bytes) > >> + # The shortest of a range. > >> + min-length?: uint(1..4K, bytes) > >> + # The longest of a range. > >> + max-length?: uint(1..4K, bytes) > > > >The comments should be more prescriptive on how userspace has to > >handle this. I guess if length appears then that length must be used, > >otherwise within the range described by min/max length > > > >But I wonder if this is worth some additional schema support to define > >a tagged union? > > What if we just simply drop length and just have min-length and > max-length? Then min-length==max-length is just a special case. Makes sense to me > >> + # Extends banks of the MR by digests, as TPM2_PCR_Extend. > >> + mr-extend: > >> + type: action > >> + fd-access: read-write > >> + optional: true > >> + request: > >> + # The MR to extend, by the ID mr-get lists. > >> + id: uint(..u32-max) > >> + # For the banks to extend, each once, in any order. > >> + mr-values: record > >> + reply: > >> + mr-generation: record > > > >The comment should say that mr-values must include exactly every bank > >inside the MR, not more or less. > > A subset is meant. v1 wanted every bank, and review of it brought up > DRTM, which may extend only one bank while several are active: That sounds aweful, I suppose the issue is DRTM/IMA may not have the loadable modules for every algorithm till after the initrd starts. But how does the verifier make any sense of this when there is a gap in the extension? Does the TCG log include the hash algorithms that succeeded? > >But AMD seems to pass them through 'auxblob' in tsm_report, so there > >should be a certificates API here to get them. SPDM also has them > >detached from the evidence. > > I'd not add an op for them. An evidence object has a class, and the > full branch adds cert-chain beside signed and event-log, so certificates > could be listed by device-get and read by evidence-get like the log is. OK Jason