From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=35.155.198.111 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796139413; b=aH41w/rGaFLaCWZjBqBpbZ3DKt5h+nAkW1+4UsBslpY7jInlhcnaNeyf6Em3wwtf556l rvc1p0bAg9z38G4pssZZOnxFaOfpnaXw87IKJVTBN/r8s+KqMNwWRynz4t5oU5VRdh++L v+c8J5kdQsDdRsT2WeYrNx0ujlk4tBz+lJjkhwOMFA07tCzQKcePu0X0fftDT4bVnWPxn FPxloEi91yxTyRFoNilEA3AqCBcEGHJU/+z6JOakOLLLOidnj7Rmd8UWOJ8fmYyveUZrh v1IIizNZAx7FwYq3yanMFP6Bkdu9yKCxr6LLNfXAgEejLKVFLjWCQOeIss9uANo89rw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796139413; h=DMARC-Filter:DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID: X-IronPort-AV:Received:Received:X-Farcaster-Flow-ID:Received:Received: From:To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type:X-Originating-IP: X-ClientProxiedBy; bh=MtQvWvV0WEUFIjiGcDU+uA3GqxvLvSsPVTz7LapUkqA=; b=jKswIe33hokPPk44lZ0VmDih4ZqPwytTA2O6yq6OSdHU1lhB38txy5WMT/fV8bjhWL7z BQex166Qv+2AKgpz47PBx9bo/rMUFtDsQ8+n8a5GfB6bsqbnW2Fay/Rr3Pns8u302tAZt IvxKDopmAQZ8VbiFM/7ziXcaJwXmrafvZb1EfgGHLecltiGjAQ1qWZ+PqZM+v8bROMFuB aZLnn8Hx+YUXkNpNJ4b4qf1xr4RzVc8LLctUpBCCtq6s4maL8sAm8LFsyLw6d7NCRZl89 Rcf6HwElnyywD39alrlf2cbB6cbvxs0TraMJ8uAOFy0FUuNlcIzQRLePf8fvYvDuzeg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=amazon.com; spf=pass smtp.mailfrom=amazon.com; dkim=pass header.d=amazon.com header.i=@amazon.com header.a=rsa-sha256 header.s=amazoncorp2 header.b=mtvda1ny; arc=none smtp.remote-ip=35.155.198.111 Received: from pdx-out-009.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-009.esa.us-west-2.outbound.mail-perimeter.amazon.com [35.155.198.111]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9194B606A31A; Tue, 1 Dec 2026 15:36:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9194B606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=amazon.com header.i=@amazon.com header.a=rsa-sha256 header.s=amazoncorp2 header.b=mtvda1ny DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1796139412; x=1827675412; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=MtQvWvV0WEUFIjiGcDU+uA3GqxvLvSsPVTz7LapUkqA=; b=mtvda1nyuV0NLjewmv6vjNsdR1OqNYRFWZGzpHiw8lJfLBtUBXs/JkPP 29Qo4vVHWh9034atV1DOEfUkaP3pXVS4dNZCbwz5f+QW+LZn5R1I6/cu2 99lXxUi6vKnC0xeplgNkDuEnBwnu19TA43mETwT7VObzTYcn68uTFwBq7 X/VcCSM4Mj0aqmequtOgGVJzBKmRZr6gUdL59I+NHKnQ+8MADsSv5V/w9 OwPjUWwlmKSooT3NpB2Qt7SkZm8zqsnnTwtx2tIfMT4WXjohX8r7aJ2rK mekQ3Qrs/IVNPYXNli2K7V2x7MhtoMt8smUcJWXmBa2OZIX+ilh7cbXIL Q==; X-CSE-ConnectionGUID: 6eIdyZWIS++eOVRFlSqBpg== X-CSE-MsgGUID: OCY9Z1q8SUuRjoiS69UVxg== X-IronPort-AV: E=Sophos;i="6.27,245,1787011200"; d="scan'208";a="35527988" Received: from ip-10-5-0-115.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.0.115]) by internal-pdx-out-009.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 15:36:49 +0000 Received: from EX19MTAUWC002.ant.amazon.com [205.251.233.111:4145] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.42.230:2525] with esmtp (Farcaster) id 91c3eee3-0a84-4e0d-a4c5-1d42bdacaecb; Tue, 1 Dec 2026 15:36:49 +0000 (UTC) X-Farcaster-Flow-ID: 91c3eee3-0a84-4e0d-a4c5-1d42bdacaecb Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC002.ant.amazon.com (10.250.64.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.57; Tue, 1 Dec 2026 15:36:49 +0000 Received: from dev-dsk-surenkj-2b-416930d2.us-west-2.amazon.com (10.169.26.94) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.57; Tue, 1 Dec 2026 15:36:48 +0000 From: Surendran Kanagaraj To: CC: , , , , , , , , , , , , , Subject: Re: [RFC PATCH v4 1/8] tpm: Add a single table for all TPM wait limits Date: Tue, 1 Dec 2026 15:36:43 +0000 Message-ID: <20261201153643.7137-1-surenkj@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EX19D031UWA004.ant.amazon.com (10.13.139.19) To EX19D001UWA001.ant.amazon.com (10.13.138.214) On Tue, Dec 01, 2026 at 02:41:11PM +0200, Jarkko Sakkinen wrote: > 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. Ack. Thanks. will post the next version with this idea. - Surendran