From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 8B1301F3B8E for ; Sat, 8 Feb 2025 20:30:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739046600; cv=none; b=p3uxnT3p8YLh60PwFU/bMCfvjyx+B15ilZO4jQ7XUJY/SqKDojKPlyZLo5YdmHCzxWUBGzwYYLF/RLNocaQpMCHj6Diix3Qh3dpJdSZNNsBXtvb2y+o8Tx+ZR3C3+Y862+ngYU1UKx+mEgxO7CYYgCoJPRKYoylorkEPC4+kJME= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739046600; c=relaxed/simple; bh=/781yYJ885NLwOSDqG6CpgJLxjNHZvuehQPyaEmZA5k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sgkKEStC5YfY8h2nAT0k2Jey927wTA/2YlyqMlKvdWR52T40bV7wxygLYFapg1f6Q6BDHqBOmM59N4lnq/lFrNjtM2BcPgi5w8coc5pI3Gq9nJAHyolhrqfNi1o7SO7ecogIM/nKisKTldWNHxBXSabQ1fV2DzJ9LVkxUDnVx14= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FJh9vgAj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FJh9vgAj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D12C5C4CEDF; Sat, 8 Feb 2025 20:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739046600; bh=/781yYJ885NLwOSDqG6CpgJLxjNHZvuehQPyaEmZA5k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FJh9vgAjdtaSuNhb2hOlvUEeixv2OH1IZy3/bMYjDtJpOJkmFFqMJh9XvUo/m+jGO czw/ma2BpTArPS2XNXFqqrojT/YWEdgmbK9ZfunJ547gsxzGTOSpH/FrAOkruYbZIf jJsrx/7QnDhFS89/rXQHa15r0BdoKWBre9IOJwqdsXqLLSCfRPcaT+GyE+5ULRGFN6 srz+kM022hk+2mosarG4LOZ4i9r8KqVXaFLlavktRkzBTkG3WRYOPtD1BirVDuEi6J OdJMlToF22CPUI+/sH9J3aJbwhZXPclbmaRMv+vbFhkDhWV7S75d0neU4jHxGPTcRf iZsWB4Zd0xXdA== Date: Sat, 8 Feb 2025 22:29:55 +0200 From: Jarkko Sakkinen To: Jonathan McDowell Cc: Michal =?iso-8859-1?Q?Such=E1nek?= , linux-integrity@vger.kernel.org Subject: Re: TPM operation times out (very rarely) Message-ID: References: Precedence: bulk X-Mailing-List: linux-integrity@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: On Fri, Feb 07, 2025 at 09:26:16AM +0000, Jonathan McDowell wrote: > > The whole arithmetic with timeout_a/b/c is mostly gibberish and could > > be replaced with a single "max" constant without issues (just set it > > large enough). > > > > They could be all be replaced with let's say 3s timeout in a constant. > > This appears to have come up before: > > https://lore.kernel.org/linux-integrity/358e89ed2b766d51b5f57abf31ab7a925ac63379.1552348123.git.calvinowens@fb.com/ > > That patch was deemed overly complex and it was suggested to split it > up; I can't find any indication that was ever done which I guess is why > the discussion died off. Looking back I suggest splitting timeouts and durations into separate patches: https://lore.kernel.org/linux-integrity/20190312145553.GB6682@linux.intel.com/ > So just to clarify, this more recent patch is working around a situation > where the status register gets stuck and needs a complete retry of the > command send - it's an Infineon errata, not something that would be > fixed with a longer timeout. Hmm... please shout if I ignore something but if we could -ERESTARTSYS semantics here that should ignite completely new transmit flow, wouldn't it? I'm not seeing this locally so far unfortunately. BR, Jarkko