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=1796128875; b=Z9kU/5gXI9YYwb4D+PcZTO9iWS7rGcfto6KUiiJPfg2pEQSCsxKaDjMxDIjIALs+CHhe MxTPemAKJrA75MtMQxCNCT0Ya/AzzEM0x1va3/7ylfirm/wiFl15Gkc4v/ilu9q8S9GDR l97Xist7vb2+JEQsd+DO+Q7zX0a4pZYYZxGiw8k9GgNQc7UtHm6IUOFOgbYXyiYzuG6vP zocORE6ItH+i7xdcJrhnCkURCP0Ixdc2sBwgwCeJTFQqMZS7CpGk9Qnw3cTXiqmZaPyLb HtgCZwhjr4f2GdELoeAc232Pg27UZeElp/QmQC1l94Z/ajzKS6zmdGHlrdZm+tuGCDw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796128875; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=anL//o9ii3y3jnMbkyJZeEkGpAd/3LKyzzynwZafWZY=; b=l3FVqZA57JFb+cpU8aDS/4Q/TY34GvtdqnIY27+nFr8uoZg/bXMAkfs8IdCzrpIbV494 vlmIJR7fubS2fWSBL2IV3bOuN5NNDCxOPDuRe7zOgn2a4roBrD6gtEOAzm6bGeKophcuc wIjZ6Ndi6BFYfnZdM4Fk9m0XU7CKN63rsxgTHEpcEedqzNyDgY++JYTQ0eg6dckC5oCNd rEniKvRoosJLhANqgWEgvH01Ne5XRDLgMfhe/FQHKcPR72CqJ1nCfDrqXOM0sbzmq+X+k VurSC4AQTKXunFipvP6r4PE1Pk2Abo/9AnJypELaIzmt10koNay2s1TSmx1zGg3OFjw== 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=fnmax5ZE; 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 UTF8SMTPS id 9E75E606A327; Tue, 1 Dec 2026 12:41:15 +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=fnmax5ZE Received: by smtp.kernel.org (Postfix) with UTF8SMTPSA id 9EFD01F000C1; Tue, 1 Dec 2026 12:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796128875; bh=anL//o9ii3y3jnMbkyJZeEkGpAd/3LKyzzynwZafWZY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fnmax5ZEhIFhoSeqoTwnC+uFy2NwTOPS8JmCnlzO4bbxpCPQxYPlO392/7jfbva6z PW4XvYbs0FliJtL78LUq0d2vguk5xegVtZ6l6gOg0CXr2kcXCMfS6/tVHrxmAs+0YW chur6T6kxfmtT4Gg3z4NJRJhJ9xlkeqmSNGZR0tu3E3dLQOccuGLPYiy8c9CIJxRC0 QIMNTJB/XduTQprZ2a591qVxruJR+uiScvoVcoMpcPwmJs34kEPMLx2+E2YnRqiFCw AK/U+avrIcJ4y2D0oBk4ANwzN3gwM/ixhIVmZ58Xjv5ZL1lWwu3voGXOztpSAU8hAU 2F9yX67SGjAyw== Date: Tue, 1 Dec 2026 14:41:11 +0200 From: Jarkko Sakkinen To: Surendran Kanagaraj Cc: corbet@lwn.net, graf@amazon.de, gunnarku@amazon.com, jgg@ziepe.ca, joshlev@amazon.com, leitao@debian.org, linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, nh-open-source@amazon.com, noodles@earth.li, peterhuewe@gmx.de, rdunlap@infradead.org, skhan@linuxfoundation.org Subject: Re: [RFC PATCH v4 1/8] tpm: Add a single table for all TPM wait limits Message-ID: References: <20261201081408.58562-1-surenkj@amazon.com> X-Mailing-List: linux-integrity@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: <20261201081408.58562-1-surenkj@amazon.com> On Tue, Dec 01, 2026 at 08:14:08AM +0000, Surendran Kanagaraj wrote: > On Sat, Nov 28, 2026 at 01:30:15AM +0200, Jarkko Sakkinen wrote: > > On Fri, Nov 27, 2026 at 10:23:47PM +0000, Surendran Kanagaraj wrote: > > > Yes, that should work. Something like this: > > > > > > struct tpm_cmd_duration { > > > /* TPM 2.0: command code or TPM 1.x: duration class */ > > > u32 cmd; > > > u32 duration; /* msecs */ > > > }; > > > > > > /* in struct tpm_chip, in place of chip->duration[] */ > > > struct tpm_cmd_duration durations[TPM_MAX_DURATIONS]; > > > > > > eg: > > > /* TPM 1.x */ > > > chip->durations[0] = { TPM_SHORT, 750 } > > > > > > /* TPM 2.0 */ > > > chip->durations[2] = { TPM2_CC_GET_RANDOM, 2000 } > > > > Hmm... in theory TPM 1.x commands could be "normalized" to have same > > format. Is that because of sysfs files? > > Yes partly. It's doable. I agree it would unify the format nicely. My > hesitation is that the per chip copy grows from 3 values to 123 > entries just to match the format. Also the code paths which work with > duration class - sysfs (stable ABI), vendor overrides etc would need > additional logic. Would you prefer the normalized version? Memory consumption is not a concern here. > > Thanks, > Surendran Br, Jarkko