From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751865AbcGOBjL (ORCPT ); Thu, 14 Jul 2016 21:39:11 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:36570 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751279AbcGOBjI (ORCPT ); Thu, 14 Jul 2016 21:39:08 -0400 From: Andrey Pronin To: Jarkko Sakkinen Cc: Peter Huewe , Marcel Selhorst , Jason Gunthorpe , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Andrey Pronin , groeck@chromium.org, smbarber@chromium.org, dianders@chromium.org Subject: [PATCH 0/2] tpm: add optional max xfer size check Date: Thu, 14 Jul 2016 18:39:03 -0700 Message-Id: <1468546745-14646-1-git-send-email-apronin@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset introduces an optional maximum transfer size that can be specified by a tpm driver. Setting the max_xfer_size helps to catch the cases when burstcnt is incorrectly reported by the device (e.g. >64 for spi - happened in practice) and gracefully handle such situations. Andrey Pronin (2): tpm_tis_core: add optional max xfer size check tpm_tis_spi: add max xfer size drivers/char/tpm/tpm_tis_core.c | 17 +++++++++++++++-- drivers/char/tpm/tpm_tis_core.h | 13 +++++++++++++ drivers/char/tpm/tpm_tis_spi.c | 1 + 3 files changed, 29 insertions(+), 2 deletions(-) -- 2.6.6