Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbdFTU6S (ORCPT ); Tue, 20 Jun 2017 16:58:18 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43266 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428AbdFTU6R (ORCPT ); Tue, 20 Jun 2017 16:58:17 -0400 Subject: Re: [tpmdd-devel] [PATCH] tpm: consolidate the TPM startup code Cc: linux-security-module@vger.kernel.org, tpmdd-devel@lists.sourceforge.net, open list References: <20170620181334.28363-1-jarkko.sakkinen@linux.intel.com> <20170620193152.GA3368@obsidianresearch.com> From: Ken Goldman Date: Tue, 20 Jun 2017 16:58:19 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <20170620193152.GA3368@obsidianresearch.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: 17062020-0056-0000-0000-0000038F281D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007263; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00877603; UDB=6.00437197; IPR=6.00657742; BA=6.00005432; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00015903; XFM=3.00000015; UTC=2017-06-20 20:58:13 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17062020-0057-0000-0000-000007C53EB7 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-06-20_10:,, 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-1703280000 definitions=main-1706200360 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: 384 Lines: 9 On 6/20/2017 3:31 PM, Jason Gunthorpe wrote: >> >> +#define TPM_ORD_STARTUP 153 +#define TPM_ST_CLEAR 1 > > We should really have a tpm1.h and tpm2.h that has all these various > constants and things instead of open coding them randomly all over.. While you're doing that, perhaps put the ordinal numbers in hex. The TPM 1.2 spec uses both hex and decimal, but TPM 2.0 uses hex.