Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4867291rwd; Tue, 23 May 2023 13:57:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7+6wcHjRU1nA9GFd/R7CAn2BcMZ6LIssoruMeB9DPORgv9FZy9+0zPeLe2jU53fYWMEika X-Received: by 2002:a17:90a:b902:b0:24e:201e:dcbd with SMTP id p2-20020a17090ab90200b0024e201edcbdmr15929928pjr.21.1684875420280; Tue, 23 May 2023 13:57:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1684875420; cv=pass; d=google.com; s=arc-20160816; b=EAtFUSdLTU3h5sGuT3Zoe/BKYeJEwq7TCUmyLazMuZZEvV09J/R7zBLdxO0IQl1LPm asoh9WR/26wmy9MFjLryZ+HpCSRVpc/xNwS/baK+lKhcUvJCqVHdynbtsw1xD7IqGGf8 JAKIK4jssxeYsPwvHkw7GY5MdA+7poUU9tn6P4f3Jbq9EE4+se7MayTAJz2OjEhpK3Am 8+cNBfv6NhFiqd55+noMSKiYDNhuxRSX9tgO/osoTAX/Wsz9Uvi8B+UW/ICu+7qIOHe4 Ec3S+YHXNIU6VoAZndP2ysDKMczlnAjQDgJSFv8K3Ryu5vbEZMYtAtvARklHJyaIX0N3 xBMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=MREQLpgXMPp5hqFugSOst2Wpwa7K0YQwsTeiJXsY7zc=; b=F5iHa1qwS7h4SlnZJIagH7+GiZkTFxvxvYdoGTu2KGjoPu4c3l1qIPNdlECPttKLZh v955FSanAusWs3KzkoyGRjtB3tuEFbvPjFPSkacGRBK2FN0fTj7wnCmo/vh9eRguAjaJ F+YDYmrqr6Fg8yPYhK/vJhokp+KDtT63pheatqEIZxLAEA4/4ODLrJXzg1EO46s/jGQC o0rl0fKVh8fHHgzyEZ+ZegdZc9ej/0VIIkwYdkRT85X/oSHQWsHN28sS6/haUAIEQQwh aDV6o/+VtPie9GP60pEq74UlM45ikhReLuTr9ckQMQOCixEEcPnshwtmsH4rUi6boVg8 5W6Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kunbus.com header.s=selector1 header.b="sLCqlhH/"; arc=pass (i=1 spf=pass spfdomain=kunbus.com dkim=pass dkdomain=kunbus.com dmarc=pass fromdomain=kunbus.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a17090ae00b00b0024e43558fbdsi2621007pjy.129.2023.05.23.13.56.44; Tue, 23 May 2023 13:57:00 -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=@kunbus.com header.s=selector1 header.b="sLCqlhH/"; arc=pass (i=1 spf=pass spfdomain=kunbus.com dkim=pass dkdomain=kunbus.com dmarc=pass fromdomain=kunbus.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=kunbus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238578AbjEWUud (ORCPT + 99 others); Tue, 23 May 2023 16:50:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238095AbjEWUua (ORCPT ); Tue, 23 May 2023 16:50:30 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0623.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::623]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E06C8E; Tue, 23 May 2023 13:50:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=crDKVwMA58TYZT3d2k+1eknzBw0a7dExC/LrjamB8YNGUkIrMNMrjAzkibXjjI2KPVRZG99rFrxrmO1Lko7OwQ5Wt6kf1fNiQ2xKBnNj3aCeyVlaDIFNxU62RBMzv1lR5RF8n7ut5MXysZnHG58WXkSXBEQ6KLhVg03Hhhu+yr9Vy+1XgHqvqznvQ4c40s08IHpgJbBf9Q271wTTLQ+FhTbDUVHSFowDY7G0u8zl4EKJgnX2GZZT5C6aPM6RxAo/eUbXTgW1Icl0XGEjiyrtGZlgYUNP528ZfT7cy9JnLkzjw08HCgzXj94tP1IihtuoaLz5Q4G8qlvWoQ2F+ukv2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MREQLpgXMPp5hqFugSOst2Wpwa7K0YQwsTeiJXsY7zc=; b=TrQ5rTn/5LiUCuAoQCZmqukvC3WrjSDAJzcaPIjOaSZdW6TQvZiXBdyfBbt271meoqLSM+rtRk6IKjHw1WEH90cZEXQo9sojLkql4eLm7cApf3/XjG1t8qxImlYkJXcnf9EBArBfNYZLElUFsPK1W4a5iHcYxDoFY2g/oUvV4rjmLASbzWCf6SAxopnGDQdsJCGs+n1q3CvZl2geLOWA92UApSjansxQ2PCazh9eKBvSN6SNUsmpBf1nFoJDAAdmjjt8SWPerZHxwWYhHyNN9Rj1+u8VGC21cCEolv6VB2mlZ6tSt/wcltduc8pZ7OTFGSejoPQ8v+TgUDpPNeRrHg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=kunbus.com; dmarc=pass action=none header.from=kunbus.com; dkim=pass header.d=kunbus.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kunbus.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MREQLpgXMPp5hqFugSOst2Wpwa7K0YQwsTeiJXsY7zc=; b=sLCqlhH/EkqZ3R39qNRROLOv4qFXbLm4IrbZn5veB82H1t9ZPYd+ShNvjLkQwUGU9ruV5pJtXk9C1DXTGOiku9MCvsLOTMAJvuRzUJohFKKW8tS9WycgDS3q8Z5dNXiG1YI86w6Q3rhK9+tCJMOO5smNvpS1//84Gfxi/tfBk/c= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=kunbus.com; Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) by AS8P193MB2192.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:444::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.15; Tue, 23 May 2023 20:50:25 +0000 Received: from VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::6727:e3fb:8fec:72a6]) by VI1P193MB0413.EURP193.PROD.OUTLOOK.COM ([fe80::6727:e3fb:8fec:72a6%7]) with mapi id 15.20.6433.013; Tue, 23 May 2023 20:50:25 +0000 Message-ID: <6ca4496d-c125-ba01-8e1c-b05bb1fa57f2@kunbus.com> Date: Tue, 23 May 2023 22:50:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 1/2] tpm, tpm_tis: Handle interrupt storm Content-Language: en-US To: Jarkko Sakkinen , Lino Sanfilippo , peterhuewe@gmx.de, jgg@ziepe.ca Cc: jsnitsel@redhat.com, hdegoede@redhat.com, oe-lkp@lists.linux.dev, lkp@intel.com, peter.ujfalusi@linux.intel.com, peterz@infradead.org, linux@mniewoehner.de, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, lukas@wunner.de, p.rosenberger@kunbus.com References: <20230522143105.8617-1-LinoSanfilippo@gmx.de> From: Lino Sanfilippo In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0250.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:af::20) To VI1P193MB0413.EURP193.PROD.OUTLOOK.COM (2603:10a6:803:4e::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1P193MB0413:EE_|AS8P193MB2192:EE_ X-MS-Office365-Filtering-Correlation-Id: a8744d78-fc22-4fbb-8946-08db5bcf5514 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZKMm9vcw/OKzkp+yw+OtacR1+wGyoR00xnJIVbepnoubSO2PJtjfjKvWVvZMol4Cb5CDpOyFnMvV2s0Z+1DiHNDQ9zeo1vHrUIYbsZ1xVL6fxLtVIdCQeo60ZGh9Ywa5lpkSgYqcOFLScdMm2qi8JcPTMdEya9idw4ZbauXi5gAPLUvLgVbRbBAdN4XXcl4x1IBfSa9LboMH3P8vSHnYVNdXrSOJ2GgkWYubWz3isZTaU6NwK/CxsliOLKWLRuzshACw2udACFZDN9SK3+/nqh/RO3RCXIzOyp5ftLLXD/5I4gFbL4OVGA9JAo9gAkCnc6dHjJt3krIPXYZ/rP+MmY/pMNhjoNDdAHMcYRCCHaw7AIVo94WF6tn1SLUCHD7AcMtHY3C6fnSPmNxvvgQPlL+0ALmRAUYbFnf+8BuQjcQvlkkSPiSb1NmCQkz7eZtKKsBjjTp/vk7AiHkAB3AJdfNtSgP6qY6mOO43DKKRKsN+MXJfFXy8y0KpIv7UIwRK3PsoGbvFYZkeXVAiqcpaCcryV711nhP6XynR6KD03xorCEJ2tcrUPJ7zaXzvta1ghI3V3/uwteBG+P2ddvy/spap+/48zRxR5KPTedC9P2RWeiXTafr35K/rT8tcsi/gcPVOwueHdQfNVaqY9yG13Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1P193MB0413.EURP193.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(366004)(39840400004)(136003)(376002)(346002)(451199021)(83380400001)(6506007)(6512007)(31696002)(478600001)(86362001)(107886003)(53546011)(2616005)(186003)(2906002)(36756003)(38100700002)(8676002)(8936002)(7416002)(5660300002)(966005)(6486002)(110136005)(4326008)(52116002)(316002)(41300700001)(66476007)(66556008)(66946007)(31686004)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?L2kyVE5ZV1I2WGZncmpzK1VmU3RKQUd1dUovVUM2a21HQWVjY2R0RmI5NDBO?= =?utf-8?B?MmJPMnViQlpjRU1Ta0hzRlhzUFo3cmNkQVpOcEt1TVAxNGpOWHZ5ME9KaVZH?= =?utf-8?B?NmMvd2hxY1JOSjFKSmJwMk9ndnJGREc1bmxkVDQzVklZSmh0YndYb2NLbGFQ?= =?utf-8?B?cTd5djVFKzBLVUZRZHdSWjZBN2V1ZnQxeEpZT3lHZWFKdi9KVGVvdkQ3eHc0?= =?utf-8?B?Z2tlNFN2N3hteXVic0xBLytLdFN1SE5rdHBIUFByYUV6STZGeE5SY2QzS1Zu?= =?utf-8?B?QTJ5NEtMeU8vcEVZRUREMW16bHljM3cxZ29NUWIyZFcyKzQxZHFWV2Y5ZnNj?= =?utf-8?B?VmVWT1ZhLy85WE0venBDUVNLZTUwZ3pBSFdESGF1ZmFpL3A1WTN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=?utf-8?Q?z0VqVrvtkek9HlJgqH4QCwtkVQ5gklqOqbqRYyY4+vJU?= X-OriginatorOrg: kunbus.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8744d78-fc22-4fbb-8946-08db5bcf5514 X-MS-Exchange-CrossTenant-AuthSource: VI1P193MB0413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2023 20:50:24.8723 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: aaa4d814-e659-4b0a-9698-1c671f11520b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: bigWRwioUa8+yTAOCmYYD+FcHAEcs9XNgxmXvT6L5hyk209ZV71OQsW8VBDOlaLgvqdoV3rhoPiQJtV2n4C8CA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8P193MB2192 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS, SPF_PASS,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 On 23.05.23 21:00, Jarkko Sakkinen wrote: > ATTENTION: This e-mail is from an external sender. Please check attachments and links before opening e.g. with mouseover. > > > On Tue May 23, 2023 at 9:53 PM EEST, Jarkko Sakkinen wrote: >> On Mon May 22, 2023 at 5:31 PM EEST, Lino Sanfilippo wrote: >>> From: Lino Sanfilippo >>> >>> Commit e644b2f498d2 ("tpm, tpm_tis: Enable interrupt test") enabled >>> interrupts instead of polling on all capable TPMs. Unfortunately, on some >>> products the interrupt line is either never asserted or never deasserted. >>> >>> The former causes interrupt timeouts and is detected by >>> tpm_tis_core_init(). The latter results in interrupt storms. >>> >>> Recent reports concern the Lenovo ThinkStation P360 Tiny, Lenovo ThinkPad >>> L490 and Inspur NF5180M6: >>> >>> https://lore.kernel.org/linux-integrity/20230511005403.24689-1-jsnitsel@redhat.com/ >>> https://lore.kernel.org/linux-integrity/d80b180a569a9f068d3a2614f062cfa3a78af5a6.camel@kernel.org/ >>> >>> The current approach to avoid those storms is to disable interrupts by >>> adding a DMI quirk for the concerned device. >>> >>> However this is a maintenance burden in the long run, so use a generic >>> approach: >> >> I'm trying to comprehend how you evaluate, how big maintenance burden >> this would be. Adding even a few dozen table entries is not a >> maintenance burden. >> >> On the other hand any new functionality is objectively a maintanance >> burden of some measure (applies to any functionality). So how do we know >> that taking this change is less of a maintenance burden than just add >> new table entries, as they come up? > > I feel also a bit resistant because leaf driver framework is really > a wrong location in the kernel tree for IRQ storm detection. > > It would be better to have it signaled above the TPM driver, and the > driver would then just act on it. > I agree. But currently I do not see how to achieve this as there is no way to let a driver be informed about a detected interrupt storm. So the only solution I see for now is to implement it in the driver itself. Regards, Lino