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.133.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 6648D3CBE62 for ; Tue, 24 Mar 2026 07:18:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774336703; cv=none; b=OtEBJN9EfayDvLOldpUfA4ieI5cDTZGfaptDCLle862lj4SYzVUBF/sfDhVOYKxYAcBybjWrA220TYT5nq3u70NJjd3d9wwKUevtSOKOy1BqZhuP1CXJV7KTAao6q8MgvL5BZfR0NpZ0VU2R1U5yHWJiPRsoGvcSVc40OWy8+Xw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774336703; c=relaxed/simple; bh=Jn7gNVg9GB7dWXhaE46VdMNVjktobpOIqL4TU91Jpx0=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=qUwc1ZXVBN5zelr+eOdwZfrvaua1hBaegahE02PDGmdIDoVpv6kWe8S1uQUprxp1Q9QzA9sYmcU2EmlasC3h8xS4Fwq2W5T3EeTSqqLSFkJ5oIFLBIKFkEW87zw1QHnEupU8drO80gp+D+9sHqv71dRIff9/CBU6JmG1czp8KxA= 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=JFQma027; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=YNJhoOgz; arc=none smtp.client-ip=170.10.133.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="JFQma027"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="YNJhoOgz" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774336692; 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: content-transfer-encoding:content-transfer-encoding; bh=rxka58srL6y3c491qO5tkLvc0iWe4GgxBpI5GmdBla4=; b=JFQma027X47Lmc1tAuxzfTn5fopw2eq/lQvy1yFlqUKo7kBpk0JjUyVyeh70Qfg4coR2pd Nwh+fbp1dSadXShjyA2UXnAsBnSE+8A1hkHWpbjENydJKMP2QjeR9HqiLlJk6Sq66y/iBL 3jrS8DAb35ueutyq+yQSIJw+njKSbSY= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-66-4UHYiOmDMNqfFGwyeDMaVw-1; Tue, 24 Mar 2026 03:18:10 -0400 X-MC-Unique: 4UHYiOmDMNqfFGwyeDMaVw-1 X-Mimecast-MFC-AGG-ID: 4UHYiOmDMNqfFGwyeDMaVw_1774336689 Received: by mail-pf1-f198.google.com with SMTP id d2e1a72fcca58-82a782029b7so2852357b3a.3 for ; Tue, 24 Mar 2026 00:18:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1774336689; x=1774941489; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=rxka58srL6y3c491qO5tkLvc0iWe4GgxBpI5GmdBla4=; b=YNJhoOgzpJLLW7O9clDB7J92gNdYUE4HR2sYh4xdlZwehf5XkUQC4gBGXQgc101Jcc fD/e6vpOgS2iWlJ8BVjtt/5OYsIlX3c8PNZ1bHCZqCDAkpFaNvzxUDK55AMYizJug85h sUm8D2nMuYFj9hj+l3std9k+eouDptRSUC2IEATTlsWAwvwFFutcObVBUljuFDC/nasQ srt0VZtBJzix7eARfoW4LuxZRpsRIkGUBUKasI19EbqWsst5dvuYTpGVTZ7CT/NtY/5t xGlXj9Exdn4r/NA/tJ3NEUill6ddt+P6Rwo7ZKz7wmfXce4MTNdjSBsE8vfJh2J1vdUn kYcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774336689; x=1774941489; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rxka58srL6y3c491qO5tkLvc0iWe4GgxBpI5GmdBla4=; b=PWqpRR2Fpa2vMODq2wxnYe+628GjII08RqnUBzu/KXECJSusD6oQ+pB0hXBvOHGBx2 BrvQ2V/eFcA+wsW7/Jz2y4MY6cMJV5NKKEGO7CoGZJwYG8e9dHgzqwsJJLPEQdr6pB6G HqEoOgNDJutiLQFluP2CDlodAxlJ2V3nENB5dy/zOwSa3bGaJwPO/SgXBUSAgjsYyTyL Bs8DCYMKjh7lrnNjl4cKfWSQoVyoZcbyAjADkYP3na57Fd2ozSQg9pbnCW/9z0dC++0w cAc4AATwoemxvRbfh9hqqN++FOU6dA07tlgLc3tVUHtqWPLPAw26gd9svDrEPp/GD4QK SX8Q== X-Gm-Message-State: AOJu0Yx4gnYUcrn7TSv04bi3Hi7979hztMtlEjm7ZfRH5M1L3CCvw0rm 3eenCYRd3SukL1pFPkxiIzel3bxuwOYuydyOp/WCeOvsXXL0zEc0UfsK+gkKqet4i0NkR2XN1VQ oVySopNUmn7TZhEubTvBubZItqWNgHrKfLzDAhEQOm8VntosT81PeRk8jT3+lgq8lvOg8MDXZVM pr7acr5Ls83B1TyVJQkV4mhp/DFfB+zsGl1Rw/9oHyeWKLgieC X-Gm-Gg: ATEYQzyHMGL3jcHTmf6h/OlNaWmzirwemBrJRtdUxCxRV3czvtNfDYopHpjJvjKerQx 8te0F32tkcmojXOwlbHjXiPLx1OIzjaw6Wqr2nfgBLHuc85tb0T+B5RliaSpBjFByJDiKtZs55/ 5hcceuVYxzN0HqcbcvXeVbT9dwVbhXxGpIJjdAc7TnOweklanfWWYbyTdahUajQzyM9yKyvTOgc W9DfAYRhmS/5qN5Aja2S6f6F46BgH6EKHtBnM9Bmnk5Jsg9+fJMruZmSKUFEphIsqKgx8WTie/o bUQUbkbODixDXbRyuZ3vdlpOf6UWcRuDbwgTpk4ta4f94mulsnS3s4TkxqxwxUbDplq5O2/sCW/ AhmwWN4fOeD58vwHI0SQRKdyWw35zLGC3OmSoJq6doGTqeg3/oGas9SyM283LVw== X-Received: by 2002:a05:6a00:9505:b0:829:7fff:eb7b with SMTP id d2e1a72fcca58-82a8c397837mr13641037b3a.51.1774336689101; Tue, 24 Mar 2026 00:18:09 -0700 (PDT) X-Received: by 2002:a05:6a00:9505:b0:829:7fff:eb7b with SMTP id d2e1a72fcca58-82a8c397837mr13641004b3a.51.1774336688575; Tue, 24 Mar 2026 00:18:08 -0700 (PDT) Received: from fedora.armenon-thinkpadp16vgen1.bengluru.csb ([49.36.106.26]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82b0409c681sm13597766b3a.37.2026.03.24.00.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2026 00:18:08 -0700 (PDT) From: Arun Menon To: linux-kernel@vger.kernel.org Cc: linux-integrity@vger.kernel.org, Jason Gunthorpe , Jarkko Sakkinen , Peter Huewe , Arun Menon Subject: [RFC 0/4] tpm_crb: Add command and response buffer chunking support Date: Tue, 24 Mar 2026 12:47:59 +0530 Message-ID: <20260324071803.324774-1-armenon@redhat.com> X-Mailer: git-send-email 2.53.0 Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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