Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751529AbdCNSSP (ORCPT ); Tue, 14 Mar 2017 14:18:15 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41795 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750768AbdCNSSN (ORCPT ); Tue, 14 Mar 2017 14:18:13 -0400 Subject: Re: [tpmdd-devel] [PATCH] tpm: Add sysfs interface to show TPM hardware version To: linux-kernel@vger.kernel.org References: <1489382517-9078-1-git-send-email-Meng.Li@windriver.com> <29B2C361-A0C0-410E-ACCA-07AFA382A251@gmx.de> Cc: tpmdd-devel@lists.sourceforge.net From: Ken Goldman Date: Tue, 14 Mar 2017 14:18:15 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <29B2C361-A0C0-410E-ACCA-07AFA382A251@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17031418-0048-0000-0000-000001256B0B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006781; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000206; SDB=6.00833794; UDB=6.00409398; IPR=6.00611451; BA=6.00005210; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014646; XFM=3.00000013; UTC=2017-03-14 18:18:10 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17031418-0049-0000-0000-00003FAA327F Message-Id: <9f67321b-50bd-9e6f-61f8-c29ae14f261f@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-14_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703140140 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 553 Lines: 14 On 3/13/2017 3:10 AM, Peter Huewe wrote: > And yes you are right there is currently no way, except for trial and > error, for the userspace to determine this. So an interface to get > this information makes sense to me. In practice, I suspect that a single user space application won't support both TPMs. It will send the first command, get an error response code that says it's the wrong TPM, and exit. Note that, although there is no overlap in the command API, the packet format is compatible enough that a meaningful response can be returned.