From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Patrick Ohly <patrick.ohly@intel.com>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
Amarnath Valluri <amarnath.valluri@intel.com>,
qemu-devel@nongnu.org, stefanb@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH 0/7] Provide support for the software TPM emulator
Date: Mon, 3 Apr 2017 18:38:23 +0100 [thread overview]
Message-ID: <20170403173823.GD2112@work-vm> (raw)
In-Reply-To: <1491240750.10884.10.camel@intel.com>
* Patrick Ohly (patrick.ohly@intel.com) wrote:
> On Mon, 2017-04-03 at 18:07 +0100, Daniel P. Berrange wrote:
> > On Fri, Mar 31, 2017 at 04:10:09PM +0300, Amarnath Valluri wrote:
> > > Briefly, Theses set of patches introduces:
> > > - new TPM backend driver to support software TPM emulators(swtpm(1)).
> > > - and few supported fixes/enhancements/cleanup to existing tpm backend code.
> > >
> > > The similar idea was initiated earliar(2) by Stefan Berger(CCed) with slightly
> > > different approach, using CUSE. As swtpm has excellent support for unix domain
> > > sockets, hence this implementation uses unix domain sockets to communicate with
> > > swtpm.
> > >
> > > When Qemu is configured with 'emulator' tpm backend, it spawns 'swtpm' and
> > > communicates its via Unix domain sockets.
> >
> > I'm not convinced that having QEMU spawning swtpm itself is a desirable
> > approach, as it means QEMU needs to have all the privileges that swtpm
> > will need, so that swtpm can inherit them.
>
> The intended usage is for emulating a TPM in software, for example to do
> automated testing of an OS which requires a TPM or to do software
> development in an environment were it is easy to reset the TPM. That
> doesn't require any privileges, because swtpm just reads and writes
> files owned by the user who calls qemu.
Being able to do fancier permissions would let you use it in a real VM
situation so that the virtual guest sees it's own TPM; you would then
want to protect the TPM data files pretty carefully - for example stop
one compromised guest sniffing around the TPM data for another.
> > At the very least I think we
> > need to have a way to disable this spawning, so it can connect to a
> > pre-existing swtpm process that's been spawned ahead of time. This will
> > let us have stricter privilege separation.
>
> Which privileges and use cases did you have in mind?
>
> swtpm already can be started so that it listens on a Unix domain socket,
> instead of inheriting something from the parent. It shouldn't be hard to
> add that as an alternative to the existing spawning code.
>
> I can think of one use case: spawning swtpm in advance under debugging
> tools like gdb or valgrind. Is that enough justification for adding more
> code?
Or you could just remove the spawning code and use existing sockets; less code!
Dave
> --
> Best Regards, Patrick Ohly
>
> The content of this message is my personal opinion only and although
> I am an employee of Intel, the statements I make here in no way
> represent Intel's position on the issue, nor am I authorized to speak
> on behalf of Intel on this matter.
>
>
>
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2017-04-03 17:38 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-31 13:10 [Qemu-devel] [PATCH 0/7] Provide support for the software TPM emulator Amarnath Valluri
2017-03-31 13:10 ` [Qemu-devel] [PATCH 1/7] tpm-backend: Remove unneeded member variable from backend class Amarnath Valluri
2017-04-03 17:02 ` Marc-André Lureau
2017-04-04 13:14 ` Philippe Mathieu-Daudé
2017-03-31 13:10 ` [Qemu-devel] [PATCH 2/7] tpm-backend: Move thread handling inside TPMBackend Amarnath Valluri
2017-04-04 10:56 ` Marc-André Lureau
2017-04-04 11:21 ` Amarnath Valluri
2017-03-31 13:10 ` [Qemu-devel] [PATCH 3/7] tpm-backend: Initialize and free data members in it's own methods Amarnath Valluri
2017-04-04 12:57 ` Marc-André Lureau
2017-03-31 13:10 ` [Qemu-devel] [PATCH 4/7] tpm-backend: Call interface methods only if backend implements them Amarnath Valluri
2017-04-04 13:15 ` Marc-André Lureau
2017-03-31 13:10 ` [Qemu-devel] [PATCH 5/7] tmp backend: Add new api to read backend tpm options Amarnath Valluri
2017-04-03 19:24 ` Eric Blake
2017-03-31 13:10 ` [Qemu-devel] [PATCH 6/7] tpm-passthrough: move reusable code to utils Amarnath Valluri
2017-04-04 13:53 ` Marc-André Lureau
2017-03-31 13:10 ` [Qemu-devel] [PATCH 7/7] Added support for TPM emulator Amarnath Valluri
2017-04-03 19:30 ` Eric Blake
2017-03-31 13:10 ` [Qemu-devel] [PATCH 7/7] tpm: New backend driver to support " Amarnath Valluri
2017-04-04 16:23 ` Marc-André Lureau
2017-04-05 15:30 ` Daniel P. Berrange
2017-04-02 8:33 ` [Qemu-devel] [PATCH 0/7] Provide support for the software " no-reply
2017-04-03 17:07 ` Daniel P. Berrange
2017-04-03 17:18 ` Marc-André Lureau
2017-04-04 15:43 ` Daniel P. Berrange
2017-04-04 16:27 ` Stefan Berger
2017-04-03 17:32 ` Patrick Ohly
2017-04-03 17:38 ` Dr. David Alan Gilbert [this message]
2017-04-03 19:41 ` Patrick Ohly
2017-04-04 8:02 ` Dr. David Alan Gilbert
2017-04-03 17:34 ` Dr. David Alan Gilbert
2017-04-04 12:08 ` Stefan Berger
2017-04-05 7:09 ` Amarnath Valluri
2017-04-05 15:04 ` Stefan Berger
2017-04-05 15:08 ` Marc-André Lureau
2017-04-05 17:32 ` Stefan Berger
2017-04-05 17:49 ` Marc-André Lureau
2017-04-05 18:00 ` Stefan Berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170403173823.GD2112@work-vm \
--to=dgilbert@redhat.com \
--cc=amarnath.valluri@intel.com \
--cc=berrange@redhat.com \
--cc=patrick.ohly@intel.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).