Message ID | 20230605175250.2055-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 k13csp2860667vqr; Mon, 5 Jun 2023 11:02:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7cRCf7DiwY80UgzhV1NQETYm+VDk6MuBQGuq+GvCLNonHdwgKi3HrxmcTJ8FgR73lW3b6Q X-Received: by 2002:a05:6a00:b4e:b0:652:efd7:bbc3 with SMTP id p14-20020a056a000b4e00b00652efd7bbc3mr433037pfo.21.1685988140945; Mon, 05 Jun 2023 11:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685988140; cv=none; d=google.com; s=arc-20160816; b=wr9GXx2Fu48UHIc130nYTySivtQQkiyYSf0DI1DSHQU4MnWF0CsY1SMxkl4a92HG2T Y0hUKn4rhESA2NVgzgihJwSMOozefsWpV3fa7m8p6cH2dVc/5+QkOTOTBvsVINWBmIH7 FX/tLxY01yZwmPCuFEiZSnEmj3SQ4zaSw8aJLqnUA9vBYbLD3ebO/OVno/5kOwi5agOy VYtdI31rlsW60JMAvJvuMAV8Cmmfol4HnUYQO4bSICQNs/0ve5u2d/3q6SSuZvkgCBax TD+Rfib67YL4Wu8peVkcWz4C9Ab3hcHSyaq7inKSqYP8sAOgbYkyYjIg98B3dBUxJGMB lTCQ== 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=NPj1zgRpt/utIGLQyua2L7TUWyt/rLBXwm6GkzRd0KQ=; b=nbfOjvs4sSH6pHxBJs3p68dAJ7iyLJl8MFpPQw/NK+uG6Dlj3deAiktYsHv7PeI8t8 oXDNJLxmW9AS1mFpflvVHR643NxOGdiuVFnyXP7a7Urr0l/hXdpa8zEwT8Gm9h6Pv5uE 3P//Oea7ruZYF5SJFY8OvKDdBybD5yCFJ9uicuMNcP1VwP4faOOjb8AU3LhusjUDE7mp IUnYQGIfX44BtvDBj7h2RBPqIUQYvHhOgQn7spPo92W+kf3tTnR3jHCQfXlBeUeCF1PV EHy2FIsfJm6pMwWyzM/nshBaYfeL6pDC87eBsmJclbCm40HRL7uWGtE2LUUCprkB0eIf ec1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infineon.com header.s=IFXMAIL header.b=HLbW674W; 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 e22-20020aa79816000000b0064d42dddf9fsi5453809pfl.32.2023.06.05.11.02.06; Mon, 05 Jun 2023 11:02:20 -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=HLbW674W; 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 S235176AbjFERx2 (ORCPT <rfc822;pavtiger@gmail.com> + 99 others); Mon, 5 Jun 2023 13:53:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232442AbjFERx0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 5 Jun 2023 13:53:26 -0400 Received: from smtp11.infineon.com (smtp11.infineon.com [IPv6:2a00:18f0:1e00:4::5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 767F9FA; Mon, 5 Jun 2023 10:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1685987606; x=1717523606; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=6oSGxo7KhdgY2EaqkGYhnYQNSZWnS+0OjH67GWXxekc=; b=HLbW674Wl3ANLB/B2sbifcLvc4s3GoooHaOH9fEzlfhcpC5Dqfaoqnhv xoUyGOlNuG18vE3pOHCjpVcfN3RqfblGMTHLQaokRq5J+eUxBovgGJ6Yt GRyivMhoM35FSxK74I65DS03mSovjYUWJu+6rtZ4GAFgGEwRhewCFSJXG U=; X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="17446196" X-IronPort-AV: E=Sophos;i="6.00,218,1681164000"; d="scan'208";a="17446196" Received: from unknown (HELO MUCSE819.infineon.com) ([172.23.29.45]) by smtp11.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 19:53:24 +0200 Received: from KLUSE818.infineon.com (172.28.156.171) by MUCSE819.infineon.com (172.23.29.45) 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 19:53:23 +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 19:53:23 +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:52:46 +0200 Message-ID: <20230605175250.2055-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: MUCSE817.infineon.com (172.23.29.43) 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?1767886700766628553?= |
Series | Recovery from data transfer errors for tpm_tis | |
Message
Alexander Steffen
June 5, 2023, 5:52 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. 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(-)