From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796020399; b=PtY8c9TDsil0yLTv0Br3T6xxXtomLhxeOBkALWsi8mvGy+WrP0am3vlfjYkY+Lc4P0lO vSbWRPcgX9noBjDkIJgU4BrIAON3X6vc7YlySDxq8epXvHevf/QFrMVsaof/I8FOUgZgw yBmRzGA1eq03kRbjUPSPt+84yKhloaaQBM0kySIRQjBebVzoPaL6zq7PAj8nxM37Kx8g+ JQPI+Ru4MJaleIxOWE8o/KQO4dAjaugLbNupMunNNhM+/BxI2vcgtBD8UjJq/z23ElXR0 awcXWw8lKM/lc6NUeKlDnjnUWohIIZ+GX8GflVvPHDZuKDA995Haw/MzdpjTsi2jsJw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796020399; h=Received:DKIM-Signature:X-Mailer:From:To:Cc:Subject:In-Reply-To: References:Date:Message-ID:MIME-Version:Content-Type; bh=Fwp7/v6+7as7t5rD4pYoRoSmflrNLP5CtNlDjvZrk9A=; b=peagl0zW9rWxuZISPKQn4cB37Lln4xlJnepRmDGEMh6En5x7gjadV3+rU2UxRBnFLOyP +wxNCzKb9A0TXuWFAhtRwMz/+cb/S+vlaqZ3h5/ydYALVo4up6ZSr18DSeD+YPcSEVDYD LOkKB6qHtOJKUWP9sduuaEHZtLSigDguNWDqAwn7OpPSJlcG+GhewBwuKA5dyGAXnsoHK +0rdASo8VNHK08tEjWuh5O50Ur04DnpzVoPO7Fhhehhqau1LWVUT5+0C/eEvq8RE3sP4j X9KNaIQ86XyKAcfeDq1osQNtBJ7y2wpz275ixJJIxj6MM989+ucqUbhQIWELtRCYxxA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SxVD4BSH; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DF3B606A31C; Mon, 30 Nov 2026 06:33:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=SxVD4BSH Received: by smtp.kernel.org (Postfix) with ESMTPSA id B86791F00898; Mon, 30 Nov 2026 06:33:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796020399; bh=Fwp7/v6+7as7t5rD4pYoRoSmflrNLP5CtNlDjvZrk9A=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=SxVD4BSHCof8UW+2SOjDDaw4upmGHyw8xMerl8mOqQ6iy18m3SefYZbXxs9lMCHO/ SPCf0QYIyw0iK0zW/nOql+WnR0dISTJMFnBXleiVln2UbgCWh8XDwy2aJ3aqvaOWP7 7pjzHXMbsTkG1F4G8DrK0Su/LXGsRRbnyKo3SfrKng3AxtYmInrKKv6n3YYnBMK33U xKBmktdZqzJ/c78nDA+stRyXzS4JRmc0bSuQ1rc6cVZgB2+2q/DUKRR5OeoaL8xx06 gpzpBey8vr5E0+q+X7cy6cAZMsS2jTinnRRyZmJLCmysK6Y2U8N07k6hKYgmve76Ed rRlTogsiZlB5w== X-Mailer: emacs 31.1 (via feedmail 11-beta-1 I) From: Aneesh Kumar K.V To: Jason Gunthorpe , Jiri Pirko Cc: linux-coco@lists.linux.dev, Dan Williams , Leon Romanovsky , Bjorn Helgaas , Jonathan Cameron , Xu Yilun , Alexey Kardashevskiy , Greg Kroah-Hartman , "Rafael J . Wysocki" , Steven Price , Suzuki K Poulose , Lukas Wunner , Ashish Kalra , Tom Lendacky , Herbert Xu , driver-core@lists.linux.dev, linux-pci@vger.kernel.org, kvm@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v1 08/10] PCI/TSM: Add sysfs lock and unlock for guest-assigned devices In-Reply-To: References: <20261123083337.2731019-1-aneesh.kumar@kernel.org> <20261123083337.2731019-9-aneesh.kumar@kernel.org> <20261123152738.GF179082@ziepe.ca> <20261125143021.GE246011@ziepe.ca> Date: Mon, 30 Nov 2026 12:03:11 +0530 Message-ID: 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 Content-Type: text/plain +Jiri Aneesh Kumar K.V writes: > Jason Gunthorpe writes: > >> On Wed, Nov 25, 2026 at 02:33:26PM +0530, Aneesh Kumar K.V wrote: >>> Jason Gunthorpe writes: >>> > > [ ... 96 lines skipped ... ] > >>> https://git.gitlab.arm.com/linux-arm/linux-cca/-/blob/cca/topics/7.4/cca-da-integration-v2/Documentation/userspace-api/attestation-spdm.rst?ref_type=heads >> >> I don't think the scheme will be 'spdm-get' using a bunch of 'cached' >> object IDs. It should be much more specific. >> >> The transcript should be its own top level API, with its own sequence >> numbered list of discrete blobs. >> > > Could you clarify what you mean by a sequence-numbered list of discrete > blobs? > > The transcript format could accommodate additional SPDM requests and > responses as firmware starts exporting them. Each transcript-get would > return all messages captured so far, in capture order. > > For current RMM firmware, the available VCA messages are: > > M0 = GET_VERSION > M1 = VERSION > M2 = GET_CAPABILITIES > M3 = CAPABILITIES > M4 = NEGOTIATE_ALGORITHMS > M5 = ALGORITHMS > > Each Mn contains the original SPDM header and message payload. RMM > provides these through successive communication calls, identifying the > offset and length of each request or response buffer. > > We would need additional metadata, such as the length of each message, > whether it is a request or response, and, for future extensions, whether > it was transmitted within a secure session. Linux could add this > metadata as a header: > > RMM cache notifications: > [M0], [M1], [M2], [M3], [M4], [M5] > > Host transcript-get output: > [H0][M0][H1][M1][H2][M2]...[H5][M5] > > Since this representation preserves capture order and message > boundaries, I am wondering why we would need sequence-number in > transcript-get ? Or do you want explicit sequence numbers so that > userspace can request individual records or only messages appended since > an earlier read? Or by sequence number do you mean the SPDM session ID > to be included? > > For the guest, we would preserve the existing raw VCA representation > over RHI. The VMM would remove the Linux headers before returning it: > > RHI VCA object returned to the guest: > [M0][M1][M2][M3][M4][M5] > > Guest transcript-get output: > [H0][M0][H1][M1][H2][M2]...[H5][M5] > > The guest would verify the raw VCA against the digest provided through > RSI. > > There is also a question about subsequent evidence collection. Should > transcript-get include the GET_MEASUREMENTS exchanges initiated by > evidence-get? > > Current RMM exports the complete GET_MEASUREMENTS request and its > MEASUREMENTS response, including the signature. We could represent > those as transcript entries without changing RMM. However, doing so > would require transcript-get to cache those exchanges, while we also > discussed not caching any of them. > > Finally, what should evidence-get return on the host? Current CCA host > firmware provides the certificate chain and VCA during authentication, > but offers no additional fresh evidence collection. If certificate-get > and transcript-get return those captures, does that mean evidence-get is > not required on the host? Without evidence-get, how do we identify the > evidence instance being accepted by evidence-accept? > > My patches implemented evidence-get as returning a bundle containing all > available verification inputs, including the certificate chain and > transcript, together with freshly collected evidence where supported. > > The patch set returned the device generation and a receipt with the > bundle: > > # evidence-get, 1 fragment, generation 0 > evidence-get details > evidence-details.device-generation 2 > evidence-details.receipt hex:27be43bc8c299eca3205e59c3f36ffdc54e2b3e5563320daaabe423ab11bbf09 > evidence-get results > evidence-get results.vendor-format spdm-bundle > evidence-get results.length 872 > > Userspace supplied both values to evidence-accept. The generation > identified the attempt (spdm-start of the session), while the receipt > identified the delivered evidence set. A later evidence-get would > invalidate the previous receipt. This allows the kernel to check which > delivered evidence set userspace is accepting. > > Could we retain that flow on the host even when nothing can be > refreshed? The guest would use the same flow, with evidence-get also > requesting fresh measurements using the supplied nonce and fetching the > interface report. > > Under that model, transcript-get would be optional inspection API. > evidence-get would return the available verification inputs together, > and evidence-accept would identify that result using the generation and > receipt. Is that consistent with the split you have in mind? > > -aneesh