Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4611583ybl; Mon, 9 Dec 2019 13:56:44 -0800 (PST) X-Google-Smtp-Source: APXvYqxPNah65IxGaMJg3WhzUzeIgjDWBFOGL/aTPStqJlDCxFB9J7FZQlkbAApIb7xBNL48klRy X-Received: by 2002:aca:52c4:: with SMTP id g187mr1183469oib.76.1575928603939; Mon, 09 Dec 2019 13:56:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575928603; cv=none; d=google.com; s=arc-20160816; b=oBryzvrm+2g2AsuhDOBUQ1KppV6m1IzLIZkMogkgnjnuGmfn/wdNbTpIRhSpOAE+ko kssBSIVT1saXhBQZlaJrn+H9Fjol3i4dZ+EbrM+j+nz2c0rQXU5TRohzq4A/YQ2dN31J DWN6uAySMCyBqXA2ME6sf044TsP7JmjsQE1rR9JCvZ6/I4tEqazoTjnnzezi7FZ5oYz0 1977l3FSPZDmUFib9l2qoowyBfzTZ0Fy/Ofa0TzVgkxZo7TD/wjQP2QKNVP3ysF2K/BH j2y6XDCn8TfKZ0MUpsqBBi3iwlDIOJ0RGsmmBOANb4j8Gpxz4esPXCMukmDFO92xX565 /X/w== 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=nvUwYk7XYnhVb8z+n/0PN8JFHiNkwWG7PVOySQ7OnAY=; b=J4vYkeMb+SZSyyWgwXhNfVy5xkJTPC3OxgWCUOLyAIY3i1r4cCRgMtUSp22R2FHJiZ R42gSzbBS7jB71O+hy3JwRCoLWv/4SUqqrz34AUieqZm1dGT39bzQGTKEuZDNtygxrZw OeuBjTSrBq01QCLUOtTlNwXIWn79xnhYMhP5bd4oMB11y21+huA8qlt+i8D4Ne05GEtj lCFrf75mBZ+U3IdyrFbuTqnoZbDaumLkxu53ddawQfpG//PcfzpXMItdfDZvBfTSP5z8 bbVfOM7WL/CpWxWPdCgNt2XQx3m36ORVWVKbss03p+n8Bi31AMh9LyvcD35NDp4sg7k/ GU1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=QCeDoRcg; 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 h139si770850oib.85.2019.12.09.13.56.31; Mon, 09 Dec 2019 13:56:43 -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=QCeDoRcg; 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 S1726743AbfLIVzt (ORCPT + 99 others); Mon, 9 Dec 2019 16:55:49 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:46509 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726483AbfLIVzs (ORCPT ); Mon, 9 Dec 2019 16:55:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575928547; 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=nvUwYk7XYnhVb8z+n/0PN8JFHiNkwWG7PVOySQ7OnAY=; b=QCeDoRcg73hQUk5nN8AUGGSYu13i+JFcY5Eyq3m2qnQQY87mJzorHaZS9sCXF8ko5ojheH J4vjuo+BaRe1Usg7I1LfmzjIV7NsGPbL5p3Ulei9TnwQ5/9BORPwoa/xQVZsCUUY4tWOFu NCfyeYiP/BJy1LHlkH+n6J58C9XDzzM= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-218-DMbtlXcHO-CcDGnWoczndA-1; Mon, 09 Dec 2019 16:55:43 -0500 Received: by mail-qt1-f198.google.com with SMTP id h14so480726qtq.11 for ; Mon, 09 Dec 2019 13:55:43 -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=LAlWxB0yFY54ciHDGB1TZgCbDYqMZXZ8KAXo988Qmv8=; b=m+JrcXP2aE1DzoXC72E3NgDgfStPsIAQ4oegYCVRw4YE/ctnv6KjSWt7OFL8lfMjdE eFzyz5jiR+SzAbz6GWcV7Kf5EeoQNIwHtxf1WWhkQryHYx4JVdwfgjjgHD8MzG7JdBIK rmA3maBvXOXod9PUycQyMV03mtYqitfT8RUWIu+DS9gZWONh/jUMVbAIPkBebGEYN9wz qgopyz8wgXBHOzcvzGkXsrU3AvVFl5pEnKgrWCHrz/bbJjrftHBHHsaesdkxevqkzul/ l8q3o9fpqB/ygEzcgpaDUnAO+fonkMDld5dg4z/BUGRm3Ox214/XeoZt5OFARaOkq4D7 +BYA== X-Gm-Message-State: APjAAAX4Tqlsv04RetblNGpHfX1biuv2ja0BNO//HXivWZR/DOKUbx5o ubrJzX1y74uRFJbvD1COCRF5BoRaqd7EQPeCqeTS7wmjUFVC0RpNoKzOhjhMEtceR+RY4Ofpi0Z w3085sMxHGufPSFCMw5Vt2zgv X-Received: by 2002:a0c:ada3:: with SMTP id w32mr24879209qvc.99.1575928543181; Mon, 09 Dec 2019 13:55:43 -0800 (PST) X-Received: by 2002:a0c:ada3:: with SMTP id w32mr24879192qvc.99.1575928542771; Mon, 09 Dec 2019 13:55:42 -0800 (PST) Received: from localhost (ip70-163-223-149.ph.ph.cox.net. [70.163.223.149]) by smtp.gmail.com with ESMTPSA id y187sm277800qkd.11.2019.12.09.13.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Dec 2019 13:55:41 -0800 (PST) Date: Mon, 9 Dec 2019 14:55:35 -0700 From: Jerry Snitselaar To: Jarkko Sakkinen Cc: Stefan Berger , Stefan Berger , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH 0/2] Revert patches fixing probing of interrupts Message-ID: <20191209215535.pw6ewyetskaet2o6@cantor> Reply-To: Jerry Snitselaar Mail-Followup-To: Jarkko Sakkinen , Stefan Berger , Stefan Berger , linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, linux-security-module@vger.kernel.org References: <20191126131753.3424363-1-stefanb@linux.vnet.ibm.com> <20191129223418.GA15726@linux.intel.com> <6f6f60a2-3b55-e76d-c11a-4677fcb72c16@linux.ibm.com> <20191202185520.57w2h3dgs5q7lhob@cantor> <20191209194248.GC19243@linux.intel.com> MIME-Version: 1.0 In-Reply-To: <20191209194248.GC19243@linux.intel.com> X-MC-Unique: DMbtlXcHO-CcDGnWoczndA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8; 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 Mon Dec 09 19, Jarkko Sakkinen wrote: >On Mon, Dec 02, 2019 at 11:55:20AM -0700, Jerry Snitselaar wrote: >> On Sun Dec 01 19, Stefan Berger wrote: >> > On 11/29/19 5:37 PM, Jarkko Sakkinen wrote: >> > > On Tue, Nov 26, 2019 at 08:17:51AM -0500, Stefan Berger wrote: >> > > > From: Stefan Berger >> > > > >> > > > Revert the patches that were fixing the probing of interrupts due >> > > > to reports of interrupt stroms on some systems >> > > Can you explain how reverting is going to fix the issue? >> > >> > >> > The reverts fix 'the interrupt storm issue' that they are causing on >> > some systems but don't fix the issue with the interrupt mode not being >> > used. I was hoping Jerry would get access to a system faster but this >> > didn't seem to be the case. So sending these patches seemed the better >> > solution than leaving 5.4.x with the problem but going back to when it >> > worked 'better.' >> > >> >> I finally heard back from IT support, and unfortunately they don't >> have any T490s systems to give out on temp loan. So I can only send >> patched kernels to the end user that had the problem. > >At least it is a fact that tpm_chip_stop() is called too early and that >is destined to cause issues. > >Should I bake a patch or do you have already something? > >/Jarkko > This is what I'm currently building: diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_cor= e.c index 270f43acbb77..17184c07eb51 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -899,13 +899,13 @@ int tpm_tis_core_init(struct device *dev, struct tpm_= tis_data *priv, int irq, =20 =09if (wait_startup(chip, 0) !=3D 0) { =09=09rc =3D -ENODEV; -=09=09goto out_err; +=09=09goto out_start; =09} =20 =09/* Take control of the TPM's interrupt hardware and shut it off */ =09rc =3D tpm_tis_read32(priv, TPM_INT_ENABLE(priv->locality), &intmask); =09if (rc < 0) -=09=09goto out_err; +=09=09goto out_start; =20 =09intmask |=3D TPM_INTF_CMD_READY_INT | TPM_INTF_LOCALITY_CHANGE_INT | =09=09 TPM_INTF_DATA_AVAIL_INT | TPM_INTF_STS_VALID_INT; @@ -914,9 +914,8 @@ int tpm_tis_core_init(struct device *dev, struct tpm_ti= s_data *priv, int irq, =20 =09rc =3D tpm_chip_start(chip); =09if (rc) -=09=09goto out_err; +=09=09goto out_start; =09rc =3D tpm2_probe(chip); -=09tpm_chip_stop(chip); =09if (rc) =09=09goto out_err; =20 @@ -980,7 +979,6 @@ int tpm_tis_core_init(struct device *dev, struct tpm_ti= s_data *priv, int irq, =09=09=09goto out_err; =09=09} =20 -=09=09tpm_chip_start(chip); =09=09chip->flags |=3D TPM_CHIP_FLAG_IRQ; =09=09if (irq) { =09=09=09tpm_tis_probe_irq_single(chip, intmask, IRQF_SHARED, @@ -991,18 +989,17 @@ int tpm_tis_core_init(struct device *dev, struct tpm_= tis_data *priv, int irq, =09=09} else { =09=09=09tpm_tis_probe_irq(chip, intmask); =09=09} -=09=09tpm_chip_stop(chip); =09} +=09tpm_chip_stop(chip); =20 =09rc =3D tpm_chip_register(chip); =09if (rc) -=09=09goto out_err; - -=09if (chip->ops->clk_enable !=3D NULL) -=09=09chip->ops->clk_enable(chip, false); +=09=09goto out_start; =20 =09return 0; out_err: +=09tpm_chip_stop(chip); +out_start: =09if ((chip->ops !=3D NULL) && (chip->ops->clk_enable !=3D NULL)) =09=09chip->ops->clk_enable(chip, false);