From patchwork Thu Aug 4 15:40:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Berger X-Patchwork-Id: 655846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s4vL5689Kz9s36 for ; Fri, 5 Aug 2016 01:41:17 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bVKli-0004aY-Hs; Thu, 04 Aug 2016 15:41:10 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bVKlh-0004aO-5L for tpmdd-devel@lists.sourceforge.net; Thu, 04 Aug 2016 15:41:09 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of us.ibm.com designates 148.163.156.1 as permitted sender) client-ip=148.163.156.1; envelope-from=stefanb@us.ibm.com; helo=mx0a-001b2d01.pphosted.com; Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1bVKlf-0001ai-8i for tpmdd-devel@lists.sourceforge.net; Thu, 04 Aug 2016 15:41:09 +0000 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u74FY6ZH115675 for ; Thu, 4 Aug 2016 11:41:01 -0400 Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154]) by mx0a-001b2d01.pphosted.com with ESMTP id 24kkajmdp5-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 04 Aug 2016 11:41:00 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Aug 2016 09:40:59 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 4 Aug 2016 09:40:56 -0600 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: stefanb@us.ibm.com Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 63F7919D8059 for ; Thu, 4 Aug 2016 09:40:29 -0600 (MDT) Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u74Fewqv18416048 for ; Thu, 4 Aug 2016 15:40:58 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D6A7B6A001 for ; Thu, 4 Aug 2016 11:40:54 -0400 (EDT) Received: from d50lp02.ny.us.ibm.com (unknown [146.89.104.208]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTPS id BE48D5E002 for ; Thu, 4 Aug 2016 11:40:54 -0400 (EDT) Received: from localhost by d50lp02.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 4 Aug 2016 11:40:54 -0400 Received: from smtp.notes.na.collabserv.com (192.155.248.91) by d50lp02.ny.us.ibm.com (158.87.18.21) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128/128) Thu, 4 Aug 2016 11:40:53 -0400 X-IBM-Helo: smtp.notes.na.collabserv.com X-IBM-MailFrom: stefanb@us.ibm.com Received: from localhost by smtp.notes.na.collabserv.com with smtp.notes.na.collabserv.com ESMTP for from ; Thu, 4 Aug 2016 15:40:51 -0000 Received: from us1a3-smtp02.a3.dal06.isc4sb.com (10.106.154.159) by smtp.notes.na.collabserv.com (10.106.227.143) with smtp.notes.na.collabserv.com ESMTP; Thu, 4 Aug 2016 15:40:48 -0000 X-IBM-Helo: us1a3-smtp02.a3.dal06.isc4sb.com X-IBM-MailFrom: stefanb@us.ibm.com Received: from us1a3-mail155.a3.dal06.isc4sb.com ([10.146.38.88]) by us1a3-smtp02.a3.dal06.isc4sb.com with ESMTP id 2016080415404853-358981 ; Thu, 4 Aug 2016 15:40:48 +0000 To: "moderated list:TPM DEVICE DRIVER" , "Jarkko Sakkinen" From: "Stefan Berger" Date: Thu, 4 Aug 2016 11:40:48 -0400 MIME-Version: 1.0 X-KeepSent: 39017581:C0F42D48-00258005:0054AEBE; type=4; name=$KeepSent X-Mailer: IBM Notes Release 9.0.1FP5 SHF190 February 24, 2016 X-LLNOutbound: False X-Disclaimed: 11363 X-TNEFEvaluated: 1 x-cbid: 16080415-0020-0000-0000-0000097BA9EA X-IBM-ISS-SpamDetectors: Score=0.423878; BY=0; FL=0; FP=0; FZ=0; HX=0; KW=0; PH=0; SC=0.423878; ST=0; TS=0; UL=0; ISC= X-IBM-ISS-DetailInfo: BY=3.00005548; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000178; SDB=6.00739937; UDB=6.00347954; UTC=2016-08-04 15:40:50 x-cbparentid: 16080415-9952-0000-0000-0000007AB7AA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005548; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000178; SDB=6.00739936; UDB=6.00347954; IPR=6.00512535; BA=6.00004644; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012156; XFM=3.00000011; UTC=2016-08-04 15:40:59 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-08-04_09:, , 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-1604210000 definitions=main-1608040171 X-Spam-Score: -0.5 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record 1.0 HTML_MESSAGE BODY: HTML included in message X-Headers-End: 1bVKlf-0001ai-8i Subject: [tpmdd-devel] Latest tip of the tree issues X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces@lists.sourceforge.net Jarkko, when building the latest tree I have the following two issues when building with modules: - missing exported symbols tpm_getcap and tpm2_get_tpm_pt. See the patch below that should be squashed into the patch(es) that introduced the problem (so one can bisect) - the probing of TPM 1.2 doesn't work anymore ; the bad patch seems to be the tip: commit 783fa18d7bb7bac20b8591cf575418fce31dd397 Author: Jarkko Sakkinen Date: Fri Jun 17 13:12:20 2016 +0200 tpm: use tpm_pcr_read_dev() in tpm_do_selftest() Instead of a ad-hoc protocol message construction it is better to call tpm_pcr_read_dev(). Signed-off-by: Jarkko Sakkinen Reviewed-by: Jason Gunthorpe # dmesg | grep tpm [ 4.385205] tpm_tis 00:05: 1.2 TPM (device-id 0x1, rev-id 1) [ 4.424537] tpm tpm0: TPM self test failed [ 4.426630] tpm_tis: probe of 00:05 failed with error -14 The reason for this is that rc in the following is 0. do { /* Attempt to read a PCR value */ rc = tpm_pcr_read_dev(chip, 0, dummy); Looking at tpm_pcr_read_dev, returning 0 is quite ok. Stefan (sizeof(struct tpm_input_header) + \ ------------------------------------------------------------------------------ diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index f43cc3f..3722fc0 100644 --- a/drivers/char/tpm/tpm-interface.c +++ b/drivers/char/tpm/tpm-interface.c @@ -458,6 +458,7 @@ ssize_t tpm_getcap(struct tpm_chip *chip, __be32 subcap_id, cap_t *cap, *cap = tpm_cmd.params.getcap_out.cap; return rc; } +EXPORT_SYMBOL_GPL(tpm_getcap); #define TPM_ORD_STARTUP cpu_to_be32(153) #define TPM_ST_CLEAR cpu_to_be16(1) diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c index e1db404..499f405 100644 --- a/drivers/char/tpm/tpm2-cmd.c +++ b/drivers/char/tpm/tpm2-cmd.c @@ -707,6 +707,7 @@ ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id, u32 *value, return rc; } +EXPORT_SYMBOL_GPL(tpm2_get_tpm_pt); #define TPM2_STARTUP_IN_SIZE \