Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755338Ab2K1RtU (ORCPT ); Wed, 28 Nov 2012 12:49:20 -0500 Received: from eu1sys200aog108.obsmtp.com ([207.126.144.125]:57452 "EHLO eu1sys200aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752324Ab2K1RtS (ORCPT ); Wed, 28 Nov 2012 12:49:18 -0500 From: Mathias LEBLANC To: Kent Yoder Cc: Kent Yoder , Jean-Luc BLANC , "linux-kernel@vger.kernel.org" , Rajiv Andrade , "tpmdd-devel@lists.sourceforge.net" , Sirrix AG Date: Wed, 28 Nov 2012 18:48:57 +0100 Subject: RE: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics ST33 I2C KERNEL 3.x.x Thread-Topic: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics ST33 I2C KERNEL 3.x.x Thread-Index: Ac3NfW8CecWM+6d0QK6Cs5zaEdVqOAAD+9Oo Message-ID: <35286B1AE75A7C47BFF0870081A31B4B3A9B501757@SAFEX1MAIL4.st.com> References: <1353363322-2923-1-git-send-email-mathias.leblanc@st.com> <20121126174632.GA12737@ennui.austin.ibm.com> <35286B1AE75A7C47BFF0870081A31B4B3A9B501754@SAFEX1MAIL4.st.com> <35286B1AE75A7C47BFF0870081A31B4B3A9B501755@SAFEX1MAIL4.st.com>, In-Reply-To: Accept-Language: en-US Content-Language: en-GB X-MS-Has-Attach: yes X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/mixed; boundary="_002_35286B1AE75A7C47BFF0870081A31B4B3A9B501757SAFEX1MAIL4st_" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 49743 Lines: 755 --_002_35286B1AE75A7C47BFF0870081A31B4B3A9B501757SAFEX1MAIL4st_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Ok, so i have patch the ST33 I2C driver on this branch and correct some err= ors. I send you the patch for the kernel 3.x=20 I have no error on compilation, tell me if you have problems. I have implemented the tpm_do_selftest function to get the tpm ready, but i= t can be removed ________________________________________ From: Kent Yoder [shpedoikal@gmail.com] Sent: 28 November 2012 16:31 To: Mathias LEBLANC Cc: Kent Yoder; Jean-Luc BLANC; linux-kernel@vger.kernel.org; Rajiv Andrade= ; tpmdd-devel@lists.sourceforge.net; Sirrix AG Subject: Re: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics ST33 I2C KER= NEL 3.x.x On Wed, Nov 28, 2012 at 2:54 AM, Mathias LEBLANC w= rote: > Hi Kent, > > I have been tried the patch on your linux branch and indeed, i have an er= ror about tpm_continue_seftest. > What is the kernel I should use to test officially my patch? Because i sa= w a lot of different version of linux kernel with the tpm_continue_seftest = function. > I used this repo git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/l= inux-2.6 for my tests. The tree url I sent you is the correct one. Make sure you use the "next" branch. Kent > Matthias Leblanc > > ________________________________________From: Kent Yoder [shpedoikal@gmai= l.com] > Sent: 27 November 2012 15:48 > To: Mathias LEBLANC > Cc: Kent Yoder; Jean-Luc BLANC; linux-kernel@vger.kernel.org; Rajiv Andra= de; tpmdd-devel@lists.sourceforge.net; Sirrix AG > Subject: Re: [tpmdd-devel] [PATCH 1/1] TPM: STMicroelectronics ST33 I2C K= ERNEL 3.x.x > > On Tue, Nov 27, 2012 at 2:44 AM, Mathias LEBLANC = wrote: >> Hi Kent, >> >> What's version of the kernel do you compiled? >> I don't understand why you have some problem with formating, i have send= you the patch with no error and warning of code formating. >> The tpm_continue_selftest_nocheck() (in kernel 3.x.x) and tpm_continue_= selftest() (in kernel 2.6.x) is called to have the tpm ready. >> If the tpm_continue_selftest is not called by the driver, it will be use= in the applications. > > Apply against this tree's "next" branch. > > git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git > > Thanks, > Kent > >> Regards, >> >> Matthias Leblanc >> ________________________________________ >> From: Kent Yoder [key@linux.vnet.ibm.com] >> Sent: 26 November 2012 18:46 >> To: Mathias LEBLANC >> Cc: Rajiv Andrade; Marcel Selhorst; Sirrix AG; tpmdd-devel@lists.sourcef= orge.net; Debora Velarde; linux-kernel@vger.kernel.org; Jean-Luc BLANC >> Subject: Re: [PATCH 1/1] TPM: STMicroelectronics ST33 I2C KERNEL 3.x.x >> >> Hi Mathias, >> >> On Mon, Nov 19, 2012 at 11:15:21PM +0100, Mathias Leblanc wrote: >>> * STMicroelectronics version 1.2.0, Copyright (C) 2010 >>> * STMicroelectronics comes with ABSOLUTELY NO WARRANTY. >>> * This is free software, and you are welcome to redistribute it >>> * under certain conditions. >> >>> This is the driver for TPM chip from ST Microelectronics. >>> >>> If you have a TPM security chip from STMicroelectronics working with >>> an I2C, in menuconfig or .config choose the tpm driver on >>> device --> tpm and activate the protocol of your choice before compilin= g >>> the kernel. >>> The driver will be accessible from within Linux. >>> >>> Tested on linux x86/x64, beagleboard REV B & XM REV C and CHROMIUM OS >>> on kernel 3.x.x >>> >>> Signed-off-by: Mathias Leblanc >>> --- >>> drivers/char/tpm/tpm_stm_st33_i2c.c | 903 ++++++++++++++++++++++++++= ++++++++ >>> drivers/char/tpm/tpm_stm_st33_i2c.h | 81 +++ >>> include/linux/i2c/tpm_stm_st33_i2c.h | 47 ++ >>> 3 files changed, 1031 insertions(+) >>> create mode 100644 drivers/char/tpm/tpm_stm_st33_i2c.c >>> create mode 100644 drivers/char/tpm/tpm_stm_st33_i2c.h >>> create mode 100644 include/linux/i2c/tpm_stm_st33_i2c.h >> >> I'm still getting the compiler errors I mentioned earlier. I've fixed >> them up with the patch below (plus some formatting), all except for the >> tpm_continue_selftest_nocheck() problem. Do you really need to call >> continue selftest on resume? That strikes me as out of place here. >> What's making the call to the TPM to start the self test in that case? >> >> Please test with the patch below. >> >> Thanks, >> Kent >> >> >> diff --git a/drivers/char/tpm/tpm_stm_st33_i2c.c b/drivers/char/tpm/tpm_= stm_st33_i2c.c >> index 52f3380..67f81b6 100644 >> --- a/drivers/char/tpm/tpm_stm_st33_i2c.c >> +++ b/drivers/char/tpm/tpm_stm_st33_i2c.c >> @@ -722,7 +722,7 @@ tpm_st33_i2c_probe(struct i2c_client *client, const = struct i2c_device_id *id) >> goto _irq_set; >> >> intmask =3D TPM_GLOBAL_INT_ENABLE; >> - err =3D I2C_WRITE_DATA(client, TPM_INT_ENABLE + 3, &intm= ask, 1); >> + err =3D I2C_WRITE_DATA(client, (TPM_INT_ENABLE + 3), &in= tmask, 1); >> if (err < 0) >> goto _irq_set; >> >> @@ -820,10 +820,10 @@ static int tpm_st33_i2c_pm_suspend(struct i2c_clie= nt *client, pm_message_t mesg) >> >> if (power_mgt) >> gpio_set_value(pin_infos->io_lpcpd, 0); >> - else{ >> + else { >> if (chip->data_buffer =3D=3D NULL) >> chip->data_buffer =3D pin_infos->tpm_i2c_buffer[= 0]; >> - ret =3D tpm_pm_suspend(&client->dev, mesg); >> + ret =3D tpm_pm_suspend(&client->dev); >> } >> return ret; >> } /* tpm_st33_i2c_suspend() */ >> @@ -848,12 +848,12 @@ static int tpm_st33_i2c_pm_resume(struct i2c_clien= t *client) >> (chip->vendor.status(chip) && >> TPM_STS_VALID) =3D=3D TPM_STS_= VALID, >> chip->vendor.timeout_b); >> - } else{ >> - if (chip->data_buffer =3D=3D NULL) >> - chip->data_buffer =3D pin_infos->tpm_i2c_buffer[0]; >> - ret =3D tpm_pm_resume(&client->dev); >> - if (!ret) >> - tpm_continue_selftest_nocheck(chip); >> + } else { >> + if (chip->data_buffer =3D=3D NULL) >> + chip->data_buffer =3D pin_infos->tpm_i2c_buffer[= 0]; >> + ret =3D tpm_pm_resume(&client->dev); >> + if (!ret) >> + tpm_continue_selftest_nocheck(chip); >> } >> return ret; >> } /* tpm_st33_i2c_pm_resume() */ >> >> ------------------------------------------------------------------------= ------ >> Monitor your physical, virtual and cloud infrastructure from a single >> web console. Get in-depth insight into apps, servers, databases, vmware, >> SAP, cloud infrastructure, etc. Download 30-day Free Trial. >> Pricing starts from $795 for 25 servers or applications! >> http://p.sf.net/sfu/zoho_dev2dev_nov >> _______________________________________________ >> tpmdd-devel mailing list >> tpmdd-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/tpmdd-devel > > > > -- > IBM LTC Security -- IBM LTC Security --_002_35286B1AE75A7C47BFF0870081A31B4B3A9B501757SAFEX1MAIL4st_ Content-Type: text/x-patch; name="0001-TPM-STMicroelectronics-ST33-I2C-KERNEL-3.x.patch" Content-Description: 0001-TPM-STMicroelectronics-ST33-I2C-KERNEL-3.x.patch Content-Disposition: attachment; filename="0001-TPM-STMicroelectronics-ST33-I2C-KERNEL-3.x.patch"; size=30813; creation-date="Wed, 28 Nov 2012 17:46:31 GMT"; modification-date="Wed, 28 Nov 2012 17:46:31 GMT" Content-Transfer-Encoding: base64 RnJvbSAzY2Y0Njg3NjY1YTBiY2ZmZTg5ZGU5MjQxNmYwZDU4ODZhOTAxMDBmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXRoaWFzIExlYmxhbmMgPG1hdGhpYXMubGVibGFuY0BzdC5j b20+CkRhdGU6IFdlZCwgMjggTm92IDIwMTIgMTg6MjI6MjQgKzAxMDAKU3ViamVjdDogW1BBVENI IDEvMV0gVFBNOiBTVE1pY3JvZWxlY3Ryb25pY3MgU1QzMyBJMkMgS0VSTkVMIDMueAoKICogU1RN aWNyb2VsZWN0cm9uaWNzIHZlcnNpb24gMS4yLjAsIENvcHlyaWdodCAoQykgMjAxMAogKiBTVE1p Y3JvZWxlY3Ryb25pY3MgY29tZXMgd2l0aCBBQlNPTFVURUxZIE5PIFdBUlJBTlRZLgogKiBUaGlz IGlzIGZyZWUgc29mdHdhcmUsIGFuZCB5b3UgYXJlIHdlbGNvbWUgdG8gcmVkaXN0cmlidXRlIGl0 CiAqIHVuZGVyIGNlcnRhaW4gY29uZGl0aW9ucy4KClRoaXMgaXMgdGhlIGRyaXZlciBmb3IgVFBN IGNoaXAgZnJ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OVUxMKQorCQlyZXR1cm4gLUVCVVNZOworCWlmIChsZW4gPCBUUE1fSEVBREVSX1NJWkUpCisJ CXJldHVybiAtRUJVU1k7CisKKwljbGllbnQgPSAoc3RydWN0IGkyY19jbGllbnQgKiljaGlwLT52 ZW5kb3IuaW9iYXNlOworCXBpbl9pbmZvcyA9IGNsaWVudC0+ZGV2LnBsYXRmb3JtX2RhdGE7CisK KwlvcmRpbmFsID0gYmUzMl90b19jcHUoKigoX19iZTMyICopIChidWYgKyA2KSkpOworCisJY2xp ZW50LT5mbGFncyA9IDA7CisKKwlyZXQgPSByZXF1ZXN0X2xvY2FsaXR5KGNoaXApOworCWlmIChy ZXQgPCAwKQorCQlyZXR1cm4gcmV0OworCisJc3RhdHVzID0gdHBtX3N0bV9pMmNfc3RhdHVzKGNo aXApOworCWlmICgoc3RhdHVzICYgVFBNX1NUU19DT01NQU5EX1JFQURZKSA9PSAwKSB7CisJCXRw bV9zdG1faTJjX2NhbmNlbChjaGlwKTsKKwkJaWYgKHdhaXRfZm9yX3N0YXQKKwkJICAgIChjaGlw LCBUUE1fU1RTX0NPTU1BTkRfUkVBRFksIGNoaXAtPnZlbmRvci50aW1lb3V0X2IsCisJCSAgICAg JmNoaXAtPnZlbmRvci5pbnRfcXVldWUpIDwgMCkgeworCQkJcmV0ID0gLUVUSU1FOworCQkJZ290 byBvdXRfZXJyOworCQl9CisJfQorCisJZm9yIChpID0gMCA7IGkgPCBsZW4gLSAxIDspIHsKKwkJ YnVyc3RjbnQgPSBnZXRfYnVyc3Rjb3VudChjaGlwKTsKKwkJc2l6ZSA9IG1pbl90KGludCwgbGVu IC0gaSAtIDEsIGJ1cnN0Y250KTsKKwkJcmV0ID0gSTJDX1dSSVRFX0RBVEEoY2xpZW50LCBUUE1f REFUQV9GSUZPLCBidWYsIHNpemUpOworCQlpZiAocmV0IDwgMCkKKwkJCWdvdG8gb3V0X2VycjsK KworCQlpICs9IHNpemU7CisJfQorCisJc3RhdHVzID0gdHBtX3N0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mlu ZSBUUE1fSTJDX1NUMzNfQUREUl9XUl9MT0MwCSgweDI2ID4+IDEpCisKKworc3RydWN0IHN0MzN6 cDI0X3BsYXRmb3JtX2RhdGEgeworCWludCBpb19zZXJpcnE7CisJaW50IGlvX2xwY3BkOworCXN0 cnVjdCBpMmNfY2xpZW50ICpjbGllbnQ7CisJYm9vbCBiQ2hpcEY7CisJdTggKnRwbV9pMmNfYnVm ZmVyWzJdOyAvKiAwIFJlcXVlc3QgMSBSZXNwb25zZSAqLworCXN0cnVjdCBjb21wbGV0aW9uIGly cV9kZXRlY3Rpb247CisJc3RydWN0IG11dGV4IGxvY2s7Cit9OworCisjZW5kaWYgLyogX19TVE1f U1QzM19UUE1fSTJDX0hfXyAqLwotLSAKMS43LjkuNQoK --_002_35286B1AE75A7C47BFF0870081A31B4B3A9B501757SAFEX1MAIL4st_-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/