Message ID | 20230605175959.2131-1-Alexander.Steffen@infineon.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp2861542vqr; Mon, 5 Jun 2023 11:03:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ70riAFLXtcIOJcAefsersnYxGMl/wjDyPLhMI2kXKdcUfe4WDhzvnZ9cRx1j1Bk3FKcXOa X-Received: by 2002:a17:902:aa0a:b0:1b1:d39e:28bb with SMTP id be10-20020a170902aa0a00b001b1d39e28bbmr4612937plb.34.1685988205392; Mon, 05 Jun 2023 11:03:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685988205; cv=none; d=google.com; s=arc-20160816; b=F/GXnbbu/S/Z5b+sOzyPkTfbsW+Sw/rKtE53HYKLkK0wMdl/4wlgZok3z5HdAWmG+z Athwvu0vagUD8yaGbQCCBArRYNNCd3Ty7vB54L8fd6G2T3hYZDFXrwwjP3pderK2ZoDc cqw1zehHzZmWQtqKVGej2ebkmTJtaNbHdeXAnE9iXJE45Z8Y6E3fAhXt97wgLolo1Uw/ 0xKct0cLsT0pkQXRFeCqO8wA3RjSTlzWaObqjVV1dpqsB3d61ugVekUe3GO7EqJTIJB+ Qbgi9zb5fKFxw8Um6JaRk4tcx0NNlp7iCjkeCO8uIXG4qh+MezugRXuEofsB3pdQKhXJ yvow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=eJmIjGYOBGE5k8eQf/upg3Dc392gbCpQTeO3U7ybiGA=; b=CqU/KFMhYBOeCA8wSnY7d9+aJcVK+6kpVQDUkpye6uezPYJAKoa1APnhEJtngsHKzh /NFXcQ0JuTEOK9ZJjTWjwFZ9TOMFC11mhvxbZV6+xmZydnr7VT+cQYGaYpeOwOhT/BX6 H3/9qA7+86daa+DxEFfBVV/AcO6sYkGBOPmIqqJtWccDjPkpoViO1lvUBPeM1DXjtpHg yj3h3/2mZQByIaP4szHcpOTLPbAxIRcchDE2h/gsWM/b8Eoowbhubppqz+vXEgL7yGfB 90GqfZB36ahefDzxE4w7pnKXLvfdwOZ3dbujBOvwqKWF6c7z91DlIqe5P3/Gn5pUQm3D RQHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=F7yRS0hq; 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=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b3-20020a170903228300b001a9b9c32ab7si5700746plh.624.2023.06.05.11.03.10; Mon, 05 Jun 2023 11:03:25 -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=fail header.i=@infineon.com header.s=IFXMAIL header.b=F7yRS0hq; 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=fail (p=NONE sp=NONE dis=NONE) header.from=infineon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232868AbjFESAP (ORCPT <rfc822;pavtiger@gmail.com> + 99 others); Mon, 5 Jun 2023 14:00:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60870 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229837AbjFESAL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 5 Jun 2023 14:00:11 -0400 Received: from smtp14.infineon.com (smtp14.infineon.com [IPv6:2a00:18f0:1e00:4::6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DC8AA7; Mon, 5 Jun 2023 11:00:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1685988011; x=1717524011; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8IWVYvVYtCM1W6Km7UNlZHAd/e6kfZlmDZ4memutldE=; b=F7yRS0hqBuhzOUx35hzs2pFcRMFt273FyWDYKOsmsP54dLZMPMcTpzjl PbAFYrRu6bnpqEeBcFSoW65CPS07qGe8/r1HobLtU1QEz06VnvVWYzyzW NQG81vpJd6RqJ2RyYOSrBxgSInRthJE18YtNIGEwJy/oG5/0Hjxyj5KaI M=; X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="15904199" X-IronPort-AV: E=Sophos;i="6.00,218,1681164000"; d="scan'208";a="15904199" Received: from unknown (HELO MUCSE805.infineon.com) ([172.23.29.31]) by smtp14.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 20:00:09 +0200 Received: from KLUSE818.infineon.com (172.28.156.171) by MUCSE805.infineon.com (172.23.29.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Mon, 5 Jun 2023 20:00:08 +0200 Received: from ISCNPC0VBFBX.infineon.com (10.161.6.196) by KLUSE818.infineon.com (172.28.156.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Mon, 5 Jun 2023 20:00:07 +0200 From: Alexander Steffen <Alexander.Steffen@infineon.com> To: <jarkko@kernel.org>, <linux-integrity@vger.kernel.org>, <linux-kernel@vger.kernel.org> CC: Alexander Steffen <Alexander.Steffen@infineon.com> Subject: [PATCH 0/4] Recovery from data transfer errors for tpm_tis Date: Mon, 5 Jun 2023 19:59:55 +0200 Message-ID: <20230605175959.2131-1-Alexander.Steffen@infineon.com> X-Mailer: git-send-email 2.28.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.161.6.196] X-ClientProxiedBy: MUCSE804.infineon.com (172.23.29.30) To KLUSE818.infineon.com (172.28.156.171) X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767886700766628553?= X-GMAIL-MSGID: =?utf-8?q?1767886768116405169?= |
Series |
Recovery from data transfer errors for tpm_tis
|
|
Message
Alexander Steffen
June 5, 2023, 5:59 p.m. UTC
Data transfer to/from hardware TPM devices is not always fully reliable. The existing driver code contains already many checks to detect corrupted data (e.g. unexpected register values, CRC failures, etc.) and usually returns EIO in such cases. This series adds automatic retries to the command/response transmission in tpm_tis_send/tpm_tis_recv, so that occasional communication errors do not cause the command execution to fail and the perceived reliability of the TPM device is increased. v2: * Remove Change-Ids accidentially left in commit messages Alexander Steffen (4): tpm_tis: Explicitly check for error code tpm_tis: Move CRC check to generic send routine tpm_tis: Use responseRetry to recover from data transfer errors tpm_tis: Resend command to recover from data transfer errors drivers/char/tpm/tpm_tis_core.c | 73 +++++++++++++++++++++++++-------- drivers/char/tpm/tpm_tis_core.h | 1 + 2 files changed, 56 insertions(+), 18 deletions(-)