Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966758AbcCPNuK (ORCPT ); Wed, 16 Mar 2016 09:50:10 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:37891 "EHLO e36.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966720AbcCPNuF (ORCPT ); Wed, 16 Mar 2016 09:50:05 -0400 X-IBM-Helo: d03dlp01.boulder.ibm.com X-IBM-MailFrom: stefanb@linux.vnet.ibm.com X-IBM-RcptTo: linux-api@vger.kernel.org;linux-doc@vger.kernel.org;linux-kernel@vger.kernel.org;linux-security-module@vger.kernel.org Subject: Re: [PATCH v8 08/10] tpm: Proxy driver for supporting multiple emulated TPMs To: Jarkko Sakkinen References: <1457909680-14085-1-git-send-email-stefanb@linux.vnet.ibm.com> <1457909680-14085-9-git-send-email-stefanb@linux.vnet.ibm.com> <20160316120916.GA14820@intel.com> Cc: tpmdd-devel@lists.sourceforge.net, jgunthorpe@obsidianresearch.com, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-api@vger.kernel.org, dhowells@redhat.com From: Stefan Berger Message-ID: <56E96485.2000100@linux.vnet.ibm.com> Date: Wed, 16 Mar 2016 09:49:57 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20160316120916.GA14820@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16031613-0021-0000-0000-000018687F85 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1302 Lines: 34 On 03/16/2016 08:09 AM, Jarkko Sakkinen wrote: > On Sun, Mar 13, 2016 at 06:54:38PM -0400, Stefan Berger wrote: >> This patch implements a proxy driver for supporting multiple emulated TPMs >> in a system. >> >> The driver implements a device /dev/vtpmx that is used to created >> a client device pair /dev/tpmX (e.g., /dev/tpm10) and a server side that >> is accessed using a file descriptor returned by an ioctl. >> The device /dev/tpmX is the usual TPM device created by the core TPM >> driver. Applications or kernel subsystems can send TPM commands to it >> and the corresponding server-side file descriptor receives these >> commands and delivers them to an emulated TPM. >> >> Signed-off-by: Stefan Berger >> CC: linux-kernel@vger.kernel.org >> CC: linux-doc@vger.kernel.org >> CC: linux-api@vger.kernel.org > Alternative to this would be to have /dev/vtpmx create: > > * /dev/vtpm0 for the server > * /dev/tpm0 for the client > > This is how David Howell's PoC worked and that's why I want > to make this alternative visible. My initial implementation had this as well. > > The server could even respawn without container noticing it. > This solution have better availability properties. A TPM should be stable enough to not have to be respawned... Stefan