Re: Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-16 Thread Ken Goldman
On 8/14/2017 6:10 AM, Jarkko Sakkinen wrote: Nuvoton, ST Micro, and Infineon confirmed that the TPM empties a byte from the FIFO in under 1 usec. So, even with a static burst count, the entire FIFO would empty in under 10 usec. Does this break anything lets say in a decade time frame? If it

Re: Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-16 Thread Ken Goldman
On 8/14/2017 6:10 AM, Jarkko Sakkinen wrote: Nuvoton, ST Micro, and Infineon confirmed that the TPM empties a byte from the FIFO in under 1 usec. So, even with a static burst count, the entire FIFO would empty in under 10 usec. Does this break anything lets say in a decade time frame? If it

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-16 Thread Michal Suchánek
On Tue, 15 Aug 2017 18:02:57 -0400 Ken Goldman wrote: > On 8/13/2017 7:53 PM, msuchanek wrote: > > About 500 out of 700 mainboards sold today has a PS/2 port which is > > probably due to prevalence of legacy devices and usbhid limitations. > > > > Similarily many

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-16 Thread Michal Suchánek
On Tue, 15 Aug 2017 18:02:57 -0400 Ken Goldman wrote: > On 8/13/2017 7:53 PM, msuchanek wrote: > > About 500 out of 700 mainboards sold today has a PS/2 port which is > > probably due to prevalence of legacy devices and usbhid limitations. > > > > Similarily many boards have serial and parallel

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-15 Thread Ken Goldman
On 8/13/2017 7:53 PM, msuchanek wrote: About 500 out of 700 mainboards sold today has a PS/2 port which is probably due to prevalence of legacy devices and usbhid limitations. Similarily many boards have serial and parallel hardware ports. In all diagrams detailed enough to show these ports I

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-15 Thread Ken Goldman
On 8/13/2017 7:53 PM, msuchanek wrote: About 500 out of 700 mainboards sold today has a PS/2 port which is probably due to prevalence of legacy devices and usbhid limitations. Similarily many boards have serial and parallel hardware ports. In all diagrams detailed enough to show these ports I

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-15 Thread Jarkko Sakkinen
On Mon, Aug 14, 2017 at 08:12:53AM -0400, Mimi Zohar wrote: > On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > > Since the main concern about this change is breaking old systems that > > > > might potentially have other peripherals hanging off the LPC bus, can > > > > we define a

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-15 Thread Jarkko Sakkinen
On Mon, Aug 14, 2017 at 08:12:53AM -0400, Mimi Zohar wrote: > On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > > Since the main concern about this change is breaking old systems that > > > > might potentially have other peripherals hanging off the LPC bus, can > > > > we define a

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-15 Thread Jarkko Sakkinen
On Mon, Aug 14, 2017 at 08:03:05AM -0400, Mimi Zohar wrote: > On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > > > I would like to see tpm_msleep() wrapper to replace current msleep() > > > > > usage across the subsystem before considering this. I.e. wrapper that > > > > >

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-15 Thread Jarkko Sakkinen
On Mon, Aug 14, 2017 at 08:03:05AM -0400, Mimi Zohar wrote: > On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > > > I would like to see tpm_msleep() wrapper to replace current msleep() > > > > > usage across the subsystem before considering this. I.e. wrapper that > > > > >

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Mimi Zohar
On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > Since the main concern about this change is breaking old systems that > > > might potentially have other peripherals hanging off the LPC bus, can > > > we define a new Kconfig option, with the default as 'N'? > > > > > > Mimi > > >

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Mimi Zohar
On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > Since the main concern about this change is breaking old systems that > > > might potentially have other peripherals hanging off the LPC bus, can > > > we define a new Kconfig option, with the default as 'N'? > > > > > > Mimi > > >

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Mimi Zohar
On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > I would like to see tpm_msleep() wrapper to replace current msleep() > > > > usage across the subsystem before considering this. I.e. wrapper that > > > > internally uses usleep_range(). This way we can mechanically convert > > > >

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Mimi Zohar
On Mon, 2017-08-14 at 13:56 +0300, Jarkko Sakkinen wrote: > > > > I would like to see tpm_msleep() wrapper to replace current msleep() > > > > usage across the subsystem before considering this. I.e. wrapper that > > > > internally uses usleep_range(). This way we can mechanically convert > > > >

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Jarkko Sakkinen
On Mon, Aug 14, 2017 at 01:51:30PM +0300, Jarkko Sakkinen wrote: > On Fri, Aug 11, 2017 at 11:30:19AM -0400, Mimi Zohar wrote: > > On Fri, 2017-08-11 at 14:14 +0300, Jarkko Sakkinen wrote: > > > On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > > > > Hi Ken, > > > > (again speaking

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Jarkko Sakkinen
On Mon, Aug 14, 2017 at 01:51:30PM +0300, Jarkko Sakkinen wrote: > On Fri, Aug 11, 2017 at 11:30:19AM -0400, Mimi Zohar wrote: > > On Fri, 2017-08-11 at 14:14 +0300, Jarkko Sakkinen wrote: > > > On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > > > > Hi Ken, > > > > (again speaking

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Jarkko Sakkinen
On Fri, Aug 11, 2017 at 11:30:19AM -0400, Mimi Zohar wrote: > On Fri, 2017-08-11 at 14:14 +0300, Jarkko Sakkinen wrote: > > On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > > > Hi Ken, > > > (again speaking only on my behalf, not my employer) > > > > > > > Does anyone know of

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-14 Thread Jarkko Sakkinen
On Fri, Aug 11, 2017 at 11:30:19AM -0400, Mimi Zohar wrote: > On Fri, 2017-08-11 at 14:14 +0300, Jarkko Sakkinen wrote: > > On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > > > Hi Ken, > > > (again speaking only on my behalf, not my employer) > > > > > > > Does anyone know of

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-13 Thread msuchanek
Hello, On Fri, 11 Aug 2017 17:32:12 -0400 Ken Goldman wrote: > On 8/9/2017 5:00 PM, Peter Huewe wrote: > > > > Since we are the linux kernel, we do have to care for legacy > > devices. And a system with LPC, PS2Mouse on SuperIO and a TPM are > > not that uncommon. > >

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-13 Thread msuchanek
Hello, On Fri, 11 Aug 2017 17:32:12 -0400 Ken Goldman wrote: > On 8/9/2017 5:00 PM, Peter Huewe wrote: > > > > Since we are the linux kernel, we do have to care for legacy > > devices. And a system with LPC, PS2Mouse on SuperIO and a TPM are > > not that uncommon. > > > > And heck, we even

Re: Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Ken Goldman
On 8/9/2017 4:43 PM, Peter Huewe wrote: Yes that's bad, especially with current msleep(5) is actually msleep(20). However, please also keep in mind SPI tpms show a much higher burst count value, (255) our I2C TPM SLB9645 even shows something in the range of 1k. :) One of our platforms has a

Re: Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Ken Goldman
On 8/9/2017 4:43 PM, Peter Huewe wrote: Yes that's bad, especially with current msleep(5) is actually msleep(20). However, please also keep in mind SPI tpms show a much higher burst count value, (255) our I2C TPM SLB9645 even shows something in the range of 1k. :) One of our platforms has a

Re: [Linux-ima-devel] [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Ken Goldman
Following up on this thread based on this week's TCG call ... 1 - burstCount can safely be ignored on writes. This is explicit in most places in the TCG spec. In places where it is not explicit, it was simply an editorial omission. We are going through the spec and adding "without incurring

Re: [Linux-ima-devel] [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Ken Goldman
Following up on this thread based on this week's TCG call ... 1 - burstCount can safely be ignored on writes. This is explicit in most places in the TCG spec. In places where it is not explicit, it was simply an editorial omission. We are going through the spec and adding "without incurring

Re: Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Ken Goldman
On 8/9/2017 5:00 PM, Peter Huewe wrote: Since we are the linux kernel, we do have to care for legacy devices. And a system with LPC, PS2Mouse on SuperIO and a TPM are not that uncommon. And heck, we even have support for 1.1b TPM devices Understood. However, remember that SuperIO is a

Re: Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Ken Goldman
On 8/9/2017 5:00 PM, Peter Huewe wrote: Since we are the linux kernel, we do have to care for legacy devices. And a system with LPC, PS2Mouse on SuperIO and a TPM are not that uncommon. And heck, we even have support for 1.1b TPM devices Understood. However, remember that SuperIO is a

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Mimi Zohar
On Fri, 2017-08-11 at 14:14 +0300, Jarkko Sakkinen wrote: > On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > > Hi Ken, > > (again speaking only on my behalf, not my employer) > > > > > Does anyone know of platforms where this occurs? > > > I suspect (but not sure) that the days of

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Mimi Zohar
On Fri, 2017-08-11 at 14:14 +0300, Jarkko Sakkinen wrote: > On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > > Hi Ken, > > (again speaking only on my behalf, not my employer) > > > > > Does anyone know of platforms where this occurs? > > > I suspect (but not sure) that the days of

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Jarkko Sakkinen
On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > Hi Ken, > (again speaking only on my behalf, not my employer) > > > Does anyone know of platforms where this occurs? > > I suspect (but not sure) that the days of SuperIO connecting floppy > > drives, printer ports, and PS/2 mouse

Re: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-11 Thread Jarkko Sakkinen
On Wed, Aug 09, 2017 at 11:00:36PM +0200, Peter Huewe wrote: > Hi Ken, > (again speaking only on my behalf, not my employer) > > > Does anyone know of platforms where this occurs? > > I suspect (but not sure) that the days of SuperIO connecting floppy > > drives, printer ports, and PS/2 mouse

Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-09 Thread Peter Huewe
Hi Ken, (again speaking only on my behalf, not my employer) > Does anyone know of platforms where this occurs? > I suspect (but not sure) that the days of SuperIO connecting floppy > drives, printer ports, and PS/2 mouse ports on the LPC bus are over, and > such legacy systems will not have a

Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-09 Thread Peter Huewe
Hi Ken, (again speaking only on my behalf, not my employer) > Does anyone know of platforms where this occurs? > I suspect (but not sure) that the days of SuperIO connecting floppy > drives, printer ports, and PS/2 mouse ports on the LPC bus are over, and > such legacy systems will not have a

Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-09 Thread Peter Huewe
Hi Ken, (speaking on behalf of myself here, not my employer :) ) > On Mon, Aug 07, 2017 at 01:52:34PM +0200, Peter Huewe wrote: >> Imho: NACK from my side. > After these viewpoints definitive NACK from my side too... > I responded to the thread comments separately. However, assuming NACK > is

Aw: Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-09 Thread Peter Huewe
Hi Ken, (speaking on behalf of myself here, not my employer :) ) > On Mon, Aug 07, 2017 at 01:52:34PM +0200, Peter Huewe wrote: >> Imho: NACK from my side. > After these viewpoints definitive NACK from my side too... > I responded to the thread comments separately. However, assuming NACK > is

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-09 Thread Ken Goldman
On 8/8/2017 3:11 PM, Jarkko Sakkinen wrote: > On Mon, Aug 07, 2017 at 01:52:34PM +0200, Peter Huewe wrote: >> Are you sure this is a good idea? >> On lpc systems this more or less stalls the bus, including keyboard/mouse (if connected via superio lpc). >> >> On which systems have you tested

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-09 Thread Ken Goldman
On 8/8/2017 3:11 PM, Jarkko Sakkinen wrote: > On Mon, Aug 07, 2017 at 01:52:34PM +0200, Peter Huewe wrote: >> Are you sure this is a good idea? >> On lpc systems this more or less stalls the bus, including keyboard/mouse (if connected via superio lpc). >> >> On which systems have you tested

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-09 Thread Ken Goldman
On 8/8/2017 3:11 PM, Jarkko Sakkinen wrote: On Mon, Aug 07, 2017 at 01:52:34PM +0200, Peter Huewe wrote: Imho: NACK from my side. After these viewpoints definitive NACK from my side too... I responded to the thread comments separately. However, assuming NACK is the final response, I have

Re: [tpmdd-devel] [PATCH] tpm: improve tpm_tis send() performance by ignoring burstcount

2017-08-09 Thread Ken Goldman
On 8/8/2017 3:11 PM, Jarkko Sakkinen wrote: On Mon, Aug 07, 2017 at 01:52:34PM +0200, Peter Huewe wrote: Imho: NACK from my side. After these viewpoints definitive NACK from my side too... I responded to the thread comments separately. However, assuming NACK is the final response, I have