From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 4D6DF3E0224 for ; Tue, 24 Mar 2026 12:41:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774356084; cv=none; b=j602P2Z3L4k8Wn0LYWzNUou+BTvvltXpFcINK5vMG18OlETyxceShn2rTeihx0I2+LvusgkOFpyFpW/Inzytu7nF/F0jztHG19+rZZC0GTqNs3KEeS87FSEoF5RFteH5Opwi8cY7W0asHHcfCsQpnYP4pIj7xsEPuVEVymER0eQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774356084; c=relaxed/simple; bh=/pr0CgDAbsISmMKMqPOMAXkthG8+A0KhI3tEvgnrxxw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MPZxPlKtdkcO7zg7RecdfggMosdRHYGrOQj2j3pIRkPBz7I10fQdTx3xKOW+fEuIS1wb99wJX5/sjcJquT5mZKUUNw3w6/jZayTMx1HPpNG621l5s1uq8F3nq7jpKjdHEkcVpJGeYe0v3pG8EeU7+05U2E4Bz5nVrkDiEFvL4oM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SslvQ6Q5; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=Pb/2T58E; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SslvQ6Q5"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="Pb/2T58E" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774356082; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zuUnYrn7bwO0mac59ZxE1hw62IH9LGSiNtRSChOD3es=; b=SslvQ6Q5FOi9pg5PE8E4ofHB52elKEekBRdgt5HoSTt5riE+UjyUAldWVHsIDT6DaPGLtR mI9iuUgrJ1o/8KqVnrFTUM07fFuucAt/PXDqUv7WpEB+fkdh5Zy3SwqsxmDrhYuH4afrmH tfl8U18zlqMqz9/QK25TSdLHqTtmlHk= Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-581-Nw6q2QGHOuev1zRxlVyRAg-1; Tue, 24 Mar 2026 08:41:19 -0400 X-MC-Unique: Nw6q2QGHOuev1zRxlVyRAg-1 X-Mimecast-MFC-AGG-ID: Nw6q2QGHOuev1zRxlVyRAg_1774356078 Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-c7385a1476aso3969217a12.2 for ; Tue, 24 Mar 2026 05:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1774356078; x=1774960878; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=zuUnYrn7bwO0mac59ZxE1hw62IH9LGSiNtRSChOD3es=; b=Pb/2T58ELXJ+pyuTUYhAXeIvg5vpztPyVa2Il4ASBFUjvBFnnmjUdek8RyLwU3HOww HDEw9oLz7XQR9y8EEXs2AKS4UyrGr+QbuQXHB5J88QZ9c6wNSQgjXHkwtDNKGhrdisKC Bg0K0Bljr2RwuqWdcoS4MS6ab26HvG00RXqEZ4X5EcBGvA4vGvY5jI9wO+8NFY18WFO/ huRNZppUC9KOkf0uVMQYXahh4fNt4iUKdJkKQsMd1dsQFS804/ONzhVmiI4V8daWQ7QD YZoixccYppx7AeKG5nVowRaRVE5/M31pLBe04CQ38qtAKMv1hKMJBz2u/02A9h+G0pnp CeYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774356078; x=1774960878; h=in-reply-to:content-disposition: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; bh=zuUnYrn7bwO0mac59ZxE1hw62IH9LGSiNtRSChOD3es=; b=njbYMpkJ7w7L5dqrpZ4F7HufMEuhwOATSGKRtbQzMSgjvISWhZ4oRQ0W/oas/1U3lw 7sBbCZfGMY0HxRGIYRIMKvdQGxStLj5m57ChTI/SEJmGFsnN5tIAswjobcVYXM3ks87l 8Z4aR88whk7NqlC3ofbe6OIpYB0gO0q1753rVIXkp73ejS8/EYCjcqowAfe+WzyS3p44 jv9dT4JJ4ImotWe9LypbPhzSAJnNGp8Ka28DuvKewxDSX2ag4DLzsXs00bAYnzf5a0Zg KkzgfyH/aV56IgbRiPcRbpyYYNIj3L5T8N82PW62kOA5fEFQzAg/r1SkYbPLrQNnD/TL orGw== X-Gm-Message-State: AOJu0YwUwwTphgMot39Im9W2yN6wa+Xt8VoxJx9CX2br6CuL1JkLmOis mHWXQp/LGGir2Rh+BB3kDJHlvZGzRZaJ72JRKDVhqGDBCGHcwKZu6qr5cMcKWJPgYJK91JoGUSA tnhl5XZNmwvWVNzkSIY8TVAbmtta9Gjg52R2+obA72SyetqfEutST1lBwsb1A3VIs/J/KFrayQQ == X-Gm-Gg: ATEYQzzlPLBgQ0PDDoEe8SS7tA+KvXsWFgMGKq2UJrWm+8YaT8lhQNRRZAnv12dvyfp +p+vEuwu1rV5CZqC3vwYewmghJIjFq65KCwib5oxSyKZXTDg09GcBztso82tzlIJHaZ3gXDT2Kv Vp0+PDCJWTNkDxjYf8FU6+C6pRQLNx8cPslreFDF9PkgBzJs6TFJSxOESQ57tK3X4yVSAmgB0uB /Df/Gmv6TJo0gCeBesPJ8PQcVmTJ8f2xnSEHGpToNhSNDtOVRun3iwupBwS74ChdtYkc2XAhqyJ Hck+EuAFs7gGwfm1Dyq0k7TDjKLbp6tr+lIOEvgQvRd9yGoqz5qOsG5+H7BESu3B5Lb8gs0maW3 a+wU8ce+gYkE= X-Received: by 2002:a05:6a20:7f82:b0:398:79a8:5bf4 with SMTP id adf61e73a8af0-39bceb41cc9mr14006023637.37.1774356077790; Tue, 24 Mar 2026 05:41:17 -0700 (PDT) X-Received: by 2002:a05:6a20:7f82:b0:398:79a8:5bf4 with SMTP id adf61e73a8af0-39bceb41cc9mr14005992637.37.1774356077342; Tue, 24 Mar 2026 05:41:17 -0700 (PDT) Received: from fedora ([49.36.108.16]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c743a938aebsm10432562a12.17.2026.03.24.05.41.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2026 05:41:17 -0700 (PDT) Date: Tue, 24 Mar 2026 18:11:11 +0530 From: Arun Menon To: Jarkko Sakkinen Cc: linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, Jason Gunthorpe , Peter Huewe Subject: Re: [RFC 0/4] tpm_crb: Add command and response buffer chunking support Message-ID: References: <20260324071803.324774-1-armenon@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Jarkko, On Tue, Mar 24, 2026 at 12:41:26PM +0200, Jarkko Sakkinen wrote: > On Tue, Mar 24, 2026 at 12:47:59PM +0530, Arun Menon wrote: > > The new version of TCG TPM v185 (currently under review [1]) supports > > sending data/commands in chunks for the CRB (Command Response Buffer) > > interface. This is in line with the initiative to support PQC algorithms. > > > > This series implements the logic to send and receive larger TPM > > cmd/rsp between the linux guest and the TPM backend in chunks. > > Currently, the TPM CRB driver is limited by the physical size of the > > MMIO window. When userspace attempts to send a payload that exceeds this > > size, the driver rejects it. > > > > This series introduces chunking support. The driver now checks the CRB > > interface capability for CRB_INTF_CAP_CRB_CHUNK. If supported by the > > backend, the driver will slice oversized commands into MMIO-sized > > chunks, signalling the backend via CRB_START_NEXT_CHUNK, and finalizing > > with CRB_START_INVOKE. Responses are also read back in a similar chunked > > manner. > > > > If the backend does not support chunking, the driver retains its legacy > > behaviour and enforces the standard size limits. > > > > This feature also requires the QEMU to interpret the data in chunks and > > forward it to the TPM backend and subsequently dispatch the TPM response > > in chunks back to the linux guest. This is implemented in [2] > > > > [1] https://trustedcomputinggroup.org/wp-content/uploads/PC-Client-Specific-Platform-TPM-Profile-for-TPM-2p0-v1p07_rc1_121225.pdf > > [2] https://lore.kernel.org/qemu-devel/20260319135316.37412-1-armenon@redhat.com/ > > > > Arun Menon (4): > > tpm_crb: Add definition of TPM CRB chunking fields > > tpm_crb: Add new wrapper function to invoke start method > > tpm_crb: Implement command and response chunking logic > > tpm: Increase TPM_BUFSIZE to 64kB for chunking support > > > > drivers/char/tpm/tpm.h | 2 +- > > drivers/char/tpm/tpm_crb.c | 194 ++++++++++++++++++++++++++----------- > > 2 files changed, 137 insertions(+), 59 deletions(-) > > > > -- > > 2.53.0 > > > > When QEMU has the feature available? The QEMU patches are in review at the moment, here is the link: https://lore.kernel.org/qemu-devel/20260319135316.37412-1-armenon@redhat.com/ Hoping to have them merged soon. > > BR, Jarkko > Regards, Arun Menon