Re: [tpmdd-devel] [PATCH v4 2/2] Add "shutdown" to "struct class".

2017-06-12 Thread Josh Zimmerman via tpmdd-devel
Hi Jarkko, Were you able to merge my patches? If not can you give me a bit more info about what git repo and branch you're working off of, so I can try to get it to apply to the HEAD of that branch? Thanks, Josh On Mon, Jun 5, 2017 at 11:32 AM, Josh Zimmerman wrote: > I'm not sure where your t

[tpmdd-devel] [PATCH v6 1/2] tpm: Issue a TPM2_Shutdown for TPM2 devices.

2017-06-16 Thread Josh Zimmerman via tpmdd-devel
If a TPM2 loses power without a TPM2_Shutdown command being issued (a "disorderly reboot"), it may lose some state that has yet to be persisted to NVRam, and will increment the DA counter. After the DA counter gets sufficiently large, the TPM will lock the user out. NOTE: This only changes behavio

[tpmdd-devel] [PATCH v6 2/2] Add "shutdown" to "struct class".

2017-06-16 Thread Josh Zimmerman via tpmdd-devel
The TPM class has some common shutdown code that must be executed for all drivers. This adds some needed functionality for that. Signed-off-by: Josh Zimmerman Acked-by: Greg Kroah-Hartman Cc: sta...@vger.kernel.org - v2: Add Signed-off-by. v3: Remove logically separate change. v4: Add "acke

Re: [tpmdd-devel] [PATCH v5 2/2] Add "shutdown" to "struct class".

2017-06-16 Thread Josh Zimmerman via tpmdd-devel
Just re-sent using git send-email; hopefully the must recent version will work. Josh On Fri, Jun 16, 2017 at 2:14 AM, Jarkko Sakkinen wrote: > On Fri, Jun 16, 2017 at 10:57:47AM +0200, Jarkko Sakkinen wrote: >> On Thu, Jun 01, 2017 at 09:33:43AM -0700, Josh Zimmerman wrote: >> > The TPM class ha

Re: [tpmdd-devel] [PATCH v6 1/2] tpm: Issue a TPM2_Shutdown for TPM2 devices.

