Re: [tpmdd-devel] [PATCH 07/14] infiniband: utilize new device_add_cdev helper function

2017-02-21 Thread Jason Gunthorpe
On Tue, Feb 21, 2017 at 04:54:05PM -0700, Logan Gunthorpe wrote: > Is that true? Once device_register or device_add is called then you need > to use put_device. General rule is once kref_init has been called then you should use kref_put and not kfree. device_initialize ultimately calls

[tpmdd-devel] [PATCH] tpm crb: Work around BIOS's that report the wrong ACPI region size

2017-02-21 Thread Jason Gunthorpe
The expectation is that the if the CRB cmd/rsp buffer falls within the ACPI region that the entire buffer will be within the reason. Otherwise resource reservation will fail when it crosses regions. Work around this BIOS bug by limiting the cmd/rsp buffer to the length of the declared ACPI

Re: [tpmdd-devel] [PATCH 07/14] infiniband: utilize new device_add_cdev helper function

2017-02-21 Thread Jason Gunthorpe
On Mon, Feb 20, 2017 at 10:00:46PM -0700, Logan Gunthorpe wrote: > This patch updates core/ucm.c which didn't originally use the > cdev.kobj.parent with it's parent device. I did not look heavily into > whether this was a bug or not, but it seems likely to me there would > be a use before free.

Re: [tpmdd-devel] [PATCH 05/14] tpm-chip: utilize new device_add_cdev helper function

2017-02-21 Thread Jason Gunthorpe
On Mon, Feb 20, 2017 at 10:00:44PM -0700, Logan Gunthorpe wrote: > Signed-off-by: Logan Gunthorpe > drivers/char/tpm/tpm-chip.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Jason Gunthorpe Jason

Re: [tpmdd-devel] [PATCH v2 4/7] tpm: infrastructure for TPM spaces

2017-02-21 Thread Nayna
On 02/17/2017 12:55 AM, Jarkko Sakkinen wrote: > Added an ability to virtualize TPM commands into an isolated context > that we call a TPM space because the word context is already heavily > used in the TPM specification. Both the handle areas and bodies (where > necessary) are virtualized. > >

Re: [tpmdd-devel] [PATCH 1/2] tpm: Apply an adapterlimit for retransmission.

2017-02-21 Thread Andrew Lunn
On Tue, Feb 21, 2017 at 03:44:59PM +0100, Enric Balletbo i Serra wrote: > From: Bryan Freed > > When the I2C Infineon part is attached to an I2C adapter that imposes > a size limitation, large requests will fail -EINVAL. > Retry them with size backoff without re-issuing the

[tpmdd-devel] [PATCH 2/2] tpm: Do not assume an i2c adapter preserves the msg len

2017-02-21 Thread Enric Balletbo i Serra
From: Bryan Freed Prevent a possible infinite loop by using a local variable to advance len down to 0. This is safer than trusting the I2C and adapter drivers to preserve msg2.len. Signed-off-by: Bryan Freed Signed-off-by: Enric Balletbo i Serra

Re: [tpmdd-devel] [GIT PULL] tpmdd fixes for Linux 4.11

2017-02-21 Thread Jarkko Sakkinen
On Tue, Feb 21, 2017 at 07:08:29PM +1100, James Morris wrote: > On Mon, 20 Feb 2017, Jarkko Sakkinen wrote: > > > Hi > > > > Some small scoped but needed fixes for the release. > > > > Pulled, just in time ;) > > > -- > James Morris > Thank you! /Jarkko

Re: [tpmdd-devel] [GIT PULL] tpmdd fixes for Linux 4.11

2017-02-21 Thread James Morris
On Mon, 20 Feb 2017, Jarkko Sakkinen wrote: > Hi > > Some small scoped but needed fixes for the release. > Pulled, just in time ;) -- James Morris -- Check out the vibrant tech community on one