Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp500412iob; Wed, 11 May 2022 20:37:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysbbBwxtgGTp+/Hq5RhuOMTZ1Nvsfoc1jsUacvoD0fQ+4j/Mrk8poS5BwiIkaC876L3st5 X-Received: by 2002:a17:90a:ce95:b0:1db:d423:4b76 with SMTP id g21-20020a17090ace9500b001dbd4234b76mr8602610pju.90.1652326668120; Wed, 11 May 2022 20:37:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652326668; cv=none; d=google.com; s=arc-20160816; b=OQlhswTR3jtZLMvhIepm9ET3IlA0aS9bgZKwHsg1A4MTkAM2zRSIeBKkhXkIXhTYw6 +llcL3GOHBqlfs1ANSZNOMhiVY0ZWQSQIPC+8q4yqIba6/BheGQTtKw2nJalklx4UX4g dY5ry+9JsmuzpF45TE1GeBHcijzwReDMnOPALlQlVOLSI5wHwTDhELnUiHzuzG727aQP CRSiv61Kw1txa3t2etGOvmUgwl/Rd2SgMvKfYjqK9jc5dGnc21GsRl6QO4RV4s09UoFV zXYa+sF2wf6MKbStqCB3IhpaVBxhDDniGGtaYtTg3zL5wTXqGLEuUXjU/CPaQKBc5bhI iE6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:dkim-signature; bh=j2qWQVDd+KKhbXf88/Y4gsVVv503+2oZ5UbB9hWU3NE=; b=SPyP9W25otuw6cmYLmEtXPi9DUSBuGOjtXTGzR4/fSzh6+JqGUpEKSh27MBfQr6NdL rIDSrPmbuJdK2I7thNEU7DRs758UMSZ+6TeYH882eEQrgFkcB813mpdC4AooT7fOp4Pn v+GrLibgfuP62GbH6GUQQcsSYkTbnoceY8jKVM4S9P2yjyYYrYAcW5Mqv9XkbhtX/sDX A35Pc3HZYFDJZNHpuHWnIfcqnqJfBVkhGRvSECq+mZtwBTeQLmBQc+GxMWLK4C5Sc4SJ kpGKOe59OUUGCz1FlNm9J5flC1+y/jhygNb7UlOWQNZ51hw4LA2QJNTkNRPVzcBjw0e3 4KGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=YOOLwxWO; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=YOOLwxWO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020a6553c4000000b003c69e8eb047si2054709pgr.140.2022.05.11.20.37.34; Wed, 11 May 2022 20:37:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=YOOLwxWO; dkim=pass header.i=@hansenpartnership.com header.s=20151216 header.b=YOOLwxWO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=hansenpartnership.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346106AbiEKUMy (ORCPT + 99 others); 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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