Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp986190ybc; Tue, 12 Nov 2019 12:18:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxJ29fBMtI46HuB+sHvjTYJKj7+Zkhwow9wgsfg+ZIm7Hbx0EquDz1v4oXT9ifDgXD1INmV X-Received: by 2002:aa7:c6c9:: with SMTP id b9mr34662721eds.1.1573589930976; Tue, 12 Nov 2019 12:18:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573589930; cv=none; d=google.com; s=arc-20160816; b=t2ZqiqAQmgGq/R7EBw1ByXg5c+1ndwVD+DX6iRNuYjm10r7Neu7mXvkiPrpvg2lOyp FDn0bhd38O2IhRjJ5WtiQ9tQM7rvcC9yk7cFvP1Otgs57NiofHMohNrMX2cbstPuYrRX x5r7kQva1HOUhxkK2UTW551RdQXeRVkI9VXVxtlv2ZIAD2BQHc4RfKolcFJOJRbdpxIh VrfNKLCc9rdZKzWuE1bfFIrQNFh2U9mLR3ocXOOWHSy1LjE/sc9TMK0QkCGlQBG7y3Fc oYPc7ANOxdS1vU3CfESbeDapgnLWukMTS/DBhclE9KZB4LXzMGpwpIe75sJa3Y/EClPk mxbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :mail-followup-to:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=qm8sRANNmzEPm6nlw2BezXJvLm5FulYqmCTuQv0ocvM=; b=SnU+xDQd6uyOEx/WvZaDoQ5UFVLxVFXDJD16tTOQXhDu7FjEok89OxmWhI/909lafG GiKGuar8//5ZhAWufQuva+bgQMVTj6cKvzXKQBnpupIFoPcGhtwhX/an+jnDLxf/6DA1 SKCXFqjiDXlSMZoVDia8VkKXXN2A1g3f74lAWL8nnQC7tROnMH+vCV8wfiSS3n6gv/XN u9FWpSFJ4TFiSrEDNFmOP41qoilUS6Yya1hwo9ZDPLQWGKVQkWHQ4iYJ4f9Oxi2Bofzt knLttmnocDeafaN6sgu37dGdBtWfmb6V3Hy8A6Zz6ih1CXEfdAKkz4MYpxRQbugll/v+ 5DDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VyRbd50G; 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=pass (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 ce9si739800ejb.213.2019.11.12.12.18.25; Tue, 12 Nov 2019 12:18:50 -0800 (PST) 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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VyRbd50G; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726988AbfKLURm (ORCPT + 99 others); Tue, 12 Nov 2019 15:17:42 -0500 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:40177 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726977AbfKLURl (ORCPT ); Tue, 12 Nov 2019 15:17:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573589860; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qm8sRANNmzEPm6nlw2BezXJvLm5FulYqmCTuQv0ocvM=; b=VyRbd50Ga4ZOL7lmh8eZqa5toCAbmNaV4TIiZ/AGoE0ymtIEt+SqlBqNJHnrmLZIwOYpB2 7wEqbPCj6IOAaOb5P7zFb8zIxmrOeyutV6HY+FN3THPSRhfNnQTONmroHTazVGZh1CUPM/ hlYC/vosIi1NTTGzmRFBsw5LpT4ckUY= Received: from mail-yb1-f198.google.com (mail-yb1-f198.google.com [209.85.219.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-338-kSUp9x2ZPDCS8QmuqBcZGQ-1; Tue, 12 Nov 2019 15:17:39 -0500 Received: by mail-yb1-f198.google.com with SMTP id p4so15240099ybp.7 for ; Tue, 12 Nov 2019 12:17:39 -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=Ue+RmWRiIYpJZ808L9pilsgFcrEW5+LqZcaMFFe1nnY=; b=UF7njQj0rbaUNw9F0n4hVpfV3aCMGHQ0YH/MpTeAGT4VZrVDYED8fCI069B1StwVdX xFLUrNiIWyCihFiNuC2qw/9dpMQIhdjfNxkgKLwgHoTNs5j6mPp+DIB1OVfWroAv4Ycy MfgV2/Jw3p9bNmtjH5y66l2rjzNTD/eajcUa7Z0XvhgzTT6mqV9S0RND0DXFTCb43mn1 n7+HDw0fX57zB1JKEYs3eKnYCHyZ/brgw0OLnK+a/BErpjtRZMXmLX+QJr/8PE1cbS12 iho3P2D/DTyJQC54/v3Cwb64MVvso0PjeBV6uGS0RCrtdqrJFzB2eF12B5S97Fe1rl7v 93bQ== X-Gm-Message-State: APjAAAV9dpU3xjJisrTcdAzC9rDdq79aI1zc8BvkE7BAVDiXZkrCn8Rq o0GoNiMStMVAWCgPVQP8LwmWt5ZF1gnaPnBKxfutNpC4lvzBxCIBby0UcoWOmWBNFrM0q5jF4XI KV3iWwM/KWSINEiEzH1e/Fy5N X-Received: by 2002:a0d:ed03:: with SMTP id w3mr20747370ywe.359.1573589858337; Tue, 12 Nov 2019 12:17:38 -0800 (PST) X-Received: by 2002:a0d:ed03:: with SMTP id w3mr20747359ywe.359.1573589858076; Tue, 12 Nov 2019 12:17:38 -0800 (PST) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id q127sm13598290ywc.43.2019.11.12.12.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 12:17:37 -0800 (PST) Date: Tue, 12 Nov 2019 13:17:34 -0700 From: Jerry Snitselaar To: Jarkko Sakkinen Cc: Stefan Berger , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: question about setting TPM_CHIP_FLAG_IRQ in tpm_tis_core_init Message-ID: <20191112201734.sury5nd3cptkckgb@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Jarkko Sakkinen , Stefan Berger , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org References: <20191112033637.kxotlhm6mtr5irvd@cantor> <20191112200703.GB11213@linux.intel.com> MIME-Version: 1.0 In-Reply-To: <20191112200703.GB11213@linux.intel.com> X-MC-Unique: kSUp9x2ZPDCS8QmuqBcZGQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue Nov 12 19, Jarkko Sakkinen wrote: >On Mon, Nov 11, 2019 at 08:36:37PM -0700, Jerry Snitselaar wrote: >> Question about 1ea32c83c699 ("tpm_tis_core: Set TPM_CHIP_FLAG_IRQ >> before probing for interrupts"). Doesn't tpm_tis_send set this flag, >> and setting it here in tpm_tis_core_init short circuits what >> tpm_tis_send was doing before? There is a bug report of an interrupt >> storm from a tpm on a t490s laptop with the Fedora 31 kernel (5.3), >> and I'm wondering if this change could cause that. Before they got the >> warning about interrupts not working, and using polling instead. > >Looks like it. Stefan? > >/Jarkko > Stefan is right about the condition check at the beginning of tpm_tis_send. =09if (!(chip->flags & TPM_CHIP_FLAG_IRQ) || priv->irq_tested) =09=09return tpm_tis_send_main(chip, buf, len); Before his change it would've gone straight to calling tpm_tis_send_main instead of jumping down and doing the irq test, due to the flag not being set. With his change it should now skip this tpm_tis_send_main call when tpm_tis_gen_interrupt is called, and then after that time through tpm_tis_send priv->irq_tested will be set, and the flag should be set as to whether or not irqs were working. I should hopefully have access to a t490s in a few days so I can look at it= , and try to figure out what is happening.