Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2846861ybl; Thu, 29 Aug 2019 13:53:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqwWx+cJRKe84QGFJ199qtGojIGJ6/mBOIeo7aUzne3NfajWsn5Z8v7VFKEbyK0TsSZXmRei X-Received: by 2002:a17:90a:b395:: with SMTP id e21mr11967028pjr.76.1567112006849; Thu, 29 Aug 2019 13:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567112006; cv=none; d=google.com; s=arc-20160816; b=hTm/hbjtvCWI64p3Y9MAjF14UAyxua/KaYQESId1Pzj12XbzX9gEz+C8lcMte+as6Y gd6AEPIvnimSBIpgM5OiteIgeOmgl66LAF542Z+CTGZzkeUq9D0QImety9QXHxwT6tVS skWuJw144H3ribGga+k71900GPSvfASIIJrkZ+P+fAfs4uu/OZwAyiULhL5d0b6d0z90 j7OzE89d0ceMjbCoX5srpQfsnCvQKFF4NBTsR3PNvSyQaUiIa8508Btl2Fe135KxfLfT 9jEQANZVpIv/xvmfbPe3KsWn4I5VOSLgKCPypL+RSp5Y1mMHHGEMJxEiF4jJROeA9MaR dJzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=p/FglY5dkT/WXmWOVTlzi+lvkF3kVWqBOkpijCCE/+4=; b=G3nD/SAq5FVNlCwJI5dcVYJVInWRfRBIQsB0gymucgK9+kexIYUyWs4Y5FudbMPo69 GLD6NW74wfMmks/Uc8jqjn5AuGgRV99/iNbcTdLphArZjgXXRUsO8GgHIDChjYGBoNjL AQX4OTULR4eqNfEmMFNrZauMNZdEYFNolYhq8kQyF6vU/4aqDD8+mTWI9BeHb91B3bFP zoSALbBE5md0hxgSdIL8L5EcVVcsTit3+G43xZ9Xqgx0miY4Rc5W1QHWg+O+7GHpo5ed BjRX3ve+O8XKsfsOIk5yg6MiMj+UdfFIaeumMYAepgc8x5mtOXndWUt1i8qWDVJvfg+n ykpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5si3935602pfa.214.2019.08.29.13.53.10; Thu, 29 Aug 2019 13:53:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727564AbfH2UuR (ORCPT + 99 others); Thu, 29 Aug 2019 16:50:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56844 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726512AbfH2UuR (ORCPT ); Thu, 29 Aug 2019 16:50:17 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 00D9430872CA; Thu, 29 Aug 2019 20:50:17 +0000 (UTC) Received: from cantor.redhat.com (ovpn-116-163.phx2.redhat.com [10.3.116.163]) by smtp.corp.redhat.com (Postfix) with ESMTP id A5B8060BF7; Thu, 29 Aug 2019 20:50:16 +0000 (UTC) From: Jerry Snitselaar To: linux-integrity@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Alexey Klimov , Jarkko Sakkinen , Peter Huewe , Jason Gunthorpe Subject: [PATCH 0/3 v3] tpm: add update_durations class op to allow override of chip supplied values Date: Thu, 29 Aug 2019 13:49:44 -0700 Message-Id: <20190829204947.2591-1-jsnitsel@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 29 Aug 2019 20:50:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We've run into a case where a customer has an STM TPM 1.2 chip (version 1.2.8.28), that is getting into an inconsistent state and they end up getting tpm transmit errors. In really old tpm code this wasn't seen because the code that grabbed the duration values from the chip could fail silently, and would proceed to just use default values and move forward. More recent code though successfully gets the duration values from the chip, and using those values this particular chip version gets into the state seen by the customer. The idea with this patchset is to provide a facility like the update_timeouts operation to allow the override of chip supplied values. v3: Rework update_durations to make use of new version structs and pull tpm1_getcap calls out of loop. v2: Update Alexey's v1 submission with suggestions made by Jarkko