Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4079560rwd; Tue, 23 May 2023 02:48:30 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5QjmJsgUZ5VjCi2MPlgqoERe0nRkxqeMn9txlipEIjznqy2K0fKbjh6wHTeDdTrKTdSTZA X-Received: by 2002:a05:6a20:7286:b0:105:66d3:8572 with SMTP id o6-20020a056a20728600b0010566d38572mr15469973pzk.24.1684835309700; Tue, 23 May 2023 02:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684835309; cv=none; d=google.com; s=arc-20160816; b=h7UyoSLB01hYs/lJWy3N7LaL7azBhybI2kmmkCntSBugd86T/IWSUOj+Ut2klXkuJs EL9u9bah84IyWvl4rnjj6q/MlHzhA7qFG7hROclRY5xYqItvjwfwPjyUlpXhfqw3oz+s x/mPfBKaLQG5BqsK7NOByXRdPnfy4XMyJNfX/QC7mH0ELLTq5s1qZinfDHwooqbYwe5t tTu0/tn6PvjB7RIcel8fLDO1dPPgL6/J5pnAqXGVkLE5tIbzYsWdgKF7ZnOdVpbQCD9P tU/SyOSMsgq+5268Sk9NxEB5km9RWsqoOqr8B9+Ccf/9oYxESkBcFRj7qfElnH/OnpH5 BbiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:references :cc:to:from:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=T3JRnya3sOZ8ixRKF4bjNc7GKkUiLni2zVAtlcIlNcU=; b=YHl9gkRP/j+G7H+KnCHzAjbX4Z8lZfYmi4Wd3Wf8vwQXCHJY9Hxa6iTDZlGkq1Jc9G QKHh84hJ9sN85/37vmpfPP8Gmp0bZbDceAfyiFyEQlwX876k+94nvRILGRwV6HziV2Xw AtAMZJcguh04bxuEyII1X/jAGMsvvHF9JcbRg4zhS0uGxI+JSNFOALQ3wIO2r2yQNTf3 NsiWX9oeB2T4WcYe2ORTAKZN0mTVVJ8JIHV96nQEKnOCoSRY+rCJnOZOQ/6ZUIExzn9k 2KQZ57PaPduoq0zMfbpdaqX2u25j+OlkQPiyYazMFprXs+e3UxHPEFcAgDEHwa/MBiIM fL/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MUOifUnE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s14-20020a63b40e000000b0052c66d4c255si6490314pgf.576.2023.05.23.02.48.17; Tue, 23 May 2023 02:48:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MUOifUnE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236342AbjEWJef (ORCPT + 99 others); Tue, 23 May 2023 05:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236336AbjEWJeY (ORCPT ); Tue, 23 May 2023 05:34:24 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FFB7E54; Tue, 23 May 2023 02:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684834455; x=1716370455; h=message-id:date:mime-version:subject:from:to:cc: references:in-reply-to:content-transfer-encoding; bh=7PrrEP2po1mUE8S7jR3Uof8Mlc7GiCrzDGOiWsjUZ5s=; b=MUOifUnE92R+MYYva/YjZkn/KQ9n42cp/ku+nBWa5XCE/cEJyiX42aFi 3ysnhlmjwNbUQqRH31D923fPezUoEUgy6vCYmFSe7rxzmLngRmIuYCduw w9KOn557akWHos4B7nPROcjXs0Raph3QKnD+A1YG5LBbUS7LMt2cYAxyv NGF65xPM9qAd3XQpD5sWfDFIRrxmeJFXvDv9LMNOjUJm28Xjf5kZrbMaf /PDg43PZ5HkVv7LuppDx79a2gam9Cc/G7Tn0KRZcOmFKcKU19x1iA1XQR J27BcqrOLf5OeMat9HYi2B0+XNDo+BZRlH3ESw4utkejtroXd6ozgrhLR g==; X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="342648688" X-IronPort-AV: E=Sophos;i="6.00,185,1681196400"; d="scan'208";a="342648688" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2023 02:34:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="878134951" X-IronPort-AV: E=Sophos;i="6.00,185,1681196400"; d="scan'208";a="878134951" Received: from nmkenne1-mobl2.ger.corp.intel.com (HELO [10.252.53.154]) ([10.252.53.154]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2023 02:34:10 -0700 Message-ID: <4a94b44d-1b51-2656-786e-07bf97063c3f@linux.intel.com> Date: Tue, 23 May 2023 12:35:09 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.11.0 Subject: Re: [PATCH 1/2] tpm, tpm_tis: Handle interrupt storm Content-Language: en-US From: =?UTF-8?Q?P=c3=a9ter_Ujfalusi?= To: Lukas Wunner Cc: Lino Sanfilippo , peterhuewe@gmx.de, jarkko@kernel.org, jgg@ziepe.ca, jsnitsel@redhat.com, hdegoede@redhat.com, oe-lkp@lists.linux.dev, lkp@intel.com, peterz@infradead.org, linux@mniewoehner.de, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, l.sanfilippo@kunbus.com, p.rosenberger@kunbus.com References: <20230522143105.8617-1-LinoSanfilippo@gmx.de> <20230523074443.GA21236@wunner.de> <98f7dc1a-6bed-a66f-650e-10caeb7d0bca@linux.intel.com> In-Reply-To: <98f7dc1a-6bed-a66f-650e-10caeb7d0bca@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, sorry for the unwrapped lines... On 23/05/2023 12:14, Péter Ujfalusi wrote: > > > On 23/05/2023 10:44, Lukas Wunner wrote: >> On Tue, May 23, 2023 at 09:48:23AM +0300, Péter Ujfalusi wrote: >>> On 22/05/2023 17:31, Lino Sanfilippo wrote: >> [...] >>> This looked promising, however it looks like the UPX-i11 needs the DMI >>> quirk. >> >> Why is that? Is there a fundamental problem with the patch or is it >> a specific issue with that device? > > The flood is not detected (if there is a flood at all), interrupt stops > working after about 200 interrupts - in the latest boot at 118th. > I can check this later, likely tomorrow. With the patches and this diff: diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c index 8f4f2cb5520f..6a910d3277d5 100644 --- a/drivers/char/tpm/tpm_tis_core.c +++ b/drivers/char/tpm/tpm_tis_core.c @@ -795,6 +795,7 @@ static void tpm_tis_process_unhandled_interrupt(struct tpm_chip *chip) priv->last_unhandled_irq = jiffies; + pr_warn("[PETER] %s: unhandled_irqs: %d\n", __func__, priv->unhandled_irqs); if (priv->unhandled_irqs > MAX_UNHANDLED_IRQS) tpm_tis_handle_irq_storm(chip); } In some boot I don't get a print at all and reboot takes 2 minutes (tpm timeout), or as it happened now: # dmesg | grep tpm [ 4.306999] tpm_tis MSFT0101:00: 2.0 TPM (device-id 0x1B, rev-id 22) [ 4.325868] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 1 [ 4.325908] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 2 ... [ 4.329579] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 91 [ 5.129056] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 1 ... [ 5.129561] [PETER] tpm_tis_process_unhandled_interrupt: unhandled_irqs: 10 # cat /proc/interrupts | grep tpm 28: 0 0 0 133 IR-IO-APIC 28-fasteoi tpm0 Reboot takes in all cases 2 minutes to pass the timeout for the TPM2_CC_SHUTDOWN -- Péter