Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp45965ybp; Thu, 3 Oct 2019 09:59:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwGYLRYgSqUyYdCshBjhk5gh2Srcb0SCsE89UYtGPv7DMSh+9WogLCe5PBwvlXwVjpEIWb3 X-Received: by 2002:a05:6402:65a:: with SMTP id u26mr10627005edx.86.1570121985776; Thu, 03 Oct 2019 09:59:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570121985; cv=none; d=google.com; s=arc-20160816; b=aZWoNJKoc/5ofgCioF3CmPqbTd4VOfx2gK9Rf6FRuIrYopdjrX2JfH4uMntG/js5Gv XYQqpXRJB06fS2MFg6mKiHaZr2o8xoVUpYU0or/RG4IfTW+26/Ia1avAppHfsq1sbdzH hX7XhM8/vfKobpS5Zm6aHXTqe26WDDGLaQ9QT2wpL1y1T+UZuPa3GOENq/Xq3HG53RIE LYbHX//EtEird+nvM4TOkLgVphE8LEZLKSGtd2FFqjq/w0DqQwg8XiQHfh+euirKWbGq cZ6e1NH0X/7S8Vyx5nc5/DpnK8muD7R3EMJYspbaOlXmPksmljrtWk9j2hGUJJgs+k4B qZYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :reply-to:message-id:subject:cc:to:from:date; bh=AFNw8r3ckdAQvRI7p3wli5RDRwpNcfmosa2xDA/j64M=; b=eymlVr1+UJ7fry1q/9hDy7iovn0meQRNOiSvp1Mm1jWnNqceQzHfGVyBPjbglBRq26 RYdQLQscTQ6u7SwBVmpD5Zlk9so1alT91XUZWsn/BRhSG4GxmOornhj98Qhs07FNqj2K YD7eaySZTkUslJtHVH0IcGrXZJ4vM5TRITwWndOPc0Yl6NX1XpxJYfEQ4bozUULCgxnv jUVnU+QaPUQSvIFxmcE/HiS6ZLqe/0mmwAkdk6nM/BdBrekNsfGV7mKMX1KqOd8XnhaN GHKKyZ3pC6bgEOx0IeSmA7b3KPU+150z8qiWNL7hTXCFsmS2pDt97FLW35JYq+lBOzmR qtPw== 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 w26si1566072ejb.6.2019.10.03.09.59.21; Thu, 03 Oct 2019 09:59:45 -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 S2393255AbfJCQ4B (ORCPT + 99 others); Thu, 3 Oct 2019 12:56:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58752 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393157AbfJCQzz (ORCPT ); Thu, 3 Oct 2019 12:55:55 -0400 Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A5CA3C05AA57 for ; Thu, 3 Oct 2019 16:55:54 +0000 (UTC) Received: by mail-io1-f72.google.com with SMTP id e6so6262540iog.5 for ; Thu, 03 Oct 2019 09:55:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:reply-to :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=AFNw8r3ckdAQvRI7p3wli5RDRwpNcfmosa2xDA/j64M=; b=KCXLnSdsk6z3AYK+mf6NolIMesPMVkzeqsjcKCwH4iqZfFgoibAKLuHKZMXRI+Ca9k ZzBhmrnYCUO5F9f7cMBPkGy5wIeigbJpiZPjQcv2dgkRd8GQ61a96dh4xfM2EIoSTRFY tJLFkV6vfvVS26YhmiC67SmOj3P/O2fTqS62iYphCmYNp4InboHJMBxcJXaZiXQKuxru 2+OsT1fw49p6QhJKwaR6RSpXGNRBBBjnDFejEwdjnRCB/CSwsA8Qhjn8jeOiXRI0ZTC1 ogDp/05+gjbEXDwIsryQLDtk3Zklz7ZoXXCzbCym/9gP+gBNXmA4jTXU1GGBdLuYjmNZ GKqg== X-Gm-Message-State: APjAAAUQ7VdhPDrgdphVxJkLUMaFZ/DS6DGbP9U9aaokKmMAZ9oHik6n wyDTH2B6rlaL4YoE/pU3qnUcYt7ZoLvCo9qthOXotl+XjM6DOhqHxNAqD61bdzDE4c0KSMMwLKC Me4uqFOuJvGTUssP+FMqQanKu X-Received: by 2002:a02:93e5:: with SMTP id z92mr10465232jah.8.1570121753895; Thu, 03 Oct 2019 09:55:53 -0700 (PDT) X-Received: by 2002:a02:93e5:: with SMTP id z92mr10465197jah.8.1570121753579; Thu, 03 Oct 2019 09:55:53 -0700 (PDT) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id i67sm2007185ilf.84.2019.10.03.09.55.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Oct 2019 09:55:52 -0700 (PDT) Date: Thu, 3 Oct 2019 09:55:51 -0700 From: Jerry Snitselaar To: Jarkko Sakkinen Cc: linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Klimov , Peter Huewe , Jason Gunthorpe Subject: Re: [PATCH v4 0/4] tpm: add update_durations class op to allow override of chip supplied values Message-ID: <20191003165551.whfzgmhpm5r6ejpw@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Jarkko Sakkinen , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, Alexey Klimov , Peter Huewe , Jason Gunthorpe References: <20190902142735.6280-1-jsnitsel@redhat.com> <20191002203533.GA17766@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20191002203533.GA17766@linux.intel.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed Oct 02 19, Jarkko Sakkinen wrote: >On Mon, Sep 02, 2019 at 07:27:32AM -0700, Jerry Snitselaar wrote: >> 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. >> >> changes from v3: >> * Assign value to version when tpm1_getcap is successful for TPM 1.1 device >> not when it fails. >> >> changes from v2: >> * Added patch 1/3 >> * Rework tpm_tis_update_durations to make use of new version structs >> and pull tpm1_getcap calls out of loop. >> >> changes from v1: >> * Remove unneeded newline >> * Formatting cleanups >> * Change tpm_tis_update_durations to be a void function, and >> use chip->duration_adjusted to track whether adjustment was >> made. >> >> Jarkko Sakkinen (1): >> tpm: Remove duplicate code from caps_show() in tpm-sysfs.c >> >> Jerry Snitselaar (2): >> tpm: provide a way to override the chip returned durations >> tpm_tis: override durations for STM tpm with firmware 1.2.8.28 >> >> > >I applied to my master branch. > >Probably hard to get wide testing given the "niche" case when the >issue happens. Should be sufficient that the commonc case still >works. > >/Jarkko Yeah, it is a pain. The people with the problem systems tested an earlier version of Alexey's patches. I have a system with a different rev STM device, so I did some testing with a modified patch that keyed off that revision, but it will be hard to get it wide exposure.