From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=44.246.68.102 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796112856; b=u+0hSerupHsI1BHhsPtP83a80CbQGHLXvueiCtGjQfGWTRXTC+tB/ZfggZ/7lfscbtCW /NlxCLGYX+MK0+ylPSxXUzUZhIqhob9/nd6N2gZbqATFx2hv5bb2ag6LDsN9is9qCb+LD nfdCoxB/spd4AZOgKdbLlvaV6uQqqu5oeyrgUacIe3ij5ENQrnlOcyJg05PvQPTDQChAk WKTDoOVWRJ+fy1QzROKZEvs949CP5sUH2H20OoUpgAVfLs4wZ2jo9LsIUWHuNtfdkzo2Z EGZkMFvwZozt26uZKbIZ7OldLSBQzvy/1W2lRgqaCTpCmeVWwqzZdNCEtTy/kOcQ7Cg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796112856; 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=6j5wvMDbBNj95+9R6vi9RyZgfevV5AFAL3RfJLOKUbA=; b=FUCMemx9mNaDAYbXxQxxtfYrArjdNy+uZeJ8q23DAVD90e/2O7Jigj30ZhTVl68WAKQ1 uziaKYmDuAW6r2NG47BdZXBVdwJLpTaY71KaKBQouKSIdMov0ahK92mrtU2yI/NPDiFGS qXkuD6pMagPmyVr+wiE7d0SPTefC81zIFcB0Jh94XRb5Y9kYjaSD5aXyC45If3bfXvPQt GXRuH34hBSmUZCQoyfIZx+cPcASuC3zWEJw3p/kM+o4sbiygfCnFn+6lm1x8c5t8uO54X Sm900dATSCS2luLm+Y8cXB38ZbFV7M9I6hORO8reFDJfVA6K0ZKtIkeh6ZMdnSguG+A== 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=HbLNRmSo; arc=none smtp.remote-ip=44.246.68.102 Received: from pdx-out-003.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-003.esa.us-west-2.outbound.mail-perimeter.amazon.com [44.246.68.102]) (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 03E13606A325; Tue, 1 Dec 2026 08:14:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 03E13606A325 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=HbLNRmSo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1796112856; x=1827648856; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6j5wvMDbBNj95+9R6vi9RyZgfevV5AFAL3RfJLOKUbA=; b=HbLNRmSoouFSZk8wU5ogA0uARzDw8LXgTobsFPqs/0MwKjujuT7+Ab0M XWPZQj8ym33h6qIMcQUIur9oD46aHOkUrxkkhLC/v5Gm2jllDUnlp/RUw X13snFzkCB3XDzI3kLPCEogadOhZVVo8QaNR4EpUZrGjp6smi9r2KhjZu e21UWuzH/z0VDNtPFnrMXIg3tuyV0CvrM+cZqohpACUlsYDlhPphUmrlN ePMFqDr61lnH1Px1ghNs4bNXDlQ9Ym5hzk2jxuSgnLqROAHSGl7tsNktQ 2UGyapSdNe6MKt11wMW5FQ64zQxEJDRvERuJpY3j+wgJyJs10iCyW2WuG w==; X-CSE-ConnectionGUID: YdQxow4HSKmv+CivgyT1tw== X-CSE-MsgGUID: /FwSXbLmSYmaGQzzdo18ZQ== X-IronPort-AV: E=Sophos;i="6.27,244,1787011200"; d="scan'208";a="35483348" 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-003.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2026 08:14:13 +0000 Received: from EX19MTAUWA001.ant.amazon.com [205.251.233.182:10728] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.30.201:2525] with esmtp (Farcaster) id 16a9ac7c-4edf-47d3-9593-1a07ae36f57e; Tue, 1 Dec 2026 08:14:13 +0000 (UTC) X-Farcaster-Flow-ID: 16a9ac7c-4edf-47d3-9593-1a07ae36f57e Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWA001.ant.amazon.com (10.250.64.218) 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 08:14:13 +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 08:14:12 +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 08:14:08 +0000 Message-ID: <20261201081408.58562-1-surenkj@amazon.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: 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-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EX19D031UWC001.ant.amazon.com (10.13.139.241) To EX19D001UWA001.ant.amazon.com (10.13.138.214) 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? Thanks, Surendran