lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e86f1b6a3c04c9889d0f12f4eb079d4@SFHDAG3NODE3.st.com>
Date:   Tue, 30 Jul 2019 08:39:35 +0000
From:   Benoit HOUYERE <benoit.houyere@...com>
To:     Alexander Steffen <Alexander.Steffen@...ineon.com>,
        "Eyal.Cohen@...oton.com" <Eyal.Cohen@...oton.com>,
        "jarkko.sakkinen@...ux.intel.com" <jarkko.sakkinen@...ux.intel.com>,
        "tmaimon77@...il.com" <tmaimon77@...il.com>
CC:     "oshrialkoby85@...il.com" <oshrialkoby85@...il.com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "peterhuewe@....de" <peterhuewe@....de>,
        "jgg@...pe.ca" <jgg@...pe.ca>, "arnd@...db.de" <arnd@...db.de>,
        "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "oshri.alkoby@...oton.com" <oshri.alkoby@...oton.com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
        "gcwilson@...ibm.com" <gcwilson@...ibm.com>,
        "kgoldman@...ibm.com" <kgoldman@...ibm.com>,
        "nayna@...ux.vnet.ibm.com" <nayna@...ux.vnet.ibm.com>,
        "Dan.Morav@...oton.com" <Dan.Morav@...oton.com>,
        "oren.tanami@...oton.com" <oren.tanami@...oton.com>,
        "Christophe Ricard (christophe.ricard@...il.com)" 
        <christophe.ricard@...il.com>, Elena WILLIS <elena.willis@...com>,
        "Olivier COLLART" <olivier.collart@...com>
Subject: RE: [PATCH v2 0/2] char: tpm: add new driver for tpm i2c ptp

Hi Alexander, Jarkko and Eyal,

A first I2C TCG patch (tpm_tis_i2c.c) has been proposed in the same time as tpm_tis_spi.c by Christophe 3 years ago.

https://patchwork.kernel.org/patch/8628681/

At the time, we have had two concerns :
	1) I2C TPM component number, in the market, compliant with new I2C TCG specification to validate new I2C driver.
	2) Lots changing  was already provided by tpm_tis_spi.c on 4.8.

That's why Tpm_tis_i2c.c has been postponed.

Tpm_tis_spi Linux driver is now robust, if we have several different I2C TPM solutions today to validate a tpm_tis_i2c driver, I 'm ready to contribute to it for validation (STmicro TPM) or propose a solution compatible on 5.1 linux driver if needed under timeframe proposed (second half of august).

Best Regards,

Benoit



-----Original Message-----
From: linux-integrity-owner@...r.kernel.org <linux-integrity-owner@...r.kernel.org> On Behalf Of Alexander Steffen
Sent: jeudi 18 juillet 2019 19:10
To: Eyal.Cohen@...oton.com; jarkko.sakkinen@...ux.intel.com; tmaimon77@...il.com
Cc: oshrialkoby85@...il.com; robh+dt@...nel.org; mark.rutland@....com; peterhuewe@....de; jgg@...pe.ca; arnd@...db.de; gregkh@...uxfoundation.org; oshri.alkoby@...oton.com; devicetree@...r.kernel.org; linux-kernel@...r.kernel.org; linux-integrity@...r.kernel.org; gcwilson@...ibm.com; kgoldman@...ibm.com; nayna@...ux.vnet.ibm.com; Dan.Morav@...oton.com; oren.tanami@...oton.com
Subject: Re: [PATCH v2 0/2] char: tpm: add new driver for tpm i2c ptp

On 18.07.2019 14:51, Eyal.Cohen@...oton.com wrote:
> Hi Jarkko and Alexander,
> 
> We have made an additional code review on the TPM TIS core driver, it looks quite good and we can connect our new I2C driver to this layer.

Great :) In the meantime, I've done some experiments creating an I2C driver based on tpm_tis_core, see https://patchwork.kernel.org/patch/11049363/ Please have a look at that and provide your feedback (and/or use it as a basis for further implementations).

> However, there are several differences between the SPI interface and the I2C interface that will require changes to the TIS core.
> At a minimum we thought of:
> 1. Handling TPM Localities in I2C is different

It turned out not to be that different in the end, see the code mentioned above and my comment here: 
https://patchwork.kernel.org/cover/11049365/

> 2. Handling I2C CRC - relevant only to I2C bus hence not supported 
> today by TIS core

That is completely optional, so there is no need to implement it in the beginning. Also, do you expect a huge benefit from that functionality? 
Are bit flips that much more likely on I2C compared to SPI, which has no CRC at all, but still works fine?

> 3. Handling Chip specific issues, since I2C implementation might be 
> slightly different across the various TPM vendors

Right, that seems similar to the cr50 issues (https://lkml.org/lkml/2019/7/17/677), so there should probably be a similar way to do it.

> 4. Modify tpm_tis_send_data and tpm_tis_recv_data to work according 
> the TCG Device Driver Guide (optimization on TPM_STS access and 
> send/recv retry)

Optimizations are always welcome, but I'd expect basic communication to work already with the current code (though maybe not as efficiently as possible).

> Besides this, during development we might encounter additional differences between SPI and I2C.
> 
> We currently target to allocate an eng. to work on this on the second half of August with a goal to have the driver ready for the next kernel merge window.
> 
> Regards,
> Eyal.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