Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-25 Thread Ken Goldman
On 5/10/2018 10:31 AM, David R. Bild wrote: Could this be implemented as a first priority to daemon. If it turns out to be bad approach we can reconsider kernel. If we land it to kernel it is harder to take steps back. Is the daemon an implementation of the TCG resource manager spec? The TCG

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-25 Thread Ken Goldman
On 5/8/2018 11:36 AM, James Bottomley wrote: On Tue, 2018-05-08 at 10:29 -0500, David R. Bild wrote: On Tue, May 8, 2018 at 10:25 AM, James Bottomley I don't see any reason to set an unreachable password for the platform hierarchy if the UEFI didn't.  If the desire is to disable the platform

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-14 Thread David R. Bild
On Mon, May 14, 2018 at 3:08 PM, Jason Gunthorpe wrote: > On Mon, May 14, 2018 at 02:59:36PM -0500, David R. Bild wrote: >> On Mon, May 14, 2018 at 2:31 PM, Jason Gunthorpe wrote: The driver can setup enough to use the TPM >> > framework to send commands before completing registration. We use it

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-14 Thread Jason Gunthorpe
On Mon, May 14, 2018 at 02:59:36PM -0500, David R. Bild wrote: > On Mon, May 14, 2018 at 2:31 PM, Jason Gunthorpe wrote: > > > > On Thu, May 10, 2018 at 09:41:53AM -0500, David R. Bild wrote: > > > > > 3) Allow the driver to register the TPM with TPM driver, but not yet > > > expose the TPM to use

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-14 Thread David R. Bild
On Mon, May 14, 2018 at 2:31 PM, Jason Gunthorpe wrote: > > On Thu, May 10, 2018 at 09:41:53AM -0500, David R. Bild wrote: > > > 3) Allow the driver to register the TPM with TPM driver, but not yet > > expose the TPM to userspace. Let the driver do some additional work > > (like set the platform

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-14 Thread Jason Gunthorpe
On Thu, May 10, 2018 at 09:41:53AM -0500, David R. Bild wrote: > 3) Allow the driver to register the TPM with TPM driver, but not yet > expose the TPM to userspace. Let the driver do some additional work > (like set the platform hierarchy password) and then explicitly inform > the TPM driver that

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-13 Thread Jarkko Sakkinen
On Thu, May 10, 2018 at 09:31:07AM -0500, David R. Bild wrote: > On Wed, May 9, 2018 at 8:59 PM, Jarkko Sakkinen > wrote: > > On Tue, May 08, 2018 at 08:36:25AM -0700, James Bottomley wrote: > >> Early boot means userspace. for a hot pluggable device, this would > >> probably be something in udev

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-13 Thread Jarkko Sakkinen
On Thu, May 10, 2018 at 09:41:53AM -0500, David R. Bild wrote: > 2) Make more of the TPM driver API public (internally public) so that > the driver can reuse that code instead of reimplementing. Not ideal, > as this could require major restructuring of the TPM code. Can you open this up a bit? It

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-10 Thread David R. Bild
On Thu, May 10, 2018 at 9:47 AM, James Bottomley wrote: > On Thu, 2018-05-10 at 09:25 -0500, David R. Bild wrote: >> The TPM holds access credentials for connecting to the Xaptum >> network. > > OK, so these are effectively DevId keys. However, what makes you think > knowing the platform auth all

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-10 Thread James Bottomley
On Thu, 2018-05-10 at 09:25 -0500, David R. Bild wrote: > On Tue, May 8, 2018 at 10:36 AM, James Bottomley > wrote: > > > > On Tue, 2018-05-08 at 10:29 -0500, David R. Bild wrote: > > > On Tue, May 8, 2018 at 10:25 AM, James Bottomley > > > wrote: > > > > > > > > I don't see any reason to set a

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-10 Thread David R. Bild
On Tue, May 8, 2018 at 5:55 AM, Jarkko Sakkinen wrote: > On Fri, May 04, 2018 at 02:56:25PM -0500, David R. Bild wrote: >> On Fri, May 4, 2018 at 2:06 PM, Jason Gunthorpe wrote: >> > >> > On Fri, May 04, 2018 at 08:00:22AM -0500, David R. Bild wrote: >> > > Normally the system platform (i.e., BIO

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-10 Thread David R. Bild
On Wed, May 9, 2018 at 8:59 PM, Jarkko Sakkinen wrote: > On Tue, May 08, 2018 at 08:36:25AM -0700, James Bottomley wrote: >> Early boot means userspace. for a hot pluggable device, this would >> probably be something in udev if you follow the no-daemon model and the >> daemon could do it if you do

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-10 Thread David R. Bild
On Wed, May 9, 2018 at 8:44 PM, Jarkko Sakkinen wrote: > On Tue, May 08, 2018 at 10:29:41AM -0500, David R. Bild wrote: >> On Tue, May 8, 2018 at 10:25 AM, James Bottomley >> wrote: >> > >> > > On Fri, May 04, 2018 at 02:56:25PM -0500, David R. Bild wrote: >> > [...] >> > > > In particular, it se

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-10 Thread David R. Bild
On Tue, May 8, 2018 at 10:36 AM, James Bottomley wrote: > > On Tue, 2018-05-08 at 10:29 -0500, David R. Bild wrote: > > On Tue, May 8, 2018 at 10:25 AM, James Bottomley > > wrote: > > > > > > I don't see any reason to set an unreachable password for the > > > platform > > > hierarchy if the UEFI

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-10 Thread David R. Bild
On Tue, May 8, 2018 at 5:47 AM, Jarkko Sakkinen wrote: > > On Fri, May 04, 2018 at 08:00:22AM -0500, David R. Bild wrote: > > Normally the system platform (i.e., BIOS/UEFI for x86) is responsible > > for performing initialization of the TPM. For these modules, the host > > kernel is the platform,

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-09 Thread Jarkko Sakkinen
On Tue, May 08, 2018 at 08:36:25AM -0700, James Bottomley wrote: > Early boot means userspace. for a hot pluggable device, this would > probably be something in udev if you follow the no-daemon model and the > daemon could do it if you do follow the daemon model. > > James Could this be implement

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-09 Thread Jarkko Sakkinen
On Tue, May 08, 2018 at 10:29:41AM -0500, David R. Bild wrote: > On Tue, May 8, 2018 at 10:25 AM, James Bottomley > wrote: > > > > > On Fri, May 04, 2018 at 02:56:25PM -0500, David R. Bild wrote: > > [...] > > > > In particular, it sets the credentials for the platform hierarchy. > > > > The platf

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-09 Thread Jarkko Sakkinen
On Tue, May 08, 2018 at 08:25:48AM -0700, James Bottomley wrote: > On Tue, 2018-05-08 at 13:55 +0300, Jarkko Sakkinen wrote: > > On Fri, May 04, 2018 at 02:56:25PM -0500, David R. Bild wrote: > [...] > > > In particular, it sets the credentials for the platform hierarchy. > > > The platform hierarc

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-09 Thread Jarkko Sakkinen
On Sun, May 06, 2018 at 09:02:29AM -0600, Jason Gunthorpe wrote: > On Fri, May 04, 2018 at 03:19:21PM -0500, David R. Bild wrote: > > Setting the platform hierarchy password to a random discarded value > > (and the dictionary lockout reset) is really the only special work > > done here. The other s

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-08 Thread James Bottomley
On Tue, 2018-05-08 at 10:29 -0500, David R. Bild wrote: > On Tue, May 8, 2018 at 10:25 AM, James Bottomley > wrote: > > > > > On Fri, May 04, 2018 at 02:56:25PM -0500, David R. Bild wrote: > > > > [...] > > > > In particular, it sets the credentials for the platform > > > > hierarchy. > > > > Th

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-08 Thread David R. Bild
On Tue, May 8, 2018 at 10:25 AM, James Bottomley wrote: > > > On Fri, May 04, 2018 at 02:56:25PM -0500, David R. Bild wrote: > [...] > > > In particular, it sets the credentials for the platform hierarchy. > > > The platform hierarchy is essentially the "root" account of the > > > TPM, so it's cri

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-08 Thread James Bottomley
On Tue, 2018-05-08 at 13:55 +0300, Jarkko Sakkinen wrote: > On Fri, May 04, 2018 at 02:56:25PM -0500, David R. Bild wrote: [...] > > In particular, it sets the credentials for the platform hierarchy. > > The platform hierarchy is essentially the "root" account of the > > TPM, so it's critical that

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-08 Thread Jarkko Sakkinen
On Fri, May 04, 2018 at 02:56:25PM -0500, David R. Bild wrote: > On Fri, May 4, 2018 at 2:06 PM, Jason Gunthorpe wrote: > > > > On Fri, May 04, 2018 at 08:00:22AM -0500, David R. Bild wrote: > > > Normally the system platform (i.e., BIOS/UEFI for x86) is responsible > > > for performing initializa

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-08 Thread Jarkko Sakkinen
On Fri, May 04, 2018 at 08:00:22AM -0500, David R. Bild wrote: > Normally the system platform (i.e., BIOS/UEFI for x86) is responsible > for performing initialization of the TPM. For these modules, the host > kernel is the platform, so we perform the initialization in the driver > before registeri

RE: EXTERNAL: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-07 Thread Jeremy Boone
t: EXTERNAL: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM Normally the system platform (i.e., BIOS/UEFI for x86) is responsible for performing initialization of the TPM. For these modules, the host kernel is the platform, so we perform the initialization in the driver

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-06 Thread Jason Gunthorpe
On Fri, May 04, 2018 at 03:19:21PM -0500, David R. Bild wrote: > On Fri, May 4, 2018 at 2:56 PM, David R. Bild wrote: > > 2) The second reason is that the initialization done by the driver is > > work that should be done by platform, before the kernel ever sees the > > TPM. > > > > In particular,

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-04 Thread David R. Bild
On Fri, May 4, 2018 at 2:56 PM, David R. Bild wrote: > 2) The second reason is that the initialization done by the driver is > work that should be done by platform, before the kernel ever sees the > TPM. > > In particular, it sets the credentials for the platform hierarchy. > The platform hierarch

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-04 Thread David R. Bild
On Fri, May 4, 2018 at 2:06 PM, Jason Gunthorpe wrote: > > On Fri, May 04, 2018 at 08:00:22AM -0500, David R. Bild wrote: > > Normally the system platform (i.e., BIOS/UEFI for x86) is responsible > > for performing initialization of the TPM. For these modules, the host > > kernel is the platform,

Re: [PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-04 Thread Jason Gunthorpe
On Fri, May 04, 2018 at 08:00:22AM -0500, David R. Bild wrote: > Normally the system platform (i.e., BIOS/UEFI for x86) is responsible > for performing initialization of the TPM. For these modules, the host > kernel is the platform, so we perform the initialization in the driver > before registeri

[PATCH v3 2/2] usb: misc: xapea00x: perform platform initialization of TPM

2018-05-04 Thread David R. Bild
Normally the system platform (i.e., BIOS/UEFI for x86) is responsible for performing initialization of the TPM. For these modules, the host kernel is the platform, so we perform the initialization in the driver before registering the TPM with the kernel TPM subsystem. The initialization consists