Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3586805ybb; Mon, 6 Apr 2020 11:31:02 -0700 (PDT) X-Google-Smtp-Source: APiQypKLr4XDPAnQPPgSKyjQooSdP8VwJKn0mCkDXS+5SAFhfL27Y1n4Kbq9mpkAynRy/b2bSl4P X-Received: by 2002:a4a:2cc6:: with SMTP id o189mr462802ooo.20.1586197862219; Mon, 06 Apr 2020 11:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586197862; cv=none; d=google.com; s=arc-20160816; b=jOyG1xnb/gigm6PoAUfBsGK7DIeHtgMYswbgyOY0MA0mlppiv6vrN97aqIRuCmY4oT 5JOczgbEIGrMhLSBxwK+AKGDRTLdSZH/S0Bo83vfqtjg1C2bGPut3cJdHnb3P32pb24v aDEEPY5Lh5Jvj1EhCD+Jw+Yae+GBg+KhPxGioMu+TpIKtEM6FqZrUpR7mZBAOdfccqVr thm7JQ/PNYHInTtZE7xzDFSL44bCBhYkXgIh/C56sg+TDVNC6q67Bw1wFoSrxVBVwiLC 5Hb9RVRXAjWTkyfswNLSOkVgVunbM8mSmUglziZ4CLtXEMBy6XC+LIm2NBw9E7hIXlFC YMSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:ironport-sdr:ironport-sdr; bh=H0xo++XpB2wbzNUf97lLG4bUWTIWsDc2LQCJipln/6A=; b=lPY/m7vu5MkVDgHghBn3ebYAytuJzKEEVIiBUjasIF/sPek7Y+iN0L2C2Gl6UIPDwt ME/XygfG61MEIWVYVxniKISnuuGxHw+vqy0rDP8MzPGqvm78PlAQ4/0xqHVaC3t5iCZF HrZo9f8r1S2kFOWKpAlf9UMgxqTaCOtZ0otO9NSkPMh/4bdtS+RJb8TFNRP0ZwLwRJTN R85n6XmxBZbKrIwp9o5UGROfgdI2okQ5kpvBXjbOFqazzHvG6M7itr/VMRydIVtEmJ+C M4/fWMboAnGCesq8d8htcGpfsxLCDR1dvHU1x1zAzVTmCJeeexNOlXIrbJAhFQ7J0UST wQjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t193si7626813oih.61.2020.04.06.11.30.42; Mon, 06 Apr 2020 11:31:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726220AbgDFS3H (ORCPT + 99 others); Mon, 6 Apr 2020 14:29:07 -0400 Received: from mga18.intel.com ([134.134.136.126]:60637 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbgDFS3H (ORCPT ); Mon, 6 Apr 2020 14:29:07 -0400 IronPort-SDR: zdY2ZwOyo9enom4KOHelaPIJyTNC1sTqT302hfq6AuZnJAUvtGO2pxmqMuozJBLEU4gMhDKEnw 9M9yLFGf7KEw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Apr 2020 11:29:05 -0700 IronPort-SDR: Xkt7Xtn/+sHG0FniHBkUYaEK4aGrUhaQuxkz8qhNnpo04b6z/seQo7xmHzFRH2j/1mbmy15gPb G3wEuwtNtIFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,352,1580803200"; d="scan'208";a="452163192" Received: from yweiss1-mobl.ger.corp.intel.com (HELO localhost) ([10.252.49.159]) by fmsmga006.fm.intel.com with ESMTP; 06 Apr 2020 11:29:00 -0700 Date: Mon, 6 Apr 2020 21:28:59 +0300 From: Jarkko Sakkinen To: amirmizi6@gmail.com Cc: Eyal.Cohen@nuvoton.com, oshrialkoby85@gmail.com, alexander.steffen@infineon.com, robh+dt@kernel.org, peterhuewe@gmx.de, christophe-h.richard@st.com, jgg@ziepe.ca, arnd@arndb.de, gregkh@linuxfoundation.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org, oshri.alkoby@nuvoton.com, tmaimon77@gmail.com, gcwilson@us.ibm.com, kgoldman@us.ibm.com, Dan.Morav@nuvoton.com, oren.tanami@nuvoton.com, shmulik.hager@nuvoton.com, amir.mizinski@nuvoton.com, Christophe Ricard Subject: Re: [PATCH v5 2/7] tpm: tpm_tis: Add check_data handle to tpm_tis_phy_ops in order to check data integrity Message-ID: <20200406182859.GC20105@linux.intel.com> References: <20200405125352.183693-1-amirmizi6@gmail.com> <20200405125352.183693-3-amirmizi6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200405125352.183693-3-amirmizi6@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Short summary could just be: "Add check_data handle() to struct tpm_tis_phy_ops" and leave the reasoning to the long description. On Sun, Apr 05, 2020 at 03:53:47PM +0300, amirmizi6@gmail.com wrote: > From: Amir Mizinski > > In order to compute the crc over the data sent in lower layer > (I2C for instance), tpm_tis_check_data() calls an operation (if available) > to check data integrity. If data integrity cannot be verified, a retry > attempt to save the sent/received data is implemented. It does not. The existing code does not do that. Also it is not clear whether the steps are from existing code or after this commit has been applied. /Jarkko