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 8287C3542CF for ; Mon, 27 Apr 2026 10:28:30 +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=1777285712; cv=none; b=lIGm8s+cfbpu8r40gzfzojWFYuYzIkm7F1Bs29++htFvGW4mwfbf09thyx2lz6Vw2ZpA5t3yJo+dCsZDGtxu2EoNEZV08x5gK2HiLP10MsOFe7VQcFJQEalpBYhLuM+W67zenLGns5mGkwHnhL/QH8Z50GF88lb7LD8JMYVzfuo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777285712; c=relaxed/simple; bh=cCt541ifea4w7PLLIlqaxiEyv36+ufAxy9BS7z7jNio=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QM5QPmIWKhIBE2bCliHiW5RpkrHP/wl1ZynpRXVMW6aucjAwO8djj6yqcdNGTYp/zNMmkEN6ETs7S6iBKTXoBNhnQq9VX4KBqZGrgZiYoeVrgPyGv1m8jrljp5oELunSU6x8PvvJN4LLRPiRNe3NU71aOlWLekhAzU7CCqLXDgo= 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=Q2S9+KPj; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=oiggHzA3; 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="Q2S9+KPj"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="oiggHzA3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777285709; 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=wKk6nuizBx2EkYYb78gjU7IxUoclGd/n9oduZdA/mLA=; b=Q2S9+KPjdtNgaHynQSmo4VGSjGlsh7tsYh99U5FPsI6ETtdXft/3cSR0jUKKf0s1weLilX 4+JkhL72FBD1FmRhyI4hfAuVqvlkXkI1a5BwkG8Vqj3z2j757pianlvPD6V8dg/9HV4BpV xJQElZXPV9a/cuUg/K1ZkDvPKH5Wqsw= 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-639-8nuVasQ8MK6UozF2_acKGQ-1; Mon, 27 Apr 2026 06:28:28 -0400 X-MC-Unique: 8nuVasQ8MK6UozF2_acKGQ-1 X-Mimecast-MFC-AGG-ID: 8nuVasQ8MK6UozF2_acKGQ_1777285707 Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-c76c6280732so11396642a12.0 for ; Mon, 27 Apr 2026 03:28:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1777285707; x=1777890507; 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=wKk6nuizBx2EkYYb78gjU7IxUoclGd/n9oduZdA/mLA=; b=oiggHzA3D6ID5/zbtSOK2HGj/lY9z7L+ESl4No9Iz3EwNRorBwLtHzp2UyRKBXmwK2 lnBDJUVtQUxOpSthYe2swUjeBhqZxA933OKJuMk/Kwhhp4XZv5NYaErDbnjDbj+wyeF6 3jcXcjvJVsgd7QoSm126qfpWdFR9Z1P18GsDqBk3B24hKVvKVz9XGKNb1tiKCt1VrBFJ YOKGAmjFdjrG22imnrD9UeJkeosfM8qH4G70BRriSlopSIalm+dOLVICNfquLt8V0baQ ZGCIs5xdVUDPD7pjGue7pU4JSfACa9GrMiXTImh487qv/hTaqNJ6sM7pNH4Xyw25d9VR SsBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777285707; x=1777890507; 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=wKk6nuizBx2EkYYb78gjU7IxUoclGd/n9oduZdA/mLA=; b=ffc+Lsq011eDLkiJHq/4RHZOqyu/LwtILQY1p2dW4DPXy1ppgdIZXdJEoNh3NH76vF cIBfgwWt4jQp8TOyGpgvl1V405pT308cVIr7s881VRVqS4lqQUBxE3y36aLBxxIHWgYK /HTc26GEw6VQmXmptKqRR42CUAqIlaZYonL2qKe4jUrPPPBcTrrufix7jNK8PCsYSeKc QZr52k9NNEkw6GdTZIddkv6L+cwJcoTpGSotINwETMRTneZW68qLF/qyhvWviAXIBsfQ ZUipzTQrr+wt2U7qUi1Q0CFcf+rwNaiqp1DhmUaUmzMSSaDuL66QLU3279iTAzx4s9on sd+g== X-Forwarded-Encrypted: i=1; AFNElJ9LaJfUH34F3sw3UGGBESphrzMTM5p5dV+Ul0AeHoQgXVzIdAxI2cL+l/tQbd4mHZRlyOGzKE07GmkXFZ4=@vger.kernel.org X-Gm-Message-State: AOJu0YwFbBUwRZxGT2fAv+Z11cyxPKyE3M1FcAI4xLEObJ1lJKqJjheU kAeYJbQVPIy+fDohJ5/jJw1QtC49DtaK0fcbuu2+oFcgiOB1fGjddw63iJpJzIp2zMgzWmuqPaf 6vqTnh6A+xa9Iu8X01uCy7OGYWzZ/913+rT8WVU86e0NymP7A96TQeoeGBBuJfdCCiA== X-Gm-Gg: AeBDievvY/houix0yZgmmHxIFOVPPe8PWUkpx9/lL3SoODkVLKiF/qWO9cXz09b1mkk XOn0D/9Gc8UVmQ8cuBBDleIZ0feM+SGwnU4GTT3VWTXplRblvx1dXvPJ+w/crPjPdbnuER9AE+t J3AVWTiD7+H1OBzyZLlCmaguIOaMCjnEDwHgiscbH/ZqgjoM8Rb+RiSguxm5T6Zike8ONKg98lx 2pbqrHRV4DyLeRTrArCUYGkzg0+AcfErj6CVEksHRIjhHDU3a41OVEKgUhAqXcRXAmkEwhjbOZm yiFNJ12OqJwwAdEGcDNDEz4YiQ+PT0KY2ML/gQ4BTUSq7PN89OL4vPHNX1uSfLWruhY6UCHDUyq JlpJIXWHARSpRIhVB6cH/+xw= X-Received: by 2002:a05:6a00:845:b0:82c:20ba:1570 with SMTP id d2e1a72fcca58-82f8c9024a2mr46748899b3a.29.1777285707188; Mon, 27 Apr 2026 03:28:27 -0700 (PDT) X-Received: by 2002:a05:6a00:845:b0:82c:20ba:1570 with SMTP id d2e1a72fcca58-82f8c9024a2mr46748873b3a.29.1777285706718; Mon, 27 Apr 2026 03:28:26 -0700 (PDT) Received: from fedora ([49.36.104.184]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82f8ea0098fsm31558014b3a.24.2026.04.27.03.28.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Apr 2026 03:28:26 -0700 (PDT) Date: Mon, 27 Apr 2026 15:58:11 +0530 From: Arun Menon To: Stefan Berger Cc: Jarkko Sakkinen , 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> <7fa63e8a-1ffb-4dcd-af01-0811768ecda9@linux.ibm.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: <7fa63e8a-1ffb-4dcd-af01-0811768ecda9@linux.ibm.com> On Fri, Apr 24, 2026 at 04:54:03PM -0400, Stefan Berger wrote: > > > On 4/23/26 6:43 AM, Arun Menon wrote: > > On Wed, Apr 08, 2026 at 11:34:54AM +0300, Jarkko Sakkinen wrote: > > > On Tue, Mar 24, 2026 at 06:11:11PM +0530, Arun Menon wrote: > > > > 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 > > 64kb? I am only increasing the TPM buffer to 8kb. More does not seem to be > necessary. That was a mistake in v1. I have changed that to 8kb in v2. https://lore.kernel.org/all/20260324181244.17741-5-armenon@redhat.com/ > > > > > > > > > > > > > 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. > > > > > > Right, and additional question: what about swtpm? > > I am waiting for https://github.com/trustedComputingGroup/tpm to show rev185 > with PQC support so that I can merge my patches based on 'their' PQC support > into the public libtpms repo. > Regards, Arun Menon