From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D037C433F5 for ; Wed, 11 May 2022 20:12:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347342AbiEKUMy (ORCPT ); Wed, 11 May 2022 16:12:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233913AbiEKUMX (ORCPT ); Wed, 11 May 2022 16:12:23 -0400 Received: from bedivere.hansenpartnership.com (bedivere.hansenpartnership.com [96.44.175.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F1B71F7E1D for ; Wed, 11 May 2022 13:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1652299940; bh=TZ96nFUoy4ItquLnLGZHQelrrGX6tD17Umvjt9VhEhY=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=YOOLwxWOb4hts+xt6qfaBLK/YsoOjxmOESibSpoI5avvO7W19GWtrxYM5nJv2vJRH 8eipurpo1VMGoze3LmKwhi3GjrkEl4l2CMMcZ93gyf2j78Q7LZQicFyRW7gFrhol7P 5a3pQY0mAg9Gi/bFhu0FOsInlXKttItxv6JTmmmE= Received: from localhost (localhost [127.0.0.1]) by bedivere.hansenpartnership.com (Postfix) with ESMTP id DB4761280D84; Wed, 11 May 2022 16:12:20 -0400 (EDT) Received: from bedivere.hansenpartnership.com ([127.0.0.1]) by localhost (bedivere.hansenpartnership.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4DfTenkQ6VpM; Wed, 11 May 2022 16:12:20 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=hansenpartnership.com; s=20151216; t=1652299940; bh=TZ96nFUoy4ItquLnLGZHQelrrGX6tD17Umvjt9VhEhY=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References:From; b=YOOLwxWOb4hts+xt6qfaBLK/YsoOjxmOESibSpoI5avvO7W19GWtrxYM5nJv2vJRH 8eipurpo1VMGoze3LmKwhi3GjrkEl4l2CMMcZ93gyf2j78Q7LZQicFyRW7gFrhol7P 5a3pQY0mAg9Gi/bFhu0FOsInlXKttItxv6JTmmmE= Received: from [IPv6:2601:5c4:4300:c551:a71:90ff:fec2:f05b] (unknown [IPv6:2601:5c4:4300:c551:a71:90ff:fec2:f05b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bedivere.hansenpartnership.com (Postfix) with ESMTPSA id 393B11280064; Wed, 11 May 2022 16:12:20 -0400 (EDT) Message-ID: Subject: Re: [PATCH] tpm: sleep at least <...> ms in tpm_msleep() From: James Bottomley To: Johannes Holland , jarkko@kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Cc: peterhuewe@gmx.de, jgg@ziepe.ca Date: Wed, 11 May 2022 16:12:18 -0400 In-Reply-To: <20220510112902.23213-1-johannes.holland@infineon.com> References: <20220510112902.23213-1-johannes.holland@infineon.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2022-05-10 at 13:29 +0200, Johannes Holland wrote: > To comply with protocol requirements, minimum polling times must > often be adhered to. Therefore, a macro like tpm_msleep() should > sleep at least the given amount of time (not up to the given period). > Have tpm_msleep() sleep at least the given number of milliseconds. > > Signed-off-by: Johannes Holland This seems to fix the problem I reported years ago with my Nuvoton laptop TPM. https://lore.kernel.org/linux-integrity/1531328689.3260.8.camel@HansenPartnership.com/ It probably needs to soak a bit longer to declare victory (this timeout failure is very intermittent), but it looks hopeful. Regards, James