Re: [tpmdd-devel] [PATCH 09/13] tpm: Pull everything related to sysfs into tpm-sysfs.c

2013-10-04 Thread Stefan Berger
On 10/04/2013 01:08 PM, Jason Gunthorpe wrote: On Mon, Sep 30, 2013 at 05:09:51PM -0500, Joel Schopp wrote: So far, nobody I have talked to has offered any strong opinions on what locality should be used or how it should be set. I think finding a developer of trousers may be the most useful to

Re: [TrouSerS-tech] [Ksummit-discuss] TPM MiniSummit @ LinuxCon Europe

2014-10-07 Thread Stefan Berger
On 09/23/2014 12:42 PM, Andy Lutomirski wrote: On Sep 22, 2014 2:07 AM, Peter Huewe peterhu...@gmx.de wrote: Hi, I would like to 'invite' all interested parties in a short TPM minisummit where we can discuss the following hot topics of the TPM subsystem over a beer or two: - State of the

Re: [tpmdd-devel] [TrouSerS-tech] [Ksummit-discuss] TPM MiniSummit @ LinuxCon Europe

2014-10-07 Thread Stefan Berger
On 10/07/2014 02:02 PM, Jason Gunthorpe wrote: On Tue, Oct 07, 2014 at 01:54:41PM -0400, Stefan Berger wrote: Why add the complexity of swapping of authenticated sessions and keys into the kernel if you can handle this in userspace? You need a library that is aware of the number of key slots

Re: [tpmdd-devel] [PATCH v9] tpm_tis: verify interrupt during init

2014-09-23 Thread Stefan Berger
On 09/23/2014 07:55 AM, Scot Doyle wrote: On Tue, 23 Sep 2014, Scot Doyle wrote: --- drivers/char/tpm/tpm_tis.c | 76 +- 1 file changed, 62 insertions(+), 14 deletions(-) diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index

Re: [tpmdd-devel] [PATCH v1 12/12] tpm: TPM2 sysfs attributes

2014-09-24 Thread Stefan Berger
On 09/24/2014 01:13 PM, Jason Gunthorpe wrote: On Wed, Sep 24, 2014 at 12:06:02PM +0300, Jarkko Sakkinen wrote: +static ssize_t durations_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + struct tpm_chip *chip = dev_get_drvdata(dev); +

Re: [PATCH v9] tpm_tis: verify interrupt during init

2014-09-24 Thread Stefan Berger
On 09/24/2014 03:38 PM, Scot Doyle wrote: On Tue, 23 Sep 2014, Stefan Berger wrote: On 09/23/2014 07:55 AM, Scot Doyle wrote: On Tue, 23 Sep 2014, Scot Doyle wrote: +static void disable_interrupts(struct tpm_chip *chip) +{ + u32 intmask; + intmask = + ioread32(chip

Re: [tpmdd-devel] [PATCH v7 01/10] tpm: merge duplicate transmit_cmd() functions

2014-11-25 Thread Stefan Berger
On 11/11/2014 08:45 AM, Jarkko Sakkinen wrote: Merged transmit_cmd() functions in tpm-interface.c and tpm-sysfs.c. Added tpm_ prefix for consistency sake. Changed cmd parameter as opaque. This enables to use separate command structures for TPM1 and TPM2 commands in future. Loose coupling works

Re: [tpmdd-devel] [PATCH v7 03/10] tpm: fix multiple race conditions in tpm_ppi.c

2014-11-25 Thread Stefan Berger
On 11/11/2014 08:45 AM, Jarkko Sakkinen wrote: Traversal of the ACPI device tree was not done right. It should lookup PPI only under the ACPI device that it is associated. Otherwise, it could match to a wrong PPI interface if there are two TPM devices in the device tree. Removed global ACPI

Re: [tpmdd-devel] [PATCH v7 04/10] tpm: rename chip-dev to chip-pdev

2014-11-25 Thread Stefan Berger
stuff */ const struct tpm_class_ops *ops; int dev_num;/* /dev/tpm# */ So this is the core requiring the renamings. I assume you got them all and none were hidden in #if's or so. Reviewed-by: Stefan Berger stef...@linux.vnet.ibm.com -- To unsubscribe from

Re: [tpmdd-devel] [PATCH v7 09/10] tpm: TPM 2.0 FIFO Interface

2014-11-25 Thread Stefan Berger
On 11/11/2014 08:45 AM, Jarkko Sakkinen wrote: From: Will Arthur will.c.art...@intel.com Detect TPM 2.0 by using the extended STS (STS3) register. For TPM 2.0, instead of calling tpm_get_timeouts(), assign duration and timeout values defined in the TPM 2.0 PTP specification. Signed-off-by:

Re: [tpmdd-devel] [PATCH v7 10/10] tpm: TPM 2.0 sysfs attributes

2014-11-25 Thread Stefan Berger
On 11/11/2014 08:45 AM, Jarkko Sakkinen wrote: Manadatory sysfs attributes for TPM 2.0 devices so that it is easy to check whether storage hierarchies are enabled and use PPI interface. Signed-off-by: Jarkko Sakkinen jarkko.sakki...@linux.intel.com ---

Re: [tpmdd-devel] [PATCH v7 07/10] tpm: TPM 2.0 baseline support

2014-11-25 Thread Stefan Berger
On 11/11/2014 08:45 AM, Jarkko Sakkinen wrote: TPM 2.0 devices are separated by adding a field 'flags' to struct tpm_chip and defining a flag TPM_CHIP_FLAG_TPM2 for tagging them. This patch adds the following internal functions: - tpm2_get_random() - tpm2_get_tpm_pt() - tpm2_pcr_extend() -

Re: [tpmdd-devel] [PATCH v7 06/10] tpm: fix: move sysfs attributes to the correct place.

2014-11-25 Thread Stefan Berger
On 11/11/2014 08:45 AM, Jarkko Sakkinen wrote: The sysfs attributes of the TPM device were created to the platform device directory that owns the character device instead of placing them correctly to the directory of the character device, They were also created in a racy way so that character

Re: [tpmdd-devel] [PATCH v7 05/10] tpm: device class for tpm

2014-11-26 Thread Stefan Berger
-vendor.irq); This looks ok to me. Reviewed-by: Stefan Berger stef...@linux.vnet.ibm.com -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read

Re: [tpmdd-devel] [PATCH v7 08/10] tpm: TPM 2.0 CRB Interface

2014-11-26 Thread Stefan Berger
On 11/11/2014 08:45 AM, Jarkko Sakkinen wrote: tpm_crb is a driver for TPM 2.0 Command Response Buffer (CRB) Interface as defined in PC Client Platform TPM Profile (PTP) Specification. Only polling and single locality is supported as these are the limitations of the available hardware, Platform

Re: [tpmdd-devel] [PATCH v7 02/10] tpm: two-phase chip management functions

2014-11-26 Thread Stefan Berger
*priv = TPM_VPRIV(chip); - tpm_remove_hardware(dev-dev); + tpm_chip_unregister(chip); ring_free(priv); TPM_VPRIV(chip) = NULL; return 0; Reviewed-by: Stefan Berger stef...@linux.vnet.ibm.com -- To unsubscribe from this list: send the line unsubscribe linux

Re: [tpmdd-devel] [PATCH v7 09/10] tpm: TPM 2.0 FIFO Interface

2014-11-26 Thread Stefan Berger
On 11/11/2014 08:45 AM, Jarkko Sakkinen wrote: From: Will Arthur will.c.art...@intel.com Detect TPM 2.0 by using the extended STS (STS3) register. For TPM 2.0, instead of calling tpm_get_timeouts(), assign duration and timeout values defined in the TPM 2.0 PTP specification. Signed-off-by:

Re: [PATCH v10 1/8] tpm: merge duplicate transmit_cmd() functions

2014-12-14 Thread Stefan Berger
fine here. Signed-off-by: Jarkko Sakkinen jarkko.sakki...@linux.intel.com Reviewed-by: Jasob Gunthorpe jason.guntho...@obsidianresearch.com Reviewed-by: Stephan Berger stephan.ber...@linux.vnet.ibm.com Not quite ... Stefan Berger stef...@linux.vnet.ibm.com Stefan -- To unsubscribe from

Re: [PATCH v10 8/8] tpm: TPM 2.0 FIFO Interface

2014-12-14 Thread Stefan Berger
On 12/12/2014 02:46 PM, Jarkko Sakkinen wrote: Detect TPM 2.0 by sending idempotent TPM 2.x command. Ordinals for TPM 2.0 are higher than TPM 1.x commands so this should be fail-safe. Using STS3 is unreliable because some chips just report 0xff and not what the spec says. TPM TIS 1.2 can

Re: [PATCH v10 8/8] tpm: TPM 2.0 FIFO Interface

2014-12-14 Thread Stefan Berger
On 12/14/2014 10:40 AM, Jarkko Sakkinen wrote: On Sun, Dec 14, 2014 at 09:48:26AM -0500, Stefan Berger wrote: On 12/12/2014 02:46 PM, Jarkko Sakkinen wrote: Detect TPM 2.0 by sending idempotent TPM 2.x command. Ordinals for TPM 2.0 are higher than TPM 1.x commands so this should be fail-safe

Re: [PATCH v10 8/8] tpm: TPM 2.0 FIFO Interface

2014-12-14 Thread Stefan Berger
On 12/14/2014 01:27 PM, Scot Doyle wrote: On Sun, 14 Dec 2014, Stefan Berger wrote: On 12/14/2014 10:40 AM, Jarkko Sakkinen wrote: On Sun, Dec 14, 2014 at 09:48:26AM -0500, Stefan Berger wrote: On 12/12/2014 02:46 PM, Jarkko Sakkinen wrote: Detect TPM 2.0 by sending idempotent TPM 2.x

Re: [tpmdd-devel] [PATCH v8 7/8] tpm: TPM 2.0 CRB Interface

2014-12-02 Thread Stefan Berger
On 12/02/2014 05:31 PM, Jarkko Sakkinen wrote: +struct acpi_tpm2 { + struct acpi_table_header hdr; + u16 platform_class; + u16 reserved; + u64 control_area_pa; + u32 start_method; +} __packed; [...] + } + + if (buf-hdr.length != sizeof(struct

Re: [tpmdd-devel] [PATCH v8 6/8] tpm: TPM 2.0 baseline support

2014-12-02 Thread Stefan Berger
On 12/02/2014 05:31 PM, Jarkko Sakkinen wrote: + +#define TPM2_STARTUP_IN_SIZE \ + (sizeof(struct tpm_input_header) + \ +sizeof(struct tpm2_pcr_read_in)) + +static const struct tpm_input_header tpm2_startup_header = { + .tag = cpu_to_be16(TPM2_ST_NO_SESSIONS), + .length

Re: [tpmdd-devel] [PATCH v8 6/8] tpm: TPM 2.0 baseline support

2014-12-02 Thread Stefan Berger
On 12/02/2014 05:31 PM, Jarkko Sakkinen wrote: + +/** + * tpm2_startup() - send startup command to the TPM chip + * @chip: TPM chip to use. + * @startup_type startup type. The value is either + * TPM_SU_CLEAR or TPM_SU_STATE. + * + * 0 is returned when

Re: [tpmdd-devel] [PATCH v7 08/10] tpm: TPM 2.0 CRB Interface

2014-11-28 Thread Stefan Berger
On 11/27/2014 10:40 AM, Jarkko Sakkinen wrote: On Wed, Nov 26, 2014 at 09:06:57AM -0500, Stefan Berger wrote: On 11/11/2014 08:45 AM, Jarkko Sakkinen wrote: tpm_crb is a driver for TPM 2.0 Command Response Buffer (CRB) Interface as defined in PC Client Platform TPM Profile (PTP) Specification

Re: [tpmdd-devel] [PATCH v9 8/8] tpm: TPM 2.0 FIFO Interface

2014-12-05 Thread Stefan Berger
On 12/05/2014 10:01 AM, Peter Huewe wrote: Am Donnerstag, 4. Dezember 2014, 06:55:18 schrieb Jarkko Sakkinen: From: Will Arthur will.c.art...@intel.com Detect TPM 2.0 by using the extended STS (STS3) register. For TPM 2.0, instead of calling tpm_get_timeouts(), assign duration and timeout

Re: [PATCH] tpm, tpm_tis: fix TPM 2.0 probing

2015-02-11 Thread Stefan Berger
On 02/10/2015 07:50 AM, Jarkko Sakkinen wrote: On Tue, Feb 10, 2015 at 07:16:32AM -0500, Stefan Berger wrote: On 02/09/2015 03:39 AM, Jarkko Sakkinen wrote: On Mon, Feb 09, 2015 at 12:08:46AM +0100, Peter Hüwe wrote: Am Mittwoch, 4. Februar 2015, 15:21:09 schrieb Jarkko Sakkinen: If during

Re: [PATCH] tpm, tpm_tis: fix TPM 2.0 probing

2015-02-10 Thread Stefan Berger
On 02/09/2015 03:39 AM, Jarkko Sakkinen wrote: On Mon, Feb 09, 2015 at 12:08:46AM +0100, Peter Hüwe wrote: Am Mittwoch, 4. Februar 2015, 15:21:09 schrieb Jarkko Sakkinen: If during transmission system error was returned, the logic was to incorrectly deduce that chip is a TPM 1.x chip. This

Re: [tpmdd-devel] [PATCH 1/3] vTPM: fixed the limit checking

2015-05-11 Thread Stefan Berger
On 05/05/2015 08:51 PM, Hon Ching(Vicky) Lo wrote: Do not skip the last entry of the event log. Signed-off-by: Hon Ching(Vicky) Lo hon...@linux.vnet.ibm.com Signed-off-by: Joy Latten jmlat...@linux.vnet.ibm.com Changelog: - remove redundant code --- drivers/char/tpm/tpm_eventlog.c |5

Re: [PATCH] tpm_vtpm_proxy: fix sparse warning

2016-06-16 Thread Stefan Berger
:expected void [noderef] *to drivers/char/tpm//tpm_vtpm_proxy.c:559:34:got struct vtpm_proxy_new_dev *vtpm_new_dev_p The __user annotation was missing from the corresponding variable. Signed-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Tested-by: Stefan Berger

[PATCH] tpm: vtpm_proxy: Introduce flag to prevent sysfs entries

2016-06-24 Thread Stefan Berger
be set by a container management stack to prevent TPM related information leakage between containers who share entries in sysfs. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-chip.c | 2 +- drivers/char/tpm/tpm.h| 1 + drivers/ch

Re: [PATCH] tpm: vtpm_proxy: Introduce flag to prevent sysfs entries

2016-06-24 Thread Stefan Berger
On 06/24/2016 01:48 PM, Jason Gunthorpe wrote: On Fri, Jun 24, 2016 at 10:36:55AM -0400, Stefan Berger wrote: Introduce TPM_VTPM_PROXY_NO_SYSFS flag that prevents a vtpm_proxy driver instance from having the typical sysfs entries that shows the state of the TPM. The flag is to be set

Re: [PATCH 2/2] tpm_crb: fix address space of the return pointer in crb_map_res()

2016-06-17 Thread Stefan Berger
[noderef] * drivers/char/tpm//tpm_crb.c:248:31:got void * Fixes: 1bd047be37d9 ("tpm_crb: Use devm_ioremap_resource") Signed-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Tested-by: Stefan Berger <stef...@linux.vnet.ibm.com>

Re: [tpmdd-devel] [PATCH 2/3] tpm: Get rid of chip->pdev

2016-02-13 Thread Stefan Berger
On 02/12/2016 07:04 PM, Jason Gunthorpe wrote: This is a hold over from before the struct device conversion. - All prints should be using >dev, which is the Linux standard. This changes prints to use tpm0 as the device name, not the PnP/etc ID. - The few places involving sysfs/modules

[PATCH v6 10/11] tpm: Add documentation for the tpm_vtpm device driver

2016-03-09 Thread Stefan Berger
Add documentation for the tpm_vtpm device driver that implements support for providing TPM functionality to Linux containers. Parts of this documentation were recycled from the Xen vTPM device driver documentation. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> CC: linux-

[PATCH v6 09/11] tpm: Initialize TPM and get durations and timeouts

2016-03-09 Thread Stefan Berger
Add the retrieval of TPM 1.2 durations and timeouts. Since this requires the startup of the TPM, do this for TPM 1.2 and TPM 2. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> CC: linux-kernel@vger.kernel.org CC: linux-...@vger.kernel.org CC: linux-...@vger.kernel.org --- driver

[PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-09 Thread Stefan Berger
/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 <stef...@linux.vnet.ibm.com&

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-10 Thread Stefan Berger
> On Wed, Mar 09, 2016 at 12:39:27PM -0500, Stefan Berger wrote: > > This patch implements a 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/tpm

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-10 Thread Stefan Berger
On 03/10/2016 11:39 AM, Jarkko Sakkinen wrote: +/* above flags */ +#define VTPM_FLAG_TPM2 1 /* emulator is TPM 2 */ + +/* all supported flags */ +#define VTPM_FLAGS_ALL (VTPM_FLAG_TPM2) + +#define VTPM_TPM 0xa0 + +#define VTPM_NEW_DEV _IOW(VTPM_TPM, 0x00, struct vtpm_new_dev)

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-10 Thread Stefan Berger
On 03/09/2016 09:57 PM, Andy Lutomirski wrote: On Wed, Mar 9, 2016 at 6:34 PM, Stefan Berger <stef...@linux.vnet.ibm.com> wrote: On 03/09/2016 01:01 PM, Andy Lutomirski wrote: On Wed, Mar 9, 2016 at 9:39 AM, Stefan Berger <stef...@linux.vnet.ibm.com> wrote: This patch impleme

Re: [tpmdd-devel] [PATCH] tpm_crb: drop struct resource res from struct crb_priv

2016-03-15 Thread Stefan Berger
com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm_crb.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index a12b319..8e02c44 100644 --- a/

[PATCH v7 05/10] tpm: Split out the devm stuff from tpmm_chip_alloc

2016-03-11 Thread Stefan Berger
From: Jason Gunthorpe <jguntho...@obsidianresearch.com> tpm_chip_alloc becomes a typical subsystem allocate call. Signed-off-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> Tested-by: Stefan Berger <stef.

[PATCH v7 07/10] tpm: Introduce TPM_CHIP_FLAG_VIRTUAL

2016-03-11 Thread Stefan Berger
Introduce TPM_CHIP_FLAG_VIRTUAL to be used when the chip device has no parent device. Also adapt tpm_chip_alloc so that it can be called with parent device being NULL. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com&

[PATCH v7 01/10] tpm: Get rid of chip->pdev

2016-03-11 Thread Stefan Berger
on Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Tested-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakki...

[PATCH v7 03/10] tpm: Provide strong locking for device removal

2016-03-11 Thread Stefan Berger
again. For now the ops_lock is placed very high in the call stack, it could be pushed down and made more granular in future if necessary. Signed-off-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakk

[PATCH v7 09/10] tpm: Initialize TPM and get durations and timeouts

2016-03-11 Thread Stefan Berger
Add the retrieval of TPM 1.2 durations and timeouts. Since this requires the startup of the TPM, do this for TPM 1.2 and TPM 2. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> CC: linux-kernel@vger.kernel.org CC: linux-...@vger.kernel.org CC: linux-...@vger.kernel.org --- driver

[PATCH v7 10/10] tpm: Add documentation for the tpm_vtpm device driver

2016-03-11 Thread Stefan Berger
Add documentation for the tpm_vtpm device driver that implements support for providing TPM functionality to Linux containers. Parts of this documentation were recycled from the Xen vTPM device driver documentation. Update the documentation for the ioctl numbers. Signed-off-by: Stefan Berger

[PATCH v7 08/10] tpm: Proxy driver for supporting multiple emulated TPMs

2016-03-11 Thread Stefan Berger
/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 <stef...@linux.vnet.ibm.com&

[PATCH v7 06/10] tpm: Replace device number bitmap with IDR

2016-03-11 Thread Stefan Berger
. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Signed-off-by: Jarkk

[PATCH v7 04/10] tpm: Get rid of module locking

2016-03-11 Thread Stefan Berger
the reader lock on 'ops' while using 'ops' and this prevents the module from un- registering, which needs the writer lock. Once the module unregistered the 'ops' cannot be found anymore. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianres

[PATCH v7 00/10] Multi-instance vTPM proxy driver

2016-03-11 Thread Stefan Berger
ror codes for unsupported flags and ioctls - Added documentation patch Jason Gunthorpe (4): tpm: Get rid of chip->pdev tpm: Get rid of devname tpm: Provide strong locking for device removal tpm: Split out the devm stuff from tpmm_chip_alloc Stefan Berger (6): tpm: Get rid of module l

[PATCH v7 02/10] tpm: Get rid of devname

2016-03-11 Thread Stefan Berger
From: Jason Gunthorpe <jguntho...@obsidianresearch.com> Now that we have a proper struct device just use dev_name() to access this value instead of keeping two copies. Signed-off-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Stefan Berger <stef...@lin

[PATCH v8 03/10] tpm: Provide strong locking for device removal

2016-03-13 Thread Stefan Berger
again. For now the ops_lock is placed very high in the call stack, it could be pushed down and made more granular in future if necessary. Signed-off-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakk

[PATCH v8 01/10] tpm: Get rid of chip->pdev

2016-03-13 Thread Stefan Berger
on Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Tested-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakki...

[PATCH v8 10/10] tpm: Add documentation for the tpm_vtpm device driver

2016-03-13 Thread Stefan Berger
Add documentation for the tpm_vtpm device driver that implements support for providing TPM functionality to Linux containers. Parts of this documentation were recycled from the Xen vTPM device driver documentation. Update the documentation for the ioctl numbers. Signed-off-by: Stefan Berger

[PATCH v8 08/10] tpm: Proxy driver for supporting multiple emulated TPMs

2016-03-13 Thread Stefan Berger
/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 <stef...@linux.vnet.ibm.com&

[PATCH v8 00/10] Multi-instance vTPM proxy driver

2016-03-13 Thread Stefan Berger
tls - Added documentation patch Jason Gunthorpe (4): tpm: Get rid of chip->pdev tpm: Get rid of devname tpm: Provide strong locking for device removal tpm: Split out the devm stuff from tpmm_chip_alloc Stefan Berger (6): tpm: Get rid of module locking tpm: Replace device number

[PATCH v8 06/10] tpm: Replace device number bitmap with IDR

2016-03-13 Thread Stefan Berger
. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Signed-off-by: Jarkk

[PATCH v8 07/10] tpm: Introduce TPM_CHIP_FLAG_VIRTUAL

2016-03-13 Thread Stefan Berger
Introduce TPM_CHIP_FLAG_VIRTUAL to be used when the chip device has no parent device. Also adapt tpm_chip_alloc so that it can be called with parent device being NULL. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com&

[PATCH v8 02/10] tpm: Get rid of devname

2016-03-13 Thread Stefan Berger
From: Jason Gunthorpe <jguntho...@obsidianresearch.com> Now that we have a proper struct device just use dev_name() to access this value instead of keeping two copies. Signed-off-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Stefan Berger <stef...@lin

[PATCH v8 05/10] tpm: Split out the devm stuff from tpmm_chip_alloc

2016-03-13 Thread Stefan Berger
From: Jason Gunthorpe <jguntho...@obsidianresearch.com> tpm_chip_alloc becomes a typical subsystem allocate call. Signed-off-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Reviewed-by: Stefan Berger <stef...@linux.vnet.ibm.com> Tested-by: Stefan Berger <stef.

[PATCH v8 09/10] tpm: Initialize TPM and get durations and timeouts

2016-03-13 Thread Stefan Berger
Add the retrieval of TPM 1.2 durations and timeouts. Since this requires the startup of the TPM, do this for TPM 1.2 and TPM 2. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> CC: linux-kernel@vger.kernel.org CC: linux-...@vger.kernel.org CC: linux-...@vger.kernel.org --- driver

[PATCH v8 04/10] tpm: Get rid of module locking

2016-03-13 Thread Stefan Berger
the reader lock on 'ops' while using 'ops' and this prevents the module from un- registering, which needs the writer lock. Once the module unregistered the 'ops' cannot be found anymore. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianres

Re: [PATCH v7 08/10] tpm: Proxy driver for supporting multiple emulated TPMs

2016-03-12 Thread Stefan Berger
On 03/12/2016 01:51 PM, Jarkko Sakkinen wrote: On Fri, Mar 11, 2016 at 09:51:03PM -0500, 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

Re: [PATCH v8 08/10] tpm: Proxy driver for supporting multiple emulated TPMs

2016-03-19 Thread Stefan Berger
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

Re: [PATCH v6 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-09 Thread Stefan Berger
On 03/09/2016 01:01 PM, Andy Lutomirski wrote: On Wed, Mar 9, 2016 at 9:39 AM, Stefan Berger <stef...@linux.vnet.ibm.com> wrote: This patch implements a driver for supporting multiple emulated TPMs in a system. The driver implements a device /dev/vtpmx that is used to created a client

Re: [v8,09/10] tpm: Initialize TPM and get durations and timeoutsg

2016-03-29 Thread Stefan Berger
On 03/29/2016 11:31 AM, Jarkko Sakkinen wrote: On Tue, Mar 22, 2016 at 06:54:30AM -0400, Stefan Berger wrote: On 03/22/2016 02:34 AM, Jarkko Sakkinen wrote: On Sun, Mar 13, 2016 at 06:54:39PM -0400, Stefan Berger wrote: Add the retrieval of TPM 1.2 durations and timeouts. Since this requires

Re: [PATCH v9 2/4] tpm: Proxy driver for supporting multiple emulated TPMs

2016-04-07 Thread Stefan Berger
On 04/07/2016 08:35 AM, Jarkko Sakkinen wrote: On Tue, Mar 29, 2016 at 02:19:12PM -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

Re: [PATCH v8 08/10] tpm: Proxy driver for supporting multiple emulated TPMs

2016-03-19 Thread Stefan Berger
On 03/16/2016 04:42 PM, Jarkko Sakkinen wrote: On Sun, Mar 13, 2016 at 06:54:38PM -0400, Stefan Berger wrote: + +/* above flags */ +#define VTPM_PROXY_FLAG_TPM2 1 /* emulator is TPM 2 */ + +/* all supported flags */ +#define VTPM_PROXY_FLAGS_ALL (VTPM_PROXY_FLAG_TPM2) This can be moved

Re: [v8,09/10] tpm: Initialize TPM and get durations and timeouts

2016-03-22 Thread Stefan Berger
On 03/22/2016 02:34 AM, Jarkko Sakkinen wrote: On Sun, Mar 13, 2016 at 06:54:39PM -0400, Stefan Berger wrote: Add the retrieval of TPM 1.2 durations and timeouts. Since this requires the startup of the TPM, do this for TPM 1.2 and TPM 2. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.

Re: [PATCH] tpm: fix tpm_bios_log_setup stub prototype

2016-03-19 Thread Stefan Berger
On 03/16/2016 01:57 PM, Jason Gunthorpe wrote: On Wed, Mar 16, 2016 at 12:13:41PM +0200, Jarkko Sakkinen wrote: On Wed, Mar 16, 2016 at 09:19:48AM +0100, Arnd Bergmann wrote: A cleanup patch changed the prototype of the regular tpm_bios_log_setup function, but not that of the stub that is used

[PATCH v5 10/11] tpm: Add documentation for the tpm_vtpm device driver

2016-03-07 Thread Stefan Berger
Add documentation for the tpm_vtpm device driver that implements support for providing TPM functionality to Linux containers. Parts of this documentation were recycled from the Xen vTPM device driver documentation. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> CC: linux-

[PATCH v5 08/11] tpm: Driver for supporting multiple emulated TPMs

2016-03-07 Thread Stefan Berger
/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 <stef...@linux.vnet.ibm.com&

[PATCH v5 09/11] tpm: Initialize TPM and get durations and timeouts

2016-03-07 Thread Stefan Berger
Add the retrieval of TPM 1.2 durations and timeouts. Since this requires the startup of the TPM, do this for TPM 1.2 and TPM 2. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> CC: linux-kernel@vger.kernel.org CC: linux-...@vger.kernel.org CC: linux-...@vger.kernel.org --- driver

[PATCH v9 1/4] tpm: Introduce TPM_CHIP_FLAG_VIRTUAL

2016-03-29 Thread Stefan Berger
Introduce TPM_CHIP_FLAG_VIRTUAL to be used when the chip device has no parent device. Also adapt tpm_chip_alloc so that it can be called with parent device being NULL. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com&

[PATCH v9 2/4] tpm: Proxy driver for supporting multiple emulated TPMs

2016-03-29 Thread Stefan Berger
/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 <stef...@linux.vnet.ibm.com&

[PATCH v9 0/4] Multi-instance vTPM proxy driver

2016-03-29 Thread Stefan Berger
. v5->v6: - Adapted errno's for unsupported flags and ioctls following Jason's comments v4->v5: - Introduced different error codes for unsupported flags and ioctls - Added documentation patch Stefan Berger (4): tpm: Introduce TPM_CHIP_FLAG_VIRTUAL tpm: Proxy driver for supporting mu

[PATCH v9 3/4] tpm: Initialize TPM and get durations and timeouts

2016-03-29 Thread Stefan Berger
Add the retrieval of TPM 1.2 durations and timeouts. Since this requires the startup of the TPM, do this for TPM 1.2 and TPM 2. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> CC: linux-kernel@vger.kernel.org CC: linux-...@vger.kernel.org CC: linux-...@vger.kernel.org --- driver

[PATCH v9 4/4] tpm: Add documentation for the tpm_vtpm device driver

2016-03-29 Thread Stefan Berger
Add documentation for the tpm_vtpm device driver that implements support for providing TPM functionality to Linux containers. Parts of this documentation were recycled from the Xen vTPM device driver documentation. Update the documentation for the ioctl numbers. Signed-off-by: Stefan Berger

Re: [v9,3/4] tpm: Initialize TPM and get durations and timeouts

2016-03-31 Thread Stefan Berger
On 03/31/2016 04:24 AM, Jarkko Sakkinen wrote: On Tue, Mar 29, 2016 at 02:19:13PM -0400, Stefan Berger wrote: Add the retrieval of TPM 1.2 durations and timeouts. Since this requires the startup of the TPM, do this for TPM 1.2 and TPM 2. @@ -343,6 +362,55 @@ static const struct tpm_class_ops

Re: [PATCH] tpm: check for TPM_CHIP_FLAG_TPM2 before calling tpm2_shutdown()

2016-04-25 Thread Stefan Berger
On 04/25/2016 01:57 PM, Jason Gunthorpe wrote: On Mon, Apr 25, 2016 at 12:21:30PM +0300, Jarkko Sakkinen wrote: Signed-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Reported-by: Stefan Berger <stef...@linux.vnet.ibm.com> drivers/char/tpm/tpm-chip.c | 3 ++- 1 fil

Re: [PATCH v11 1/4] tpm: Remove all uses of drvdata from the TPM Core

2016-04-25 Thread Stefan Berger
On 04/22/2016 11:06 AM, Jarkko Sakkinen wrote: On Mon, Apr 18, 2016 at 01:26:13PM -0400, Stefan Berger wrote: From: Jason Gunthorpe <jguntho...@obsidianresearch.com> The final thing preventing this was the way the sysfs files were attached to the pdev. Follow the approach developed f

Re: [PATCH] tpm: select ANON_INODES for proxy driver

2016-04-28 Thread Stefan Berger
always there when we need it. Signed-off-by: Arnd Bergmann <a...@arndb.de> Fixes: 794c38e01358 ("tpm: Proxy driver for supporting multiple emulated TPMs") Acked-by: Stefan Berger <stef...@linux.vnet.ibm.com> Thanks.

Re: [tpmdd-devel] [PATCH v11 0/4] Multi-instance vTPM proxy driver

2016-04-26 Thread Stefan Berger
On 04/26/2016 05:28 AM, Jarkko Sakkinen wrote: On Fri, Apr 22, 2016 at 07:54:27PM +0300, Jarkko Sakkinen wrote: On Mon, Apr 18, 2016 at 01:26:12PM -0400, Stefan Berger wrote: The following series of patches implements a multi-instance vTPM proxy driver that can dynamically create TPM 'server

Re: [tpmdd-devel] [PATCH v11 0/4] Multi-instance vTPM proxy driver

2016-04-27 Thread Stefan Berger
On 04/27/2016 08:56 AM, Jarkko Sakkinen wrote: On Tue, Apr 26, 2016 at 07:30:26AM -0400, Stefan Berger wrote: On 04/26/2016 05:28 AM, Jarkko Sakkinen wrote: On Fri, Apr 22, 2016 at 07:54:27PM +0300, Jarkko Sakkinen wrote: On Mon, Apr 18, 2016 at 01:26:12PM -0400, Stefan Berger wrote

Re: [tpmdd-devel] [BUG, bisect] tpm: Remove all uses of drvdata from the TPM Core

2016-05-11 Thread Stefan Berger
On 05/11/2016 10:29 AM, Jeremiah Mahler wrote: Stefan, On Wed, May 11, 2016 at 06:27:52AM -0400, Stefan Berger wrote: Jeremiah Mahler <jmmah...@gmail.com> wrote on 05/10/2016 09:26:17 PM: [...] I forgot to cc you on the patch and obviously you weren't cc'ed through the Reported-by

[PATCH v10 2/5] tpm: Introduce TPM_CHIP_FLAG_VIRTUAL

2016-04-15 Thread Stefan Berger
Introduce TPM_CHIP_FLAG_VIRTUAL to be used when the chip device has no parent device. Prevent sysfs entries requiring a parent device from being created. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-chip.c | 7 +-- drivers/char/tpm/tpm.h |

[PATCH v10 3/5] tpm: Proxy driver for supporting multiple emulated TPMs

2016-04-15 Thread Stefan Berger
/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 <stef...@linux.vnet.ibm.

[PATCH v10 0/5] Multi-instance vTPM proxy driver

2016-04-15 Thread Stefan Berger
11). v5->v6: - Adapted errno's for unsupported flags and ioctls following Jason's comments v4->v5: - Introduced different error codes for unsupported flags and ioctls - Added documentation patch Jason Gunthorpe (1): tpm: Remove all uses of drvdata from the TPM Core Stefan

[PATCH v10 5/5] tpm: Add documentation for the tpm_vtpm_proxy device driver

2016-04-15 Thread Stefan Berger
Add documentation for the tpm_vtpm device driver that implements support for providing TPM functionality to Linux containers. Parts of this documentation were recycled from the Xen vTPM device driver documentation. Update the documentation for the ioctl numbers. Signed-off-by: Stefan Berger

[PATCH v10 4/5] tpm: Initialize TPM and get durations and timeouts

2016-04-15 Thread Stefan Berger
Add the retrieval of TPM 1.2 durations and timeouts. Since this requires the startup of the TPM, do this for TPM 1.2 and TPM 2. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> CC: linux-kernel@vger.kernel.org CC: linux-...@vger.kernel.org CC: linux-...@vger.kernel.org --- driver

[PATCH v10 1/5] tpm: Remove all uses of drvdata from the TPM Core

2016-04-15 Thread Stefan Berger
core now sanely uses container_of to get the chip. Signed-off-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-chip.c | 73 drivers/char/tpm

[PATCH v11 4/4] tpm: Add documentation for the tpm_vtpm_proxy device driver

2016-04-18 Thread Stefan Berger
Add documentation for the tpm_vtpm device driver that implements support for providing TPM functionality to Linux containers. Parts of this documentation were recycled from the Xen vTPM device driver documentation. Update the documentation for the ioctl numbers. Signed-off-by: Stefan Berger

[PATCH v11 2/4] tpm: Introduce TPM_CHIP_FLAG_VIRTUAL

2016-04-18 Thread Stefan Berger
Introduce TPM_CHIP_FLAG_VIRTUAL to be used when the chip device has no parent device. Prevent sysfs entries requiring a parent device from being created. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> --- driv

[PATCH v11 3/4] tpm: Proxy driver for supporting multiple emulated TPMs

2016-04-18 Thread Stefan Berger
. Since this requires the startup of the TPM, we send a startup for TPM 1.2 as well as TPM 2. Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> Reviewed-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> CC: linux-kernel@vger.kernel.org CC: linux-...@vger.kernel.o

[PATCH v11 1/4] tpm: Remove all uses of drvdata from the TPM Core

2016-04-18 Thread Stefan Berger
core now sanely uses container_of to get the chip. Signed-off-by: Jason Gunthorpe <jguntho...@obsidianresearch.com> Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm-chip.c | 73 drivers/char/tpm

[PATCH v11 0/4] Multi-instance vTPM proxy driver

2016-04-18 Thread Stefan Berger
rted flags and ioctls - Added documentation patch Jason Gunthorpe (1): tpm: Remove all uses of drvdata from the TPM Core Stefan Berger (3): tpm: Introduce TPM_CHIP_FLAG_VIRTUAL tpm: Proxy driver for supporting multiple emulated TPMs tpm: Add documentation for the tpm_vtpm_proxy device driver

Re: [PATCH v11 1/4] tpm: Remove all uses of drvdata from the TPM Core

2016-04-19 Thread Stefan Berger
On 04/19/2016 06:12 AM, Jarkko Sakkinen wrote: On Mon, Apr 18, 2016 at 01:26:13PM -0400, Stefan Berger wrote: From: Jason Gunthorpe <jguntho...@obsidianresearch.com> The final thing preventing this was the way the sysfs files were attached to the pdev. Follow the approach developed f

Re: [PATCH] tpm: vtpm_proxy: Introduce flag to prevent sysfs entries

2016-06-30 Thread Stefan Berger
On 06/27/2016 02:32 PM, Jarkko Sakkinen wrote: On Fri, Jun 24, 2016 at 02:43:00PM -0400, Stefan Berger wrote: On 06/24/2016 01:48 PM, Jason Gunthorpe wrote: On Fri, Jun 24, 2016 at 10:36:55AM -0400, Stefan Berger wrote: Introduce TPM_VTPM_PROXY_NO_SYSFS flag that prevents a vtpm_proxy driver

[PATCH] tpm: fix a sparse error in tpm-sysfs.c

2017-01-31 Thread Stefan Berger
drivers/char/tpm/tpm-sysfs.c:161:25: warning: expression using sizeof bool Fixes: c659af78eb7b ("tpm: Check size of response before accessing data") Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com> --- drivers/char/tpm/tpm.h | 2 +- 1 file changed, 1 insertion(+), 1 d

  1   2   3   4   5   6   7   8   9   10   >