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 X-Spam-Level: X-Spam-Status: No, score=-8.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 85A24C43603 for ; Tue, 17 Dec 2019 20:29:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5770C206E0 for ; Tue, 17 Dec 2019 20:29:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KxSSHezq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727940AbfLQU33 (ORCPT ); Tue, 17 Dec 2019 15:29:29 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:49998 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727497AbfLQU32 (ORCPT ); Tue, 17 Dec 2019 15:29:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576614567; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=B6w85va6Ncayok+cnMrvDbJmyUfEY5Z0K1FVwp3qaqg=; b=KxSSHezq0MCw6bbq1OOCO64kHFGaLFwilm82fZC8U2ap9YZrVeMzWSlndXnhkpIHO9QQis Qcfd89HDOOl+xxqvddFWaXGUN9k42rQD1+2gQu6tBwnRe+hliQgq15Xstbu9LjGEUCpObZ w7v9d3HMNDz7ropdcJPBzTZ1Su9E6ng= Received: from mail-yb1-f197.google.com (mail-yb1-f197.google.com [209.85.219.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-3-P9M6dNEON7GJ2tm_iP5olQ-1; Tue, 17 Dec 2019 15:29:23 -0500 X-MC-Unique: P9M6dNEON7GJ2tm_iP5olQ-1 Received: by mail-yb1-f197.google.com with SMTP id y204so7934056yby.18 for ; Tue, 17 Dec 2019 12:29:22 -0800 (PST) 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; bh=B6w85va6Ncayok+cnMrvDbJmyUfEY5Z0K1FVwp3qaqg=; b=OLAejK/noJJCelyi/ne+DsGmkPqdHjAjn18HkZQ+oRN2uySRVhTxxvyESWKqqXC+Np ClfYBf+MVfkpSlS7cFlFTVY/cpYS7UyxLpoaAKENCWwOPurs7xQCcip3ZI2IapyYj2v4 dZ+jD8uNLGTsMq8t7iUHj1B44DsMDVmjYZffp6nHLoGCVE3DH1RT+KF/zZskLHxwokZz BwVtGuvAA85DieA8Ffsdv6oPY4U15OnikJskuOiFihQgjg9rsC6y+e5pUaajNYOVlrMn lJNcQaHUmxX4nsRMV8gsEpnoRDaX68nlGawJGW/1T5Cu8hoiUuTCXowzx/vpo8eVl4W8 JYWQ== X-Gm-Message-State: APjAAAXW2avrtKIG4BJb4ZJRKb+7uvA7Lh+LVSojBkYkOYnXQSkVwxcW 2GUGLFcyOfRYRkCBUs5dFgofulbNY/iGVpoCdKTQTZqhLjAgxDd6r8W2XKIYiZr8zomdXo7aW3W zeSv4UOcRWXorZljVjVJjpZbv X-Received: by 2002:a81:9a45:: with SMTP id r66mr459335ywg.446.1576614562497; Tue, 17 Dec 2019 12:29:22 -0800 (PST) X-Google-Smtp-Source: APXvYqyb258eJuuP+T1u1y5+GiE/8HF1tUR9cT2lsn7QBU6PYjGyZyQQefMkbh0UG51ut1kkWocH2A== X-Received: by 2002:a81:9a45:: with SMTP id r66mr459312ywg.446.1576614562236; Tue, 17 Dec 2019 12:29:22 -0800 (PST) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id g29sm10511291ywk.31.2019.12.17.12.29.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2019 12:29:21 -0800 (PST) Date: Tue, 17 Dec 2019 13:29:20 -0700 From: Jerry Snitselaar To: Jarkko Sakkinen Cc: Dan Williams , Linux Kernel Mailing List , Christian Bundy , Peter Huewe , Jason Gunthorpe , Stefan Berger , stable , linux-integrity@vger.kernel.org Subject: Re: [PATCH v2] tpm_tis: reserve chip for duration of tpm_tis_core_init Message-ID: <20191217202920.kktuk3q3qrnuvscd@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Jarkko Sakkinen , Dan Williams , Linux Kernel Mailing List , Christian Bundy , Peter Huewe , Jason Gunthorpe , Stefan Berger , stable , linux-integrity@vger.kernel.org References: <20191211231758.22263-1-jsnitsel@redhat.com> <20191211235455.24424-1-jsnitsel@redhat.com> <5aef0fbe28ed23b963c53d61445b0bac6f108642.camel@linux.intel.com> <20191217020022.knh7uxt4pn77wk5m@cantor> <5d0763334def7d7ae1e7cf931ef9b14184dce238.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline In-Reply-To: <5d0763334def7d7ae1e7cf931ef9b14184dce238.camel@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue Dec 17 19, Jarkko Sakkinen wrote: >On Mon, 2019-12-16 at 18:14 -0800, Dan Williams wrote: >> On Mon, Dec 16, 2019 at 6:00 PM Jerry Snitselaar wrote: >> > On Mon Dec 16 19, Dan Williams wrote: >> > > On Mon, Dec 16, 2019 at 4:59 PM Jarkko Sakkinen >> > > wrote: >> > > > On Wed, 2019-12-11 at 16:54 -0700, Jerry Snitselaar wrote: >> > > > > Instead of repeatedly calling tpm_chip_start/tpm_chip_stop when >> > > > > issuing commands to the tpm during initialization, just reserve the >> > > > > chip after wait_startup, and release it when we are ready to call >> > > > > tpm_chip_register. >> > > > > >> > > > > Cc: Christian Bundy >> > > > > Cc: Dan Williams >> > > > > Cc: Peter Huewe >> > > > > Cc: Jarkko Sakkinen >> > > > > Cc: Jason Gunthorpe >> > > > > Cc: Stefan Berger >> > > > > Cc: stable@vger.kernel.org >> > > > > Cc: linux-integrity@vger.kernel.org >> > > > > Fixes: a3fbfae82b4c ("tpm: take TPM chip power gating out of tpm_transmit()") >> > > > > Fixes: 5b359c7c4372 ("tpm_tis_core: Turn on the TPM before probing IRQ's") >> > > > > Signed-off-by: Jerry Snitselaar >> > > > >> > > > I pushed to my master with minor tweaks and added my tags. >> > > > >> > > > Please check before I put it to linux-next. >> > > >> > > I don't see it yet here: >> > > >> > > http://git.infradead.org/users/jjs/linux-tpmdd.git/shortlog/refs/heads/master >> > > >> > > However, I wanted to make sure you captured that this does *not* fix >> > > the interrupt issue. I.e. make sure you remove the "Fixes: >> > > 5b359c7c4372 ("tpm_tis_core: Turn on the TPM before probing IRQ's")" >> > > tag. >> > > >> > > With that said, are you going to include the revert of: >> > > >> > > 1ea32c83c699 tpm_tis_core: Set TPM_CHIP_FLAG_IRQ before probing for interrupts >> > >> > Dan, with the above reverted do you still get the screaming interrupt? >> >> Yes, the screaming interrupt goes away, although it is replaced by >> these messages when the driver starts: >> >> [ 3.725131] tpm_tis IFX0740:00: 2.0 TPM (device-id 0x1B, rev-id 16) >> [ 3.725358] tpm tpm0: tpm_try_transmit: send(): error -5 >> [ 3.725359] tpm tpm0: [Firmware Bug]: TPM interrupt not working, >> polling instead >> >> If the choice is "error message + polled-mode" vs "pinning a cpu with >> interrupts" I'd accept the former, but wanted Jarkko with his >> maintainer hat to weigh in. >> >> Is there a simple sanity check I can run to see if the TPM is still >> operational in this state? > >What about T490S? > >/Jarkko > I just heard back from the t490s user, and as expected the problem still exists there with this patch. Regards, Jerry