Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752221AbdHIUZR (ORCPT ); Wed, 9 Aug 2017 16:25:17 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56062 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751890AbdHIUZP (ORCPT ); Wed, 9 Aug 2017 16:25:15 -0400 Subject: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, linux-ima-devel@lists.sourceforge.net References: <20170807114632.1339-1-nayna@linux.vnet.ibm.com> <20170808191145.kggmoczd5laiccrn@linux.intel.com> From: Ken Goldman Date: Wed, 9 Aug 2017 16:25:48 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170808191145.kggmoczd5laiccrn@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17080920-0008-0000-0000-0000026C142B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007514; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000219; SDB=6.00899962; UDB=6.00450513; IPR=6.00680167; BA=6.00005520; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016615; XFM=3.00000015; UTC=2017-08-09 20:25:12 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17080920-0009-0000-0000-00003651D1C8 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-08-09_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1708090320 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1800 Lines: 48 On 8/8/2017 3:11 PM, Jarkko Sakkinen wrote: > On Mon, Aug 07, 2017 at 01:52:34PM +0200, Peter Huewe wrote: >> Are you sure this is a good idea? >> On lpc systems this more or less stalls the bus, including keyboard/mouse (if connected via superio lpc). >> >> On which systems have you tested this? >> Spi/Lpc? Architecture? >> >> This might not be noticable for small transfers, but think about much larger transfers.... >> >> Imho: NACK from my side. >> >> Thanks, >> Peter > > Thanks Peter, a great insight. TPM could share the bus with other > devices. Even if this optimizes the performance for TPM it might cause > performance issues elsewhere. Does anyone know of platforms where this occurs? I suspect (but not sure) that the days of SuperIO connecting floppy drives, printer ports, and PS/2 mouse ports on the LPC bus are over, and such legacy systems will not have a TPM. Would SuperIO even support the special TPM LPC bus cycles? Even then, the wait states of a mhz speed LPC are likely to be usec, not noticeable for even a mouse. Is this a reasonable assumption? If so, to we affect TPM performance to the point where it's unusable to help a case that is unlikely to appear in current platforms? > > One more viewpoint: TCG must added the burst count for a reason (might > be very well related what Peter said). Is ignoring it something that TCG > recommends? Not following standard exactly in the driver code sometimes > makes sense on *small details* but I would not say that this a small > detail... I checked with the TCG's device driver work group (DDWG). Both the spec editor and 3 TPM vendors - Infineon, Nuvoton, and ST Micro - agreed that ignoring burst count may incur wait states but nothing more. Operations will still be successful.