Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1017708pxu; Fri, 16 Oct 2020 01:24:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxm5fYjK/X5Pe0KqL1BiG0kJf6ZQA1n516XiMuJO+bAwIH+W3aeRZWWaK4/Ai08BOAPZaBt X-Received: by 2002:a17:906:1b0d:: with SMTP id o13mr2486054ejg.526.1602836663472; Fri, 16 Oct 2020 01:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602836663; cv=none; d=google.com; s=arc-20160816; b=HRku3DsXLm1o0z2XySxKLlcIxXO/A4VYUyKd13vUNZSrk3J6jArHS00rByF/lxD4WZ xT5l6JTcH2pvSwI9D78M/ndWGbShSdIIsm3hHl2QE2sljkqllI/QUg6MGjHEFtsWWK/4 a8FRShokbh8397+LRxCUKD0f7QCcV4BxWJkb5EqauIvUQtsOuPOPbAlnTJ8Tn9DM/KDy N2mH6fXVXdP5LRP3ahmlv4ooXGUhOZUum65SRAxnNGm1LjbN2F2ys8PRzIx9EI360CZq AfnnQWVWBwFXulRrgQAU/wzWhCbYp/iC0I0gzXx1trRo7AAX/GwP3DHxMu84kZBNjdaz f6EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=lhTK8mlZxJsJRt3mlsGbPE50FFeq5Q196dDwcFogQmo=; b=UABjTpRObOPmpOBGFs4H9Rh9Uy43AR8AE0TM0PBFfCdsWMQPHtKgATO1VEb1+P2pcd +Ta0RMwoMXFv+IbSN8y5KVHhL6IlmrUcktvtBVHIW/uuYAlOAM4wVaf8igSLQEY+noy9 Ew2rR4lmRfrjQF8/3C3dd3Bd3UzU3nZjkPq76R0V0J4pDOIw7NsAw8TPiUKfXeVHs/k9 gBZJhXM3Cu4jgLtsNqulO+AWPxLN5qtL4AnESQsRla0OtCdtqbc/RkrprHTo9zhdfOtc 0Ira16Orfr1U2jP+ELzP72AN/WH2Jr5WqnUeyNZU+1CgwtBlrwj6l5KYuqPVcNgoYaFC zYLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="hJfsxaY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id d18si1248510ejz.660.2020.10.16.01.24.01; Fri, 16 Oct 2020 01:24:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="hJfsxaY/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2404100AbgJPGMa (ORCPT + 99 others); Fri, 16 Oct 2020 02:12:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50329 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2393968AbgJPGM3 (ORCPT ); Fri, 16 Oct 2020 02:12:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1602828748; h=from:from: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=lhTK8mlZxJsJRt3mlsGbPE50FFeq5Q196dDwcFogQmo=; b=hJfsxaY/3vRvC1Wxg2gQ/wcsb5ORnX8UCcjrvTpqHphl3C3hB/N/JY5AGR2VMZGNaEROYH Pl6dZPA/6j0ZJJkIsxfYr2+PUuuygDhL+EG9gMqhfoizdGzg1fjmZb+95uElAH4ulOnNye Re9VnkZFkVgIgX4KxElhM0PAey58cxc= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-113-XebdCiUhN1ybm8dBxLj-bQ-1; Fri, 16 Oct 2020 02:12:26 -0400 X-MC-Unique: XebdCiUhN1ybm8dBxLj-bQ-1 Received: by mail-ej1-f72.google.com with SMTP id i21so530131ejb.5 for ; Thu, 15 Oct 2020 23:12:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=lhTK8mlZxJsJRt3mlsGbPE50FFeq5Q196dDwcFogQmo=; b=cqEmNQlhB640kc0VNikPuGA+IgBlLXRNsFN7fPNUF2fQwmHxWdGV3y2JpqQq4NvWM5 y5+ZTeFk1Qgp2b9NT+fOjhbze3i/Gq/PYRByLLIWLA8LZEQCU3PIdGaECbji1W0qXO8b lwes3bImzYXY5nKoauLvB2g6ojHUKasLHwNBNJPCH2jUFu3Qycs7g/68DH60qewIi4T6 E5MRPZ3HpxLZhGfmlCm6IqQG80FxGZMl8zIj5Mh+aDOgdmKhwC9M7/ayPN2CtuNnYMcT OkvxrqzArsisEujEFbemLqJkAwaJ3T618UmuajzEhaXAEE0wKAitekmL3FVN7DXzKsEo PnHQ== X-Gm-Message-State: AOAM532jDHc02uh4L9qJXHHbpPpaG1WHJ+x/NsPXog8ZimVIT95Mu9XB xBGKpEUP8TuVT4MwkkYNibaHTzmY3viJ1EESr5KOWXriMN0bS6SyKl42K6vUUAD7ozOQdHnzLHI YD1GLpbt+6cecmz3QBsX/CW/t X-Received: by 2002:a17:906:24cd:: with SMTP id f13mr2017855ejb.329.1602828745170; Thu, 15 Oct 2020 23:12:25 -0700 (PDT) X-Received: by 2002:a17:906:24cd:: with SMTP id f13mr2017835ejb.329.1602828744997; Thu, 15 Oct 2020 23:12:24 -0700 (PDT) Received: from x1.localdomain (2001-1c00-0c0c-fe00-d2ea-f29d-118b-24dc.cable.dynamic.v6.ziggo.nl. [2001:1c00:c0c:fe00:d2ea:f29d:118b:24dc]) by smtp.gmail.com with ESMTPSA id u26sm625366edt.39.2020.10.15.23.12.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Oct 2020 23:12:24 -0700 (PDT) Subject: Re: [PATCH] tpm_tis: Disable interrupts on ThinkPad T490s To: Matthew Garrett , Jerry Snitselaar Cc: linux-integrity , Linux Kernel Mailing List , jarkko@kernel.org, Peter Huewe , Jason Gunthorpe , James Bottomley References: <20201015214430.17937-1-jsnitsel@redhat.com> From: Hans de Goede Message-ID: <78839bb8-dd17-0e55-3d22-be476b71ece5@redhat.com> Date: Fri, 16 Oct 2020 08:12:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 10/16/20 12:39 AM, Matthew Garrett wrote: > On Thu, Oct 15, 2020 at 2:44 PM Jerry Snitselaar wrote: >> >> There is a misconfiguration in the bios of the gpio pin used for the >> interrupt in the T490s. When interrupts are enabled in the tpm_tis >> driver code this results in an interrupt storm. This was initially >> reported when we attempted to enable the interrupt code in the tpm_tis >> driver, which previously wasn't setting a flag to enable it. Due to >> the reports of the interrupt storm that code was reverted and we went back >> to polling instead of using interrupts. Now that we know the T490s problem >> is a firmware issue, add code to check if the system is a T490s and >> disable interrupts if that is the case. This will allow us to enable >> interrupts for everyone else. If the user has a fixed bios they can >> force the enabling of interrupts with tpm_tis.interrupts=1 on the >> kernel command line. > > I think an implication of this is that systems haven't been > well-tested with interrupts enabled. In general when we've found a > firmware issue in one place it ends up happening elsewhere as well, so > it wouldn't surprise me if there are other machines that will also be > unhappy with interrupts enabled. Would it be possible to automatically > detect this case (eg, if we get more than a certain number of > interrupts in a certain timeframe immediately after enabling the > interrupt) and automatically fall back to polling in that case? It > would also mean that users with fixed firmware wouldn't need to pass a > parameter. IIRC then at least on the T490 the irq storm caused systems to not boot in some cases. I guess if we detect the storm and disable the irq we might fix that... OTOH this problem seems to only hit a certain generation of Thinkpads so with some luck the denylist should not be too big and the denylist approach should work. Regards, Hans