2017-06-19 Thread Josh Zimmerman via tpmdd-devel
Sorry about the mess. I'm a bit swamped today, but I'll work on cleaning up the patch formatting & commit message and fix the compilation problem later today or tomorrow. (It did build on my checkout of the tpmdd branch... guess I didn't pull in some important change.) Josh On Mon, Jun 19, 2017 a

[tpmdd-devel] [PATCH v7 1/2] Add "shutdown" to "struct class".

2017-06-25 Thread Josh Zimmerman via tpmdd-devel
The TPM class has some common shutdown code that must be executed for all drivers. This adds some needed functionality for that. Signed-off-by: Josh Zimmerman Acked-by: Greg Kroah-Hartman Cc: sta...@vger.kernel.org Fixes: 74d6b3ceaa17 ("tpm: fix suspend/resume paths for TPM 2.0") --- v2: Add Sig

[tpmdd-devel] [PATCH v7 0/2] Run TPM2_Shutdown on system shutdown

2017-06-25 Thread Josh Zimmerman via tpmdd-devel
This patchset causes all devices in the tpm class to issue TPM2_Shutdown when the system is shutting down. As a prerequisite, it adds a "shutdown" method to "struct class". Since this bug can cause users to be locked out of their TPMs, I'd like this patch included in at least 4.4 and 4.9. 4.1 is

[tpmdd-devel] [PATCH v7 2/2] tpm: Issue a TPM2_Shutdown for TPM2 devices.

2017-06-25 Thread Josh Zimmerman via tpmdd-devel
If a TPM2 loses power without a TPM2_Shutdown command being issued (a "disorderly reboot"), it may lose some state that has yet to be persisted to NVRam, and will increment the DA counter. After the DA counter gets sufficiently large, the TPM will lock the user out. NOTE: This only changes behavio

Re: [tpmdd-devel] [PATCH v7 0/2] Run TPM2_Shutdown on system shutdown

2017-06-29 Thread Josh Zimmerman via tpmdd-devel
On Thu, Jun 29, 2017 at 6:28 AM, Jarkko Sakkinen wrote: > On Sun, 2017-06-25 at 14:53 -0700, Josh Zimmerman wrote: >> This patchset causes all devices in the tpm class to issue TPM2_Shutdown >> when the system is shutting down. >> >> As a prerequisite, it adds a "shutdown" method to "struct class"

Re: [tpmdd-devel] [PATCH v7 0/2] Run TPM2_Shutdown on system shutdown

2017-07-10 Thread Josh Zimmerman via tpmdd-devel
Excellent, thanks very much for the reviews and your time! Josh On Thu, Jun 29, 2017 at 12:54 PM, Jarkko Sakkinen wrote: > On Thu, Jun 29, 2017 at 04:28:11PM +0300, Jarkko Sakkinen wrote: >> On Sun, 2017-06-25 at 14:53 -0700, Josh Zimmerman wrote: >> > This patchset causes all devices in the tpm

[tpmdd-devel] [PATCH v1 2/2] tpm: Issue a TPM2_Shutdown for TPM2 devices.

2017-07-12 Thread Josh Zimmerman via tpmdd-devel
Backport of d1bd4a792d3961a04e6154118816b00167aad91a upstream. If a TPM2 loses power without a TPM2_Shutdown command being issued (a "disorderly reboot"), it may lose some state that has yet to be persisted to NVRam, and will increment the DA counter. After the DA counter gets sufficiently large,

[tpmdd-devel] [PATCH v1 0/2] Run TPM2_Shutdown on system shutdown

2017-07-12 Thread Josh Zimmerman via tpmdd-devel
This patchset causes all devices in the tpm class to issue TPM2_Shutdown when the system is shutting down. As a prerequisite, it adds a "shutdown" method to "struct class". Backporting to 4.9 since this bug can lock users out of their TPMs. Backport of f77af1516584 'Add "shutdown" to "struct cla

[tpmdd-devel] [PATCH v1 1/2] Add "shutdown" to "struct class".'

2017-07-12 Thread Josh Zimmerman via tpmdd-devel
Backport of commit f77af15165847406b15d8f70c382c4cb15846b2a upstream. The TPM class has some common shutdown code that must be executed for all drivers. This adds some needed functionality for that. Signed-off-by: Josh Zimmerman --- drivers/base/core.c| 6 +- include/linux/device.h | 2

Re: [tpmdd-devel] [PATCH v1 0/2] Run TPM2_Shutdown on system shutdown

2017-07-12 Thread Josh Zimmerman via tpmdd-devel
On Wed, Jul 12, 2017 at 5:41 PM, Josh Zimmerman wrote: > This patchset causes all devices in the tpm class to issue TPM2_Shutdown > when the system is shutting down. > > As a prerequisite, it adds a "shutdown" method to "struct class". > > Backporting to 4.9 since this bug can lock users out of th

[tpmdd-devel] [PATCH v1 0/2] Run TPM2_Shutdown on system shutdown

2017-07-14 Thread Josh Zimmerman via tpmdd-devel
This is a backport to the 4.4 stable kernel. I had to manually apply a couple of cherry picks and resolve some merge conflicts, so some of this may be worth a closer look and test on Jarkko's or some other TPM maintainer's part This patchset causes all devices in the tpm class to issue TPM2_Shutd

[tpmdd-devel] [PATCH v1 1/4] tpm: Get rid of chip->pdev

2017-07-14 Thread Josh Zimmerman via tpmdd-devel
From: Jason Gunthorpe This is a hold over from before the struct device conversion. - All prints should be using &chip->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 that really do need the

[tpmdd-devel] [PATCH v1 2/4] tpm: Provide strong locking for device removal

2017-07-14 Thread Josh Zimmerman via tpmdd-devel
From: Jason Gunthorpe Add a read/write semaphore around the ops function pointers so ops can be set to null when the driver un-registers. Previously the tpm core expected module locking to be enough to ensure that tpm_unregister could not be called during certain times, however that hasn't been

[tpmdd-devel] [PATCH v1 4/4] tpm: Issue a TPM2_Shutdown for TPM2 devices.

2017-07-14 Thread Josh Zimmerman via tpmdd-devel
Backport of d1bd4a792d3961a04e6154118816b00167aad91a upstream. If a TPM2 loses power without a TPM2_Shutdown command being issued (a "disorderly reboot"), it may lose some state that has yet to be persisted to NVRam, and will increment the DA counter. After the DA counter gets sufficiently large,

[tpmdd-devel] [PATCH v1 3/4] Add "shutdown" to "struct class".'

2017-07-14 Thread Josh Zimmerman via tpmdd-devel
Backport of commit f77af15165847406b15d8f70c382c4cb15846b2a upstream. The TPM class has some common shutdown code that must be executed for all drivers. This adds some needed functionality for that. --- drivers/base/core.c| 6 +- include/linux/device.h | 2 ++ 2 files changed, 7 insertion

Re: [tpmdd-devel] [PATCH v1 4/4] tpm: Issue a TPM2_Shutdown for TPM2 devices.

2017-07-18 Thread Josh Zimmerman via tpmdd-devel
On Tue, Jul 18, 2017 at 8:49 AM, Greg KH wrote: > On Fri, Jul 14, 2017 at 12:58:03PM -0700, Josh Zimmerman wrote: >> Backport of d1bd4a792d3961a04e6154118816b00167aad91a upstream. >> >> If a TPM2 loses power without a TPM2_Shutdown command being issued (a >> "disorderly reboot"), it may lose some

Re: [tpmdd-devel] [PATCH v1 4/4] tpm: Issue a TPM2_Shutdown for TPM2 devices.

2017-07-18 Thread Josh Zimmerman via tpmdd-devel
Hm, strange. I see them in the archives for linux-stable@, but not in my inbox. Perhaps I forgot to Cc myself on those patches. Thanks! Josh On Tue, Jul 18, 2017 at 9:29 AM, Greg KH wrote: > On Tue, Jul 18, 2017 at 09:11:49AM -0700, Josh Zimmerman wrote: >> On Tue, Jul 18, 2017 at 8:49 AM, Greg