From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796223361; b=zipDh+LzQvvzoQSZTEd1sbWng+aDw2GnAtrjFn3TB88AFAu4E0eCrcxhis6sOr/+nYe/ pI4L140dbTvyuvkSoxsZnOXd/9RqiGU1bm66lYy8hA9AalTaSnYYVjf/UxwfRdiKb0qDu iOcyzPmou7pkzsRAYou+cPid1sb6yL5LF6aEOp9nHf7WDwwUZ4Xz3brDNOFYggG0JLF0Y 0uPSrXPdRpAlPcKJRBQQnlLU7v9AzmR/DQND/wxyNSvYg4IjxrFI4ucZoo1zjyMTh3yHF 47n7mNkAPTCX8U6O5h1m2LF0csnTNQM7cRug2BT6pBQZ6IPtP2uYQs4rpIPRuUtugxw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796223361; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=gSzxJt3YDEIx5Aq+bJrD7B25pB1N4fnHpqju5FlLAlA=; b=TiPWk6AYNcqmqhT4RnmyWi9y1yUCGhS4r0lqEMel3B62Wg6dwJ9n4UKe6JJyGiJhi4r5 DYITAPU8hZHEZNn8kr+6b8ioAgp2h9gCEioYqWwjt3Hu5BaivTTiqku3sZEVBHXPnwjli tkjJaqcaw/bgWdLArswLd6JUc9S0pqsN9BF0W0ofjSk/Phk5UFeEI7ioBUZnPHEXbSy/g +mZe60zJ5sLhMqnVnLUD9fyx0EGL8xYI9i9K/6Q2eiPQD2j0ydzSDj8A5xRgRRFOqBxIq 1CGh4v3I2S53H3obWAPKYAriOFpmmoo9tgvlTRyaTBHoEMQHPBOK9WQiKY2LHm6OSig== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=resnulli.us; spf=pass smtp.mailfrom=resnulli.us; dkim=pass header.d=resnulli.us header.i=@resnulli.us header.a=rsa-sha256 header.s=google header.b=ivTsJxpR; arc=none smtp.remote-ip=209.85.128.52 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8B7C606A32C for ; Wed, 2 Dec 2026 14:55:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D8B7C606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnulli.us Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnulli.us Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=resnulli.us header.i=@resnulli.us header.a=rsa-sha256 header.s=google header.b=ivTsJxpR Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4bb6886d30aso125656225e9.3 for ; Wed, 02 Dec 2026 06:55:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli.us; s=google; t=1796223358; x=1796828158; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=gSzxJt3YDEIx5Aq+bJrD7B25pB1N4fnHpqju5FlLAlA=; b=ivTsJxpRTrfsdbVJ3rT+wDMvtRGeeql9qkjoLKU22c6109hyRQCT3gLtQZWVfxcnWf 7wkRdKwxAFMkUrsTY1O4IeeLToxF0mGmLBe/mBL/29cgoC2gBXWmeCiaVS7ipg9K6+kb xZPdLHbd1VriQoC2JqqZcwkAicBa24BhlZ60uT0Agj0vZ5pXHDFVIrgEqIpPkiQYh5Pp SaYc99oMMsN15zwAj5JfrQfZc1+I3W9j4EO+G2cTtMbK5keEtfZq5i1ypS6tM4VQJxrY kTuyZaFrBAUKWHc6utkzAPCJXFIj6cS1Rb9YrbPrw06+53UblK2UuagHyjGB/U3r13f9 HAQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796223358; x=1796828158; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=gSzxJt3YDEIx5Aq+bJrD7B25pB1N4fnHpqju5FlLAlA=; b=0JIabHJX5mRaVOO7bGHJq9YWezf8URYHWhENc/r5Gh1EYmCJLKF6GgSp7NmlaHS39z mv7+8gLd1Sdr+xYthF2gyEasmMVANTFWJKDf0Owrv15PL3GyoT8CSbfKpYgGBgeKGae8 LLylIAZ7NaUOp/jqIBT6MyvaLfd3MqA4oKcvg6OYmOUfah+qoopqwg1IlRcASEFWNCGR 5Pp6TQDU095cfgvJBz9nryNPm2QYK1AiYDocuJtATIsAriWnlXkq3B2Q/FJFn7AuII77 0I3k9kUVxbv5h8+19kriyhulbm8Xf5UDGFU8AFgj5X5o3Jpo9HyZ8o/yB3TZPs1bXdJZ Lgzw== X-Forwarded-Encrypted: i=1; AL+hErGYDrwHGK4FjyCgJ7xwti3KiQVJqbekqwNthRzZ8yDAXn48szIw/PvFtmc1w2JgwaLfRuQDwpjsbeE=@vger.kernel.org X-Gm-Message-State: APuU4Z9XcrP2i64b1/7+jS22p3G9YsljELjhqqMotW2GDCWFI149slIB Io8TPbqSgbYHvQOsASdhvELIx2/0ZSydJHBkngbdf5Ukpb9FduN4nSDMRwtD6hfyaF4= X-Gm-Gg: AZFdTZdM3aUBeQ8LfnlV4RkZEqzE2/mMxzCpncT6Z5E8p3H7J6VwqqPIwLmzTakDR3v uC0se2DpiejECGvoeqzVRaHe7WeLgIe90d+GLL63rllMAcZLyTkXe7F1V2H6eAKhOAWCgNTVCDW b+MswMaFqRWiJ2w6FuM/pMgwyoWFfEwNZVaP6782aljKckvXzx05e1DmAMu/vtK83b2CZpxhp3R UDKV/DkEI8Qm+3uBvJr6ODWNo9XaPIrtMX9jzibEeG0FPUEBxjITc/jxMcRrFZRZpHp1adVsvDb J5j66/ocuRCplePCfr8UN+0E931gdMRZbu35oKZG3IMBWWUSTD+LczfzjqWlbYjdZgP0ppguiGx 1B6eRL53/cdHQ/i53ucdI6gateKnkPcfD2kscDDwEyAY6qkdslCmWKzzbyKJ5TsXgwAq/gddA9y naVzGoTF7IYVd2PrcGRVY14kCFBH9pNIF7xxd7hNLO5Hssg0SgB4CJWGl+eZn9FlYdx9EI0Wl6Z cF2YEv7o7UMxNMsvQgtMvJCtQskJ3PJDl/6Lu0EyroENeuu//W6C44kh6V5HtICtBhcj5GyM7h6 ZdHHasDzQ5DqSXLpqllukJ/Qw3Xq+z8b6nCN X-Received: by 2002:a05:600c:3b88:b0:4a1:e672:5721 with SMTP id 5b1f17b1804b1-4bb8880789dmr914657495e9.13.1796223358014; Wed, 02 Dec 2026 06:55:58 -0800 (PST) Received: from localhost ([128.77.52.125]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb853368d3sm1062366795e9.1.2026.12.02.06.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 06:55:57 -0800 (PST) Date: Wed, 2 Dec 2026 15:55:52 +0100 From: Jiri Pirko To: Jason Gunthorpe 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: References: <20261113160838.2512652-1-jiri@resnulli.us> <20261113160838.2512652-2-jiri@resnulli.us> <179573913907.519186.8407997114208887089.b4-review@b4> <20261130203538.GB114472@nvidia.com> X-Mailing-List: linux-doc@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: <20261130203538.GB114472@nvidia.com> Mon, Nov 30, 2026 at 09:35:38PM +0100, jgg@nvidia.com wrote: >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. Agreed. With the objects below nothing needs the three fields, so I will take them and the service flag out of the base family. If an SNP provider turns out to need a knob of its own, it goes into its YAML. > >> 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 #? Right, no GUID crosses the uAPI. The kernel has a table from service GUID to format, reads the services manifest once to learn which services this SVSM has, and lists an object pair for each one it knows. A service the kernel has not heard of is not listed until it gets a line in that table. > >> 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? The ID is not uABI. It only names an object of this device's listing for the call that collects it, and userspace picks an object by what the listing says of it, never by a number it knows in advance. You are right that my listing does not say enough, though. The PSP's report differs by format, but the SVSM's two reports have the same class and the same format. I would let a report name the object it binds: id class format binds 0 signed snp-report 1 signed snp-svsm-report 2 2 auxiliary svsm-services-manifest 3 signed snp-svsm-report 4 4 auxiliary tpm-ek-public 5 cert-chain snp-cert-table The format names are placeholders. The manifest's format then says which service a report is for, and userspace also learns which two objects it has to ask for together. Userspace that wants the vTPM's report looks for the signed object that binds a tpm-ek-public one. > >> 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. Code wise it is the order of the provider's object table, nothing more. The rule is "the first signed object whose format you know", not "ID 0", so a provider only has to put its signed objects in order of preference among themselves and is free with the rest. If some provider cannot live with that, a flag on one object can be added then. But is it needed? > >> >> + # 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 Ok > >> >> + # 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? The verifier replays each bank on its own. An extend entry of the journal carries the digests of exactly the banks it extended, so a bank's replay takes the entries that name it and skips the others. A bank that was left out of an extension therefore has no gap in its own sequence, it just has fewer entries than another bank. Sergii, feel free to jump in here as this was your suggestion. Thanks! > >> >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