Re: [tpmdd-devel] [PATCH] tpm: vtpm_proxy: Do not access host's event log

2016-11-21 Thread Jarkko Sakkinen
On Tue, Nov 22, 2016 at 08:07:42AM +0200, Jarkko Sakkinen wrote: > On Sat, Nov 19, 2016 at 11:32:55AM -0700, Jason Gunthorpe wrote: > > On Thu, Nov 17, 2016 at 06:15:20PM -0500, Stefan Berger wrote: > > > > > >>Further, I had the impression that the error unwinding following > > > >>-ENODEV has

Re: [tpmdd-devel] [PATCH] tpm: vtpm_proxy: Do not access host's event log

2016-11-21 Thread Jarkko Sakkinen
On Sat, Nov 19, 2016 at 11:32:55AM -0700, Jason Gunthorpe wrote: > On Thu, Nov 17, 2016 at 06:15:20PM -0500, Stefan Berger wrote: > > > >>Further, I had the impression that the error unwinding following -ENODEV > > >>has > > >>an issue related to sysfs. > > >I don't follow this comment.. > > >

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-21 Thread Jason Gunthorpe
On Mon, Nov 21, 2016 at 10:46:10PM +0200, Jarkko Sakkinen wrote: > On Mon, Nov 21, 2016 at 01:37:08PM -0700, Jason Gunthorpe wrote: > > On Mon, Nov 21, 2016 at 10:32:44PM +0200, Jarkko Sakkinen wrote: > > > > > > And this one fixes the sysfs problem > > > > > > > >

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-21 Thread Jarkko Sakkinen
On Mon, Nov 21, 2016 at 01:37:08PM -0700, Jason Gunthorpe wrote: > On Mon, Nov 21, 2016 at 10:32:44PM +0200, Jarkko Sakkinen wrote: > > > > And this one fixes the sysfs problem > > > > > > https://patchwork.kernel.org/patch/9438331/ > > > > > > Here is a commit message: > > > > > > tpm: Do not

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-21 Thread Jarkko Sakkinen
On Mon, Nov 21, 2016 at 10:32:44PM +0200, Jarkko Sakkinen wrote: > On Mon, Nov 21, 2016 at 10:55:20AM -0700, Jason Gunthorpe wrote: > > On Sun, Nov 20, 2016 at 12:14:51PM +, Jarkko Sakkinen wrote: > > > I was able to apply the patch after manually editing the mbox file. > > > Not nice. It'd be

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-21 Thread Jason Gunthorpe
On Mon, Nov 21, 2016 at 10:32:44PM +0200, Jarkko Sakkinen wrote: > > And this one fixes the sysfs problem > > > > https://patchwork.kernel.org/patch/9438331/ > > > > Here is a commit message: > > > > tpm: Do not call tpm_chip_unregister if register has not succeeded > > > > This is no longer

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-21 Thread Jarkko Sakkinen
On Mon, Nov 21, 2016 at 10:55:20AM -0700, Jason Gunthorpe wrote: > On Sun, Nov 20, 2016 at 12:14:51PM +, Jarkko Sakkinen wrote: > > I was able to apply the patch after manually editing the mbox file. > > Not nice. It'd be better to send these things with git-send-email > > to simplify the mgmt

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-21 Thread Jarkko Sakkinen
On Mon, Nov 21, 2016 at 10:15:30AM -0700, Jason Gunthorpe wrote: > On Mon, Nov 21, 2016 at 12:06:20AM +0530, Nayna wrote: > > > rc = tpm_bios_log_setup(chip); > > >- if (rc == -ENODEV) > > >+ if (rc != 0 && rc != -ENODEV) > > > return rc; > > > > This will return in case of -EFAULT

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-21 Thread Jarkko Sakkinen
On Mon, Nov 21, 2016 at 10:55:20AM -0700, Jason Gunthorpe wrote: > On Sun, Nov 20, 2016 at 12:14:51PM +, Jarkko Sakkinen wrote: > > I was able to apply the patch after manually editing the mbox file. > > Not nice. It'd be better to send these things with git-send-email > > to simplify the mgmt

Re: [tpmdd-devel] [PATCH] tpm: use test_bit() to check TPM2 flag in eventlog and sysfs code

2016-11-21 Thread Jarkko Sakkinen
On Mon, Nov 21, 2016 at 03:03:51AM -0500, Nayna Jain wrote: > There is change done to introduce atomic bitops to set and test > chip->flags. > This patch fixes tpm_bios_log_setup() and tpm_sysfs_add_device() > to use test_bit() to check for TPM_CHIP_FLAG_TPM2 flag. > > Signed-off-by: Nayna Jain

Re: [tpmdd-devel] [PATCH v6 0/9] tpm: cleanup/fixes in existing event log support

2016-11-21 Thread Jason Gunthorpe
On Sun, Nov 20, 2016 at 09:58:48AM +, Jarkko Sakkinen wrote: > On Sat, Nov 19, 2016 at 11:36:27AM -0700, Jason Gunthorpe wrote: > > On Tue, Nov 15, 2016 at 10:54:53AM -0800, Jarkko Sakkinen wrote: > > > On Tue, Nov 15, 2016 at 11:06:10AM -0700, Jason Gunthorpe wrote: > > > > On Tue, Nov 15,

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-21 Thread Jason Gunthorpe
On Sun, Nov 20, 2016 at 12:14:51PM +, Jarkko Sakkinen wrote: > I was able to apply the patch after manually editing the mbox file. > Not nice. It'd be better to send these things with git-send-email > to simplify the mgmt (like getting them into patchwork for starters) > especially in a

Re: [tpmdd-devel] [PATCH 2/2] tpm: Fix error code handling after tpm_bios_log_setup

2016-11-21 Thread Jason Gunthorpe
On Mon, Nov 21, 2016 at 12:06:20AM +0530, Nayna wrote: > > rc = tpm_bios_log_setup(chip); > >-if (rc == -ENODEV) > >+if (rc != 0 && rc != -ENODEV) > > return rc; > > This will return in case of -EFAULT as well, where the check is that log is > already initialized. Do we

[tpmdd-devel] [PATCH] tpm: use test_bit() to check TPM2 flag in eventlog and sysfs code

2016-11-21 Thread Nayna Jain
There is change done to introduce atomic bitops to set and test chip->flags. This patch fixes tpm_bios_log_setup() and tpm_sysfs_add_device() to use test_bit() to check for TPM_CHIP_FLAG_TPM2 flag. Signed-off-by: Nayna Jain --- drivers/char/tpm/tpm-sysfs.c| 2 +-