Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-10 Thread Stefan Berger
On 1/10/23 09:14, James Bottomley wrote: On Mon, 2023-01-09 at 16:06 -0500, Stefan Berger wrote: On 1/9/23 14:01, Stefan Berger wrote: [...] If you use TPM 2 for attestation then certain TPM 2 state migration scenarios may become problematic. One could construct a scenario where attestation

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-10 Thread James Bottomley
On Tue, 2023-01-10 at 09:47 -0500, Stefan Berger wrote: > On 1/10/23 09:14, James Bottomley wrote: > > On Mon, 2023-01-09 at 16:06 -0500, Stefan Berger wrote: > > > On 1/9/23 14:01, Stefan Berger wrote: > > [...] > > > If you use TPM 2 for attestation then certain TPM 2 state > > > migration scenar

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-10 Thread Stefan Berger
On 1/10/23 09:55, James Bottomley wrote: On Tue, 2023-01-10 at 09:47 -0500, Stefan Berger wrote: On 1/10/23 09:14, James Bottomley wrote: On Mon, 2023-01-09 at 16:06 -0500, Stefan Berger wrote: On 1/9/23 14:01, Stefan Berger wrote: [...] If you use TPM 2 for attestation then certain TPM 2

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-10 Thread James Bottomley
On Mon, 2023-01-09 at 16:06 -0500, Stefan Berger wrote: > On 1/9/23 14:01, Stefan Berger wrote: [...] > If you use TPM 2 for attestation then certain TPM 2 state migration > scenarios may become problematic. One could construct a scenario > where attestation preceeds some action that requires trust

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread Stefan Berger
On 1/9/23 14:01, Stefan Berger wrote: On 1/9/23 13:51, James Bottomley wrote: On Mon, 2023-01-09 at 13:34 -0500, Stefan Berger wrote: On 1/9/23 12:55, James Bottomley wrote: On Mon, 2023-01-09 at 17:52 +, Dr. David Alan Gilbert wrote: * James Bottomley (j...@linux.ibm.com) wrote:

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread Stefan Berger
On 1/9/23 13:51, James Bottomley wrote: On Mon, 2023-01-09 at 13:34 -0500, Stefan Berger wrote: On 1/9/23 12:55, James Bottomley wrote: On Mon, 2023-01-09 at 17:52 +, Dr. David Alan Gilbert wrote: * James Bottomley (j...@linux.ibm.com) wrote: [...] external MSSIM TPM emulator has to

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread James Bottomley
On Mon, 2023-01-09 at 18:54 +, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: > > On Mon, 2023-01-09 at 13:34 -0500, Stefan Berger wrote: > > > > > > > > > On 1/9/23 12:55, James Bottomley wrote: > > > > On Mon, 2023-01-09 at 17:52 +, Dr. David Alan Gilbert

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread Dr. David Alan Gilbert
* James Bottomley (j...@linux.ibm.com) wrote: > On Mon, 2023-01-09 at 13:34 -0500, Stefan Berger wrote: > > > > > > On 1/9/23 12:55, James Bottomley wrote: > > > On Mon, 2023-01-09 at 17:52 +, Dr. David Alan Gilbert wrote: > > > > * James Bottomley (j...@linux.ibm.com) wrote: > > > [...] > >

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread James Bottomley
On Mon, 2023-01-09 at 13:34 -0500, Stefan Berger wrote: > > > On 1/9/23 12:55, James Bottomley wrote: > > On Mon, 2023-01-09 at 17:52 +, Dr. David Alan Gilbert wrote: > > > * James Bottomley (j...@linux.ibm.com) wrote: > > [...] > > > > external MSSIM TPM emulator has to be kept running to pr

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread Stefan Berger
On 1/9/23 12:55, James Bottomley wrote: On Mon, 2023-01-09 at 17:52 +, Dr. David Alan Gilbert wrote: * James Bottomley (j...@linux.ibm.com) wrote: [...] external MSSIM TPM emulator has to be kept running to preserve the state.  If you restart it, the migration will fail. Document that

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread James Bottomley
On Mon, 2023-01-09 at 17:52 +, Dr. David Alan Gilbert wrote: > * James Bottomley (j...@linux.ibm.com) wrote: [...] > > external MSSIM TPM emulator has to be kept running to preserve the > > state.  If you restart it, the migration will fail. > > Document that and we're getting there. The doc

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread Dr. David Alan Gilbert
* James Bottomley (j...@linux.ibm.com) wrote: > On Mon, 2023-01-09 at 16:59 +, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Fri, Dec 16, 2022 at 08:32:44AM -0500, Stefan Berger wrote: > [...] > > > > I do see it because the *volatile state* cannot

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread James Bottomley
On Mon, 2023-01-09 at 16:59 +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Fri, Dec 16, 2022 at 08:32:44AM -0500, Stefan Berger wrote: [...] > > > I do see it because the *volatile state* cannot be extracted from > > > this device. The state of the P

Re: [PATCH 2/2] tpm: add backend for mssim

2023-01-09 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Dec 16, 2022 at 08:32:44AM -0500, Stefan Berger wrote: > > > > > > On 12/16/22 07:54, Daniel P. Berrangé wrote: > > > On Fri, Dec 16, 2022 at 07:28:59AM -0500, Stefan Berger wrote: > > > > > > > > > > > > On 12/16/22 05:27, Daniel P. B

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-19 Thread Stefan Berger
On 12/19/22 08:02, James Bottomley wrote: On Mon, 2022-12-19 at 06:49 -0500, Stefan Berger wrote: On 12/16/22 08:53, James Bottomley wrote: I could do a blog post, but I really don't think you want this in official documentation because that creates support expectations. We get support

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-19 Thread James Bottomley
On Mon, 2022-12-19 at 06:49 -0500, Stefan Berger wrote: > > > On 12/16/22 08:53, James Bottomley wrote: > > > > > I could do a blog post, but I really don't think you want this in > > official documentation because that creates support expectations. > > We get support expectations if we don't

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-19 Thread Stefan Berger
On 12/16/22 08:53, James Bottomley wrote: I could do a blog post, but I really don't think you want this in official documentation because that creates support expectations. We get support expectations if we don't mention it as not being supported. So, since this driver is not supported t

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread Stefan Berger
On 12/16/22 11:13, James Bottomley wrote: On Fri, 2022-12-16 at 11:08 -0500, Stefan Berger wrote: On 12/16/22 10:48, James Bottomley wrote: [...] +The mssim backend supports snapshotting and migration, but the state +of the Microsoft Simulator server must be preserved (or the server +kept r

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread James Bottomley
On Fri, 2022-12-16 at 11:08 -0500, Stefan Berger wrote: > On 12/16/22 10:48, James Bottomley wrote: [...] > > +The mssim backend supports snapshotting and migration, but the > > state > > +of the Microsoft Simulator server must be preserved (or the server > > +kept running) outside of QEMU for rest

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread Stefan Berger
On 12/16/22 10:48, James Bottomley wrote: On Fri, 2022-12-16 at 09:55 -0500, Stefan Berger wrote: On 12/16/22 09:29, Daniel P. Berrangé wrote: All the objections you're raising are related to the current specifics of the implementation of the mssim remote server. While valid, this is of

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread James Bottomley
On Fri, 2022-12-16 at 09:55 -0500, Stefan Berger wrote: > > > On 12/16/22 09:29, Daniel P. Berrangé wrote: > > > > > All the objections you're raising are related to the current > > specifics of the implementation of the mssim remote server. > > While valid, this is of no concern to QEMU when d

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread Stefan Berger
On 12/16/22 09:29, Daniel P. Berrangé wrote: All the objections you're raising are related to the current specifics of the implementation of the mssim remote server. While valid, this is of no concern to QEMU when deciding whether to require a migration blocker on the client side. This is 3r

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread Daniel P . Berrangé
On Fri, Dec 16, 2022 at 08:32:44AM -0500, Stefan Berger wrote: > > > On 12/16/22 07:54, Daniel P. Berrangé wrote: > > On Fri, Dec 16, 2022 at 07:28:59AM -0500, Stefan Berger wrote: > > > > > > > > > On 12/16/22 05:27, Daniel P. Berrangé wrote: > > > > On Thu, Dec 15, 2022 at 03:53:43PM -0500, S

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread Stefan Berger
On 12/16/22 07:54, Daniel P. Berrangé wrote: On Fri, Dec 16, 2022 at 07:28:59AM -0500, Stefan Berger wrote: On 12/16/22 05:27, Daniel P. Berrangé wrote: On Thu, Dec 15, 2022 at 03:53:43PM -0500, Stefan Berger wrote: On 12/15/22 15:30, James Bottomley wrote: On Thu, 2022-12-15 at 15:22

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread Stefan Berger
On 12/16/22 08:53, James Bottomley wrote: On Fri, 2022-12-16 at 08:32 -0500, Stefan Berger wrote: On 12/16/22 07:54, Daniel P. Berrangé wrote: On Fri, Dec 16, 2022 at 07:28:59AM -0500, Stefan Berger wrote: [...] Nevertheless it needs documentation and has to handle migration scenarios eith

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread James Bottomley
On Fri, 2022-12-16 at 08:32 -0500, Stefan Berger wrote: > On 12/16/22 07:54, Daniel P. Berrangé wrote: > > On Fri, Dec 16, 2022 at 07:28:59AM -0500, Stefan Berger wrote: [...] > > > Nevertheless it needs documentation and has to handle migration > > > scenarios either via a blocker or it has to han

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread Daniel P . Berrangé
On Fri, Dec 16, 2022 at 07:28:59AM -0500, Stefan Berger wrote: > > > On 12/16/22 05:27, Daniel P. Berrangé wrote: > > On Thu, Dec 15, 2022 at 03:53:43PM -0500, Stefan Berger wrote: > > > > > > > > > On 12/15/22 15:30, James Bottomley wrote: > > > > On Thu, 2022-12-15 at 15:22 -0500, Stefan Berg

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread Stefan Berger
On 12/16/22 05:27, Daniel P. Berrangé wrote: On Thu, Dec 15, 2022 at 03:53:43PM -0500, Stefan Berger wrote: On 12/15/22 15:30, James Bottomley wrote: On Thu, 2022-12-15 at 15:22 -0500, Stefan Berger wrote: On 12/15/22 15:07, James Bottomley wrote: [...] don't really have much interest i

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-16 Thread Daniel P . Berrangé
On Thu, Dec 15, 2022 at 03:53:43PM -0500, Stefan Berger wrote: > > > On 12/15/22 15:30, James Bottomley wrote: > > On Thu, 2022-12-15 at 15:22 -0500, Stefan Berger wrote: > > > On 12/15/22 15:07, James Bottomley wrote: > > [...] > > > > don't really have much interest in the migration use case, b

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread Stefan Berger
On 12/15/22 15:30, James Bottomley wrote: On Thu, 2022-12-15 at 15:22 -0500, Stefan Berger wrote: On 12/15/22 15:07, James Bottomley wrote: [...] don't really have much interest in the migration use case, but I knew it should work like the passthrough case, so that's what I tested. I thin

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
On Thu, 2022-12-15 at 15:22 -0500, Stefan Berger wrote: > On 12/15/22 15:07, James Bottomley wrote: [...] > > don't really have much interest in the migration use case, but I > > knew it should work like the passthrough case, so that's what I > > tested. > > I think your device needs to block migr

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread Stefan Berger
On 12/15/22 15:07, James Bottomley wrote: On Thu, 2022-12-15 at 14:57 -0500, Stefan Berger wrote: On 12/15/22 14:40, James Bottomley wrote: On Thu, 2022-12-15 at 14:35 -0500, Stefan Berger wrote: [...] You should also add a description to docs/specs/tpm.rst. Description of what?  It func

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
On Thu, 2022-12-15 at 14:57 -0500, Stefan Berger wrote: > On 12/15/22 14:40, James Bottomley wrote: > > On Thu, 2022-12-15 at 14:35 -0500, Stefan Berger wrote: [...] > > > You should also add a description to docs/specs/tpm.rst. > > > > Description of what?  It functions exactly like passthrough o

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread Stefan Berger
On 12/15/22 14:40, James Bottomley wrote: On Thu, 2022-12-15 at 14:35 -0500, Stefan Berger wrote: On 12/15/22 14:22, James Bottomley wrote: On Thu, 2022-12-15 at 13:46 -0500, Stefan Berger wrote: On 12/15/22 13:01, James Bottomley wrote: From: James Bottomley The Microsoft Simulator

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
On Thu, 2022-12-15 at 14:35 -0500, Stefan Berger wrote: > > > On 12/15/22 14:22, James Bottomley wrote: > > On Thu, 2022-12-15 at 13:46 -0500, Stefan Berger wrote: > > > > > > > > > On 12/15/22 13:01, James Bottomley wrote: > > > > From: James Bottomley > > > > > > > > The Microsoft Simulator

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread Stefan Berger
On 12/15/22 14:22, James Bottomley wrote: On Thu, 2022-12-15 at 13:46 -0500, Stefan Berger wrote: On 12/15/22 13:01, James Bottomley wrote: From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Mic

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
On Thu, 2022-12-15 at 13:46 -0500, Stefan Berger wrote: > > > On 12/15/22 13:01, James Bottomley wrote: > > From: James Bottomley > > > > The Microsoft Simulator (mssim) is the reference emulation platform > > for the TCG TPM 2.0 specification. > > > > https://github.com/Microsoft/ms-tpm-20-re

Re: [PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread Stefan Berger
On 12/15/22 13:01, James Bottomley wrote: From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Microsoft/ms-tpm-20-ref.git It exports a fairly simple network socket baset protocol on two sockets, one

[PATCH 2/2] tpm: add backend for mssim

2022-12-15 Thread James Bottomley
From: James Bottomley The Microsoft Simulator (mssim) is the reference emulation platform for the TCG TPM 2.0 specification. https://github.com/Microsoft/ms-tpm-20-ref.git It exports a fairly simple network socket baset protocol on two sockets, one for command (default 2321) and one for control