Re: [PATCH 2/2 v2] tpm_tis: override durations for STM tpm with firmware 1.2.8.28

2019-08-29 Thread Jerry Snitselaar
On Thu Aug 29 19, Jarkko Sakkinen wrote: On Tue, Aug 27, 2019 at 05:46:21PM -0700, Jerry Snitselaar wrote: There was revealed a bug in the STM TPM chipset used in Dell R415s. Bug is observed so far only on chipset firmware 1.2.8.28 (1.2 TPM, device-id 0x0, rev-id 78). After some number

Re: [PATCH 2/2 v2] tpm_tis: override durations for STM tpm with firmware 1.2.8.28

2019-08-29 Thread Jerry Snitselaar
On Thu Aug 29 19, Jarkko Sakkinen wrote: On Thu, Aug 29, 2019 at 05:40:40PM +0300, Jarkko Sakkinen wrote: On Tue, Aug 27, 2019 at 05:46:21PM -0700, Jerry Snitselaar wrote: > There was revealed a bug in the STM TPM chipset used in Dell R415s. > Bug is observed so far only on chipset fi

[PATCH 1/2 v2] tpm: provide a way to override the chip returned durations

2019-08-27 Thread Jerry Snitselaar
Patch adds method ->update_durations to override returned durations in case TPM chip misbehaves for TPM 1.2 drivers. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Signed-off-by: Alexey Klimov Signed-off-by: Jerry Snitselaar --- v2: newline cleanup as requested by Jarkko driv

[PATCH 0/2 v2] tpm: add update_durations class op to allow override of chip supplied values

2019-08-27 Thread Jerry Snitselaar
We've run into a case where a customer has an STM TPM 1.2 chip (version 1.2.8.28) that is getting into an inconsistent state and they end up getting tpm transmit errors. In really old tpm code this wasn't seen because the code that grabbed the duration values from the chip could fail silently,

[PATCH 2/2 v2] tpm_tis: override durations for STM tpm with firmware 1.2.8.28

2019-08-27 Thread Jerry Snitselaar
implementation of ->update_durations method that matches only STM devices with specific firmware version. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Signed-off-by: Alexey Klimov Signed-off-by: Jerry Snitselaar --- v2: Make suggested changes from Jarkko - change struct field n

Re: [PATCH] MAINTAINERS: add linux-security-module mailing list to TPM drivers

2019-02-20 Thread Jerry Snitselaar
On Thu Feb 21 19, James Morris wrote: On Wed, 20 Feb 2019, Jarkko Sakkinen wrote: > being cc'd to linux-security-module? Looking back at > recent patches, it looked like it was a general request. > If it is, I'll be more likely to remember if get_maintainers.pl > brings it up. :) I'm all open

Re: [PATCH] MAINTAINERS: add linux-security-module mailing list to TPM drivers

2019-02-20 Thread Jerry Snitselaar
On Wed Feb 20 19, Jarkko Sakkinen wrote: On Tue, Feb 19, 2019 at 08:58:46PM -0700, Jerry Snitselaar wrote: I've seen requests to add linux-security-module to tpm patch submissions a couple of times recently, so just add the list to MAINTAINERS so get_maintainers.pl will mention it. Cc: Peter

[PATCH] MAINTAINERS: add linux-security-module mailing list to TPM drivers

2019-02-19 Thread Jerry Snitselaar
I've seen requests to add linux-security-module to tpm patch submissions a couple of times recently, so just add the list to MAINTAINERS so get_maintainers.pl will mention it. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Signed-off-by: Jerry Snitselaar --- MAINTAINERS | 1 + 1

Re: [PATCH v4 0/2] tpm: Unify send() callbacks

2019-02-09 Thread Jerry Snitselaar
+- drivers/char/tpm/tpm_nsc.c | 2 +- drivers/char/tpm/tpm_tis_core.c | 2 +- drivers/char/tpm/tpm_vtpm_proxy.c| 3 +-- drivers/char/tpm/xen-tpmfront.c | 2 +- 11 files changed, 22 insertions(+), 15 deletions(-) -- 2.19.1 Reviewed-by: Jerry Snitselaar

Re: [PATCH v4 1/2] tpm: Unify the send callback behaviour

2019-02-09 Thread Jerry Snitselaar
On Sat, Feb 9, 2019 at 11:20 AM Jerry Snitselaar wrote: > > On Fri Feb 08 19, Jarkko Sakkinen wrote: > >The send() callback should never return length as it does not in every > >driver except tpm_crb in the success case. The reason is that the main > >transmit functi

Re: [PATCH v4 1/2] tpm: Unify the send callback behaviour

2019-02-09 Thread Jerry Snitselaar
On Fri Feb 08 19, Jarkko Sakkinen wrote: The send() callback should never return length as it does not in every driver except tpm_crb in the success case. The reason is that the main transmit functionality only cares about whether the transmit was successful or not and ignores the count

Re: [PATCH v11 15/16] tpm: take TPM chip power gating out of tpm_transmit()

2019-02-07 Thread Jerry Snitselaar
is that in tpm_vtpm_proxy a locality change requires a virtual TPM command (a command made up just for that driver). The consequence of this is that this commit removes the remaining nested calls. Signed-off-by: Jarkko Sakkinen Reviewed-by: Stefan Berger Tested-by: Stefan Berger Reviewed-by: Jerry

Re: [PATCH v2] tpm/tpm_crb: Avoid unaligned reads in crb_recv()

2019-02-07 Thread Jerry Snitselaar
On Thu Feb 07 19, Sasha Levin wrote: Hi, [This is an automated email] This commit has been processed because it contains a "Fixes:" tag, fixing commit: 30fc8d138e91 tpm: TPM 2.0 CRB Interface. The bot has tested the following trees: v4.20.6, v4.19.19, v4.14.97, v4.9.154, v4.4.172. v4.20.6:

Re: [PATCH] tpm/tpm_crb: Avoid unaligned reads in crb_recv():

2019-02-01 Thread Jerry Snitselaar
...@vger.kernel.org Cc: Linus Torvalds Cc: James Morris Cc: Tomas Winkler Cc: Jerry Snitselaar Fixes: 30fc8d138e91 ("tpm: TPM 2.0 CRB Interface") Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm_crb.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/char/tpm

Re: Getting weird TPM error after rebasing my tree to security/next-general

2019-01-31 Thread Jerry Snitselaar
On Thu Jan 31 19, Linus Torvalds wrote: On Thu, Jan 31, 2019 at 12:47 PM Jarkko Sakkinen wrote: I'll try it first thing when I wake up tomorrow (11PM in Finland ATM). Thanks. Appreciate for taking time on this. Hey, it was my commit that broke it for you. Even if it happened to work

[PATCH 1/2] tpm: don't return bool from update_timeouts

2019-01-30 Thread Jerry Snitselaar
Set tpm_chip->timeouts_adjusted directly in the update_timeouts code instead of returning bool. In case of tpm read failing print warning that the read failed and continue on. Reviewed-by: Jarkko Sakkinen Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm1-cmd.c | 3 +-- driv

[PATCH 2/2] tpm: don't print error message in tpm_transmit_cmd when tpm still testing

2019-01-30 Thread Jerry Snitselaar
if TPM2_RC_TESTING is the return code. Reviewed-by: Jarkko Sakkinen Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index d9439f9abe78..6339a2e289ae

[PATCH 1/2] tpm: don't return bool from update_timeouts

2019-01-30 Thread Jerry Snitselaar
Set tpm_chip->timeouts_adjusted directly in the update_timeouts code instead of returning bool. In case of tpm read failing print warning that the read failed and continue on. Reviewed-by: Jarkko Sakkinen Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm1-cmd.c | 3 +-- driv

[PATCH 2/2] tpm: don't print error message in tpm_transmit_cmd when tpm still testing

2019-01-30 Thread Jerry Snitselaar
if TPM2_RC_TESTING is the return code. Reviewed-by: Jarkko Sakkinen Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index d9439f9abe78..6339a2e289ae

[PATCH] tpm: don't print error message in tpm_transmit_cmd when tpm still testing

2019-01-29 Thread Jerry Snitselaar
if TPM2_RC_TESTING is the return code. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index

[PATCH] iommu/amd: print reason for iommu_map_page failure in map_sg

2019-01-28 Thread Jerry Snitselaar
Since there are multiple possible failures in iommu_map_page it would be useful to know which case is being hit when the error message is printed in map_sg. While here, fix up checkpatch complaint about using function name in a string instead of __func__. Cc: Joerg Roedel Signed-off-by: Jerry

[PATCH] iommu/amd: unmap all mapped pages in error path of map_sg

2019-01-19 Thread Jerry Snitselaar
page. Fix the condition, so it breaks out of the loop only after all the mapped pages have been unmapped. Fixes: 80187fd39dcb ("iommu/amd: Optimize map_sg and unmap_sg") Cc: Joerg Roedel Signed-off-by: Jerry Snitselaar --- drivers/iommu/amd_iommu.c | 2 +- 1 file changed, 1 insertion(+),

Re: [PATCH] iommu: amd: call free_iova_fast with pfn in map_sg

2019-01-19 Thread Jerry Snitselaar
On Thu Jan 17 19, Jerry Snitselaar wrote: In the error path of map_sg, free_iova_fast is being called with address instead of the pfn. This results in a bad value getting into the rcache, and can result in hitting a BUG_ON when iova_magazine_free_pfns is called. Cc: Joerg Roedel Cc: Suravee

Question about out_unmap section of map_sg in amd_iommu.c

2019-01-18 Thread Jerry Snitselaar
out_unmap: pr_err("%s: IOMMU mapping error in map_sg (io-pages: %d)\n", dev_name(dev), npages); for_each_sg(sglist, s, nelems, i) { int j, pages = iommu_num_pages(sg_phys(s), s->length, PAGE_SIZE); for (j = 0; j < pages;

[PATCH] iommu: amd: call free_iova_fast with pfn in map_sg

2019-01-17 Thread Jerry Snitselaar
In the error path of map_sg, free_iova_fast is being called with address instead of the pfn. This results in a bad value getting into the rcache, and can result in hitting a BUG_ON when iova_magazine_free_pfns is called. Cc: Joerg Roedel Cc: Suravee Suthikulpanit Signed-off-by: Jerry Snitselaar

Re: [PATCH] docs: Extend trusted keys documentation for TPM 2.0

2018-11-06 Thread Jerry Snitselaar
On Fri Oct 19 18, Stefan Berger wrote: Extend the documentation for trusted keys with documentation for how to set up a key for a TPM 2.0 so it can be used with a TPM 2.0 as well. Signed-off-by: Stefan Berger Reviewed-by: Mimi Zohar Acked-by: Jerry Snitselaar --- .../security/keys

Re: [PATCH] docs: Extend trusted keys documentation for TPM 2.0

2018-11-06 Thread Jerry Snitselaar
On Fri Oct 19 18, Stefan Berger wrote: Extend the documentation for trusted keys with documentation for how to set up a key for a TPM 2.0 so it can be used with a TPM 2.0 as well. Signed-off-by: Stefan Berger Reviewed-by: Mimi Zohar Acked-by: Jerry Snitselaar --- .../security/keys

Re: [PATCH] docs: Extend trusted keys documentation for TPM 2.0

2018-11-06 Thread Jerry Snitselaar
On Mon Nov 05 18, Jerry Snitselaar wrote: On Fri Oct 19 18, Stefan Berger wrote: Extend the documentation for trusted keys with documentation for how to set up a key for a TPM 2.0 so it can be used with a TPM 2.0 as well. Signed-off-by: Stefan Berger Reviewed-by: Mimi Zohar --- .../security

Re: [PATCH] docs: Extend trusted keys documentation for TPM 2.0

2018-11-06 Thread Jerry Snitselaar
On Mon Nov 05 18, Jerry Snitselaar wrote: On Fri Oct 19 18, Stefan Berger wrote: Extend the documentation for trusted keys with documentation for how to set up a key for a TPM 2.0 so it can be used with a TPM 2.0 as well. Signed-off-by: Stefan Berger Reviewed-by: Mimi Zohar --- .../security

Re: [PATCH] docs: Extend trusted keys documentation for TPM 2.0

2018-11-05 Thread Jerry Snitselaar
On Fri Oct 19 18, Stefan Berger wrote: Extend the documentation for trusted keys with documentation for how to set up a key for a TPM 2.0 so it can be used with a TPM 2.0 as well. Signed-off-by: Stefan Berger Reviewed-by: Mimi Zohar --- .../security/keys/trusted-encrypted.rst | 31

Re: [PATCH] docs: Extend trusted keys documentation for TPM 2.0

2018-11-05 Thread Jerry Snitselaar
On Fri Oct 19 18, Stefan Berger wrote: Extend the documentation for trusted keys with documentation for how to set up a key for a TPM 2.0 so it can be used with a TPM 2.0 as well. Signed-off-by: Stefan Berger Reviewed-by: Mimi Zohar --- .../security/keys/trusted-encrypted.rst | 31

Re: [PATCH] tpm_tis: verify locality released before returning from release_locality

2018-05-28 Thread Jerry Snitselaar
ease as we are already late in the cycle? Kind regards, Laurent Bigonville It should go into his branch during the merge window for 4.18. Le 11/05/18 à 21:02, Laurent Bigonville a écrit : Le 05/05/18 à 22:03, Jerry Snitselaar a écrit : On Sat May 05 18, Jerry Snitselaar wrote: For certain

Re: [PATCH] tpm_tis: verify locality released before returning from release_locality

2018-05-28 Thread Jerry Snitselaar
ease as we are already late in the cycle? Kind regards, Laurent Bigonville It should go into his branch during the merge window for 4.18. Le 11/05/18 à 21:02, Laurent Bigonville a écrit : Le 05/05/18 à 22:03, Jerry Snitselaar a écrit : On Sat May 05 18, Jerry Snitselaar wrote: For certain

Re: [PATCH v4 1/4] tpm: migrate tpm2_shutdown() to use struct tpm_buf

2018-05-27 Thread Jerry Snitselaar
On Wed May 23 18, Jarkko Sakkinen wrote: On Fri, May 18, 2018 at 03:30:32PM -0700, Jerry Snitselaar wrote: On Mon Mar 26 18, Jarkko Sakkinen wrote: > In order to make struct tpm_buf the first class object for constructing TPM > commands, migrate tpm2_shutdown() to use it. In addition, r

Re: [PATCH v4 1/4] tpm: migrate tpm2_shutdown() to use struct tpm_buf

2018-05-27 Thread Jerry Snitselaar
On Wed May 23 18, Jarkko Sakkinen wrote: On Fri, May 18, 2018 at 03:30:32PM -0700, Jerry Snitselaar wrote: On Mon Mar 26 18, Jarkko Sakkinen wrote: > In order to make struct tpm_buf the first class object for constructing TPM > commands, migrate tpm2_shutdown() to use it. In addition, r

Re: [PATCH v4 3/4] tpm: migrate tpm2_get_tpm_pt() to use struct tpm_buf

2018-05-18 Thread Jerry Snitselaar
On Mon Mar 26 18, Jarkko Sakkinen wrote: In order to make struct tpm_buf the first class object for constructing TPM commands, migrate tpm2_get_tpm_pt() to use it. Signed-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Reviewed-by: Jerry Snitselaar <jsnit...@r

Re: [PATCH v4 3/4] tpm: migrate tpm2_get_tpm_pt() to use struct tpm_buf

2018-05-18 Thread Jerry Snitselaar
On Mon Mar 26 18, Jarkko Sakkinen wrote: In order to make struct tpm_buf the first class object for constructing TPM commands, migrate tpm2_get_tpm_pt() to use it. Signed-off-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar --- drivers/char/tpm/tpm2-cmd.c | 63

Re: [PATCH v4 2/4] tpm: migrate tpm2_probe() to use struct tpm_buf

2018-05-18 Thread Jerry Snitselaar
On Mon Mar 26 18, Jarkko Sakkinen wrote: In order to make struct tpm_buf the first class object for constructing TPM commands, migrate tpm2_probe() to use it. Signed-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Acked-by: Jay Freyensee <why2jjj.li...@gmail.com> Review

Re: [PATCH v4 2/4] tpm: migrate tpm2_probe() to use struct tpm_buf

2018-05-18 Thread Jerry Snitselaar
On Mon Mar 26 18, Jarkko Sakkinen wrote: In order to make struct tpm_buf the first class object for constructing TPM commands, migrate tpm2_probe() to use it. Signed-off-by: Jarkko Sakkinen Acked-by: Jay Freyensee Reviewed-by: Jerry Snitselaar --- drivers/char/tpm/tpm2-cmd.c | 37

Re: [PATCH v4 1/4] tpm: migrate tpm2_shutdown() to use struct tpm_buf

2018-05-18 Thread Jerry Snitselaar
-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Reviewed-by: Jerry Snitselaar <jsnit...@redhat.com> --- drivers/char/tpm/tpm2-cmd.c | 44 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/drivers/char/tpm/tpm2-cmd

Re: [PATCH v4 1/4] tpm: migrate tpm2_shutdown() to use struct tpm_buf

2018-05-18 Thread Jerry Snitselaar
-off-by: Jarkko Sakkinen Reviewed-by: Jerry Snitselaar --- drivers/char/tpm/tpm2-cmd.c | 44 1 file changed, 12 insertions(+), 32 deletions(-) diff --git a/drivers/char/tpm/tpm2-cmd.c b/drivers/char/tpm/tpm2-cmd.c index 96c77c8e7f40..7665661d9230

Re: [PATCH v4 05/22] iommu: introduce iommu invalidate API function

2018-05-05 Thread Jerry Snitselaar
On Mon Apr 16 18, Jacob Pan wrote: From: "Liu, Yi L" When an SVM capable device is assigned to a guest, the first level page tables are owned by the guest and the guest PASID table pointer is linked to the device context entry of the physical IOMMU. Host IOMMU driver

Re: [PATCH v4 05/22] iommu: introduce iommu invalidate API function

2018-05-05 Thread Jerry Snitselaar
On Mon Apr 16 18, Jacob Pan wrote: From: "Liu, Yi L" When an SVM capable device is assigned to a guest, the first level page tables are owned by the guest and the guest PASID table pointer is linked to the device context entry of the physical IOMMU. Host IOMMU driver has no knowledge of

Re: [PATCH] tpm_tis: verify locality released before returning from release_locality

2018-05-05 Thread Jerry Snitselaar
On Sat May 05 18, Jerry Snitselaar wrote: For certain tpm chips releasing locality can take long enough that a subsequent call to request_locality will see the locality as being active when the access register is read in check_locality. So check that the locality has been released before

Re: [PATCH] tpm_tis: verify locality released before returning from release_locality

2018-05-05 Thread Jerry Snitselaar
On Sat May 05 18, Jerry Snitselaar wrote: For certain tpm chips releasing locality can take long enough that a subsequent call to request_locality will see the locality as being active when the access register is read in check_locality. So check that the locality has been released before

[PATCH] tpm_tis: verify locality released before returning from release_locality

2018-05-05 Thread Jerry Snitselaar
Sakkinen <jarkko.sakki...@linux.intel.com> Cc: Peter Huewe <peterhu...@gmx.de> Cc: Jason Gunthorpe <j...@ziepe.ca> Reported-by: Laurent Bigonville <bi...@debian.org> Signed-off-by: Jerry Snitselaar <jsnit...@redhat.com> --- drivers/char/tpm/tpm_tis_core.c | 47 ++

[PATCH] tpm_tis: verify locality released before returning from release_locality

2018-05-05 Thread Jerry Snitselaar
Sakkinen Cc: Peter Huewe Cc: Jason Gunthorpe Reported-by: Laurent Bigonville Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm_tis_core.c | 47 - 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers

[PATCH] iommu/vt-d: clean up pr_irq if request_threaded_irq fails

2017-12-06 Thread Jerry Snitselaar
a7 81 31 c0 e8 4c 37 fa ff <0f> ff 48 8b 34 24 4c 89 ef e 8 0e 4c 68 00 49 8b 46 40 48 8b 80 [0.669688] ---[ end trace 58a470248700f2fc ]--- Cc: Alex Williamson <alex.william...@redhat.com> Cc: Joerg Roedel <j...@8bytes.org> Cc: Ashok Raj <ashok....@intel.com> Si

[PATCH] iommu/vt-d: clean up pr_irq if request_threaded_irq fails

2017-12-06 Thread Jerry Snitselaar
a7 81 31 c0 e8 4c 37 fa ff <0f> ff 48 8b 34 24 4c 89 ef e 8 0e 4c 68 00 49 8b 46 40 48 8b 80 [0.669688] ---[ end trace 58a470248700f2fc ]--- Cc: Alex Williamson Cc: Joerg Roedel Cc: Ashok Raj Signed-off-by: Jerry Snitselaar --- drivers/iommu/intel-svm.c | 9 ++--- 1 file cha

Re: [PATCH] usb: Don't print a warning if interface driver rebind is deferred at resume

2017-12-04 Thread Jerry Snitselaar
vice probe will eventually take place later. [one-liner by Jerry Snitselaar posted in a mailing list question -Mathias] Suggested-by: Jerry Snitselaar <jsnit...@redhat.com> Signed-off-by: Mathias Nyman <mathias.ny...@linux.intel.com> --- drivers/usb/core/driver.c | 2 +- 1 file chan

Re: [PATCH] usb: Don't print a warning if interface driver rebind is deferred at resume

2017-12-04 Thread Jerry Snitselaar
vice probe will eventually take place later. [one-liner by Jerry Snitselaar posted in a mailing list question -Mathias] Suggested-by: Jerry Snitselaar Signed-off-by: Mathias Nyman --- drivers/usb/core/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/core/

question about usb_rebind_intf

2017-11-17 Thread Jerry Snitselaar
Should this skip warning that the rebind failed if device_attach is returning -EPROBE_DEFER? If I do something like 'rtcwake -m mem -s 30' on a laptop I have here I will see a couple "rebind failed: -517" messages as it comes back out of suspend. Since the device probe eventually happens once

question about usb_rebind_intf

2017-11-17 Thread Jerry Snitselaar
Should this skip warning that the rebind failed if device_attach is returning -EPROBE_DEFER? If I do something like 'rtcwake -m mem -s 30' on a laptop I have here I will see a couple "rebind failed: -517" messages as it comes back out of suspend. Since the device probe eventually happens once

Re: Fixing CVE-2017-15361

2017-10-25 Thread Jerry Snitselaar
On Wed Oct 25 17, Jarkko Sakkinen wrote: On Wed, Oct 25, 2017 at 07:17:17AM -0700, Matthew Garrett wrote: On Wed, Oct 25, 2017 at 6:44 AM, Jarkko Sakkinen wrote: > I'm implementing a fix for CVE-2017-15361 that simply blacklists > vulnerable FW versions. I

Re: Fixing CVE-2017-15361

2017-10-25 Thread Jerry Snitselaar
On Wed Oct 25 17, Jarkko Sakkinen wrote: On Wed, Oct 25, 2017 at 07:17:17AM -0700, Matthew Garrett wrote: On Wed, Oct 25, 2017 at 6:44 AM, Jarkko Sakkinen wrote: > I'm implementing a fix for CVE-2017-15361 that simply blacklists > vulnerable FW versions. I think this is the only responsible

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jerry Snitselaar
On Wed Oct 18 17, SF Markus Elfring wrote: For 1/4 and 2/4: explain why the message can be omitted. Why did you not reply directly with this request for the update steps with the subject “Delete an error message for a failed memory allocation in tpm_…()”?

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Jerry Snitselaar
On Wed Oct 18 17, SF Markus Elfring wrote: For 1/4 and 2/4: explain why the message can be omitted. Why did you not reply directly with this request for the update steps with the subject “Delete an error message for a failed memory allocation in tpm_…()”?

[PATCH] iommu/vt-d: only attempt to cleanup svm page request irq if one assigned

2017-10-05 Thread Jerry Snitselaar
Only try to clean up the svm page request irq if one has been assigned. Also clear pr_irq in the error path if irq request fails. Signed-off-by: Jerry Snitselaar <jsnit...@redhat.com> --- drivers/iommu/intel-svm.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff

[PATCH] iommu/vt-d: only attempt to cleanup svm page request irq if one assigned

2017-10-05 Thread Jerry Snitselaar
Only try to clean up the svm page request irq if one has been assigned. Also clear pr_irq in the error path if irq request fails. Signed-off-by: Jerry Snitselaar --- drivers/iommu/intel-svm.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/intel-svm.c

Re: [PATCH] tpm: print tpm error code in hex for TPM2.0 devices

2017-04-28 Thread Jerry Snitselaar
On Fri Apr 28 17, Jarkko Sakkinen wrote: On Wed, Apr 26, 2017 at 03:39:54PM -0700, Jerry Snitselaar wrote: For easier decoding, output the error code returned from the tpm device in hex when the device is TPM2.0. Cc: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Cc: Peter Huewe &l

Re: [PATCH] tpm: print tpm error code in hex for TPM2.0 devices

2017-04-28 Thread Jerry Snitselaar
On Fri Apr 28 17, Jarkko Sakkinen wrote: On Wed, Apr 26, 2017 at 03:39:54PM -0700, Jerry Snitselaar wrote: For easier decoding, output the error code returned from the tpm device in hex when the device is TPM2.0. Cc: Jarkko Sakkinen Cc: Peter Huewe Cc: Marcel Selhorst Cc: Jason Gunthorpe

[PATCH] tpm: print tpm error code in hex for TPM2.0 devices

2017-04-26 Thread Jerry Snitselaar
@obsidianresearch.com> Reported-by: Ken Goldman <kgold...@us.ibm.com> Signed-off-by: Jerry Snitselaar <jsnit...@redhat.com> --- drivers/char/tpm/tpm-interface.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tp

[PATCH] tpm: print tpm error code in hex for TPM2.0 devices

2017-04-26 Thread Jerry Snitselaar
For easier decoding, output the error code returned from the tpm device in hex when the device is TPM2.0. Cc: Jarkko Sakkinen Cc: Peter Huewe Cc: Marcel Selhorst Cc: Jason Gunthorpe Reported-by: Ken Goldman Signed-off-by: Jerry Snitselaar --- drivers/char/tpm/tpm-interface.c | 11

[PATCH v2] tpm_tis: convert to using locality callbacks

2017-03-27 Thread Jerry Snitselaar
rpe <jguntho...@obsidianresearch.com> Cc: Marcel Selhorst <tp...@selhorst.net> Signed-off-by: Jerry Snitselaar <jsnit...@redhat.com> --- v2: drop release_locality call in tpm_tis_remove drivers/char/tpm/tpm_tis_core.c | 34 -- 1 file changed, 8 insert

[PATCH v2] tpm_tis: convert to using locality callbacks

2017-03-27 Thread Jerry Snitselaar
request_locality prior to tpm_tis_send_data calls. Also drop release_locality call in middleof probe_itpm, and keep locality until release_locality called at end of probe_itpm. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Marcel Selhorst Signed-off-by: Jerry Snitselaar --- v2

Re: [PATCH v4] tpm_crb: request and relinquish locality 0

2017-03-26 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-26 19:51 GMT: > WTF, I applied old patch version by mistake. Sorry about that and > thanks for spotting that out. Better? > > /Jarkko Looks good now.

Re: [PATCH v4] tpm_crb: request and relinquish locality 0

2017-03-26 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-26 19:51 GMT: > WTF, I applied old patch version by mistake. Sorry about that and > thanks for spotting that out. Better? > > /Jarkko Looks good now.

Re: [RFC PATCH 1/1] tpm_tis: convert to using locality callbacks

2017-03-26 Thread Jerry Snitselaar
- Original Message - > From: "Jason Gunthorpe" <jguntho...@obsidianresearch.com> > To: "Jerry Snitselaar" <jsnit...@redhat.com> > Cc: tpmdd-de...@lists.sourceforge.net, linux-kernel@vger.kernel.org, "Peter > Huewe"

Re: [RFC PATCH 1/1] tpm_tis: convert to using locality callbacks

2017-03-26 Thread Jerry Snitselaar
- Original Message - > From: "Jason Gunthorpe" > To: "Jerry Snitselaar" > Cc: tpmdd-de...@lists.sourceforge.net, linux-kernel@vger.kernel.org, "Peter > Huewe" , "Jarkko > Sakkinen" , "Marcel Selhorst" > > Sent: S

Re: [PATCH v4] tpm_crb: request and relinquish locality 0

2017-03-26 Thread Jerry Snitselaar
- Original Message - > From: "Jarkko Sakkinen" <jarkko.sakki...@linux.intel.com> > To: "Jerry Snitselaar" <jsnit...@redhat.com>, "gang wei" <gang@intel.com> > Cc: "Jarkko Sakkinen" <jarkko.sakki...@iki.fi>, >

Re: [PATCH v4] tpm_crb: request and relinquish locality 0

2017-03-26 Thread Jerry Snitselaar
- Original Message - > From: "Jarkko Sakkinen" > To: "Jerry Snitselaar" , "gang wei" > Cc: "Jarkko Sakkinen" , > tpmdd-de...@lists.sourceforge.net, > linux-security-mod...@vger.kernel.org, "Peter Huewe" , > &quo

[RFC PATCH 0/1] tpm_tis: convert to use locality callbacks

2017-03-25 Thread Jerry Snitselaar
This is an attempt to convert tpm_tis over to using the locality callbacks added by Jarkko's tpm_crb patch. Requires the patch currently on tpmdd/locality which has moved the need_locality assignment inside the mutex in tpm_transmit. This is pretty much the same as Jarkko's earlier patch (I

[RFC PATCH 0/1] tpm_tis: convert to use locality callbacks

2017-03-25 Thread Jerry Snitselaar
This is an attempt to convert tpm_tis over to using the locality callbacks added by Jarkko's tpm_crb patch. Requires the patch currently on tpmdd/locality which has moved the need_locality assignment inside the mutex in tpm_transmit. This is pretty much the same as Jarkko's earlier patch (I

[RFC PATCH 1/1] tpm_tis: convert to using locality callbacks

2017-03-25 Thread Jerry Snitselaar
rpe <jguntho...@obsidianresearch.com> Cc: Marcel Selhorst <tp...@selhorst.net> Signed-off-by: Jerry Snitselaar <jsnit...@redhat.com> --- drivers/char/tpm/tpm_tis_core.c | 35 +-- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/dri

[RFC PATCH 1/1] tpm_tis: convert to using locality callbacks

2017-03-25 Thread Jerry Snitselaar
request_locality prior to tpm_tis_send_data calls. Also drop release_locality call in middleof probe_itpm, and keep locality until release_locality called at end of probe_itpm. Cc: Peter Huewe Cc: Jarkko Sakkinen Cc: Jason Gunthorpe Cc: Marcel Selhorst Signed-off-by: Jerry Snitselaar

Re: [PATCH v4] tpm_crb: request and relinquish locality 0

2017-03-25 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-24 10:19 GMT: > On Fri, Mar 24, 2017 at 12:10:30PM +0200, Jarkko Sakkinen wrote: >> This commit adds support for requesting and relinquishing locality 0 in >> tpm_crb for the course of command transmission. >> >> In order to achieve this, two new callbacks are added to

Re: [PATCH v4] tpm_crb: request and relinquish locality 0

2017-03-25 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-24 10:19 GMT: > On Fri, Mar 24, 2017 at 12:10:30PM +0200, Jarkko Sakkinen wrote: >> This commit adds support for requesting and relinquishing locality 0 in >> tpm_crb for the course of command transmission. >> >> In order to achieve this, two new callbacks are added to

Re: [PATCH v4] tpm_crb: request and relinquish locality 0

2017-03-24 Thread Jerry Snitselaar
ned-off-by: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Reviewed-by: Jerry Snitselaar <jsnit...@redhat.com> Tested-by: Jerry Snitselaar <jsnit...@redhat.com> Tested on kabylake system that was hitting issues with earlier iteration. Still don't have platform to test it dealing with multi-locality enviroment.

Re: [PATCH v4] tpm_crb: request and relinquish locality 0

2017-03-24 Thread Jerry Snitselaar
sure that the driver > will work properly with Intel TXT that uses locality 2. There's no > explicit guarantee that it would relinquish this locality. In more > general sense this commit enables tpm_crb to be a well behaving > citizen in a multi locality environment. > > Signed-off

[PATCH] tpm: make check_locality return bool

2017-03-18 Thread Jerry Snitselaar
c: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> Cc: Peter Huewe <peterhu...@gmx.de> Signed-off-by: Jerry Snitselaar <jsnit...@redhat.com> --- Tested tpm_tis, but don't have the ability to test Infineon or STMicro drivers. drivers/char/tpm/st33zp24/st33zp24.c | 12 ++-- drive

[PATCH] tpm: make check_locality return bool

2017-03-18 Thread Jerry Snitselaar
Since check_locality is checking to see if a certain locality is active, return true if active otherwise return false. Cc: Christophe Ricard Cc: Jason Gunthorpe Cc: Marcel Selhorst Cc: Jarkko Sakkinen Cc: Peter Huewe Signed-off-by: Jerry Snitselaar --- Tested tpm_tis, but don't have

Re: [PATCH v3] tpm_crb: request and relinquish locality 0

2017-03-17 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-16 11:55 GMT: > On Wed, Mar 15, 2017 at 08:27:54PM -0700, Jerry Snitselaar wrote: >> >> Jerry Snitselaar @ 2017-03-16 02:38 GMT: >> >> > Jarkko Sakkinen @ 2017-03-15 05:57 GMT: >> > >> >> From: Jarkko Sakkinen <ja

Re: [PATCH v3] tpm_crb: request and relinquish locality 0

2017-03-17 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-16 11:55 GMT: > On Wed, Mar 15, 2017 at 08:27:54PM -0700, Jerry Snitselaar wrote: >> >> Jerry Snitselaar @ 2017-03-16 02:38 GMT: >> >> > Jarkko Sakkinen @ 2017-03-15 05:57 GMT: >> > >> >> From: Jarkko Sakkinen

Re: [PATCH v3] tpm_crb: request and relinquish locality 0

2017-03-15 Thread Jerry Snitselaar
Jerry Snitselaar @ 2017-03-16 02:38 GMT: > Jarkko Sakkinen @ 2017-03-15 05:57 GMT: > >> From: Jarkko Sakkinen <jarkko.sakki...@linux.intel.com> >> >> This commit adds support for requesting and relinquishing locality 0 in >> tpm_crb for the course of

Re: [PATCH v3] tpm_crb: request and relinquish locality 0

2017-03-15 Thread Jerry Snitselaar
Jerry Snitselaar @ 2017-03-16 02:38 GMT: > Jarkko Sakkinen @ 2017-03-15 05:57 GMT: > >> From: Jarkko Sakkinen >> >> This commit adds support for requesting and relinquishing locality 0 in >> tpm_crb for the course of command transmission. >> >> I

Re: [PATCH v3] tpm_crb: request and relinquish locality 0

2017-03-15 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-15 05:57 GMT: > From: Jarkko Sakkinen > > This commit adds support for requesting and relinquishing locality 0 in > tpm_crb for the course of command transmission. > > In order to achieve this, two new callbacks are added to struct >

Re: [PATCH v3] tpm_crb: request and relinquish locality 0

2017-03-15 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-15 05:57 GMT: > From: Jarkko Sakkinen > > This commit adds support for requesting and relinquishing locality 0 in > tpm_crb for the course of command transmission. > > In order to achieve this, two new callbacks are added to struct > tpm_class_ops: > > -

Re: [PATCH v2] tpm_crb: request and relinquish locality 0

2017-03-12 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-11 13:02 GMT: > Added two new callbacks to struct tpm_class_ops: > > - request_locality > - relinquish_locality > > These are called before sending and receiving data from the TPM. We > update also tpm_tis_core to use these callbacks. Small modification to >

Re: [PATCH v2] tpm_crb: request and relinquish locality 0

2017-03-12 Thread Jerry Snitselaar
Jarkko Sakkinen @ 2017-03-11 13:02 GMT: > Added two new callbacks to struct tpm_class_ops: > > - request_locality > - relinquish_locality > > These are called before sending and receiving data from the TPM. We > update also tpm_tis_core to use these callbacks. Small modification to >

[PATCH] tpm_crb: check for bad response size

2017-03-10 Thread Jerry Snitselaar
Make sure size of response buffer is at least 6 bytes, or we will underflow and pass large size_t to memcpy_fromio(). This was encountered while testing earlier version of locality patchset. Fixes: 30fc8d138e912 ("tpm: TPM 2.0 CRB Interface") Signed-off-by: Jerry Snitselaar <jsnit.

[PATCH] tpm_crb: check for bad response size

2017-03-10 Thread Jerry Snitselaar
Make sure size of response buffer is at least 6 bytes, or we will underflow and pass large size_t to memcpy_fromio(). This was encountered while testing earlier version of locality patchset. Fixes: 30fc8d138e912 ("tpm: TPM 2.0 CRB Interface") Signed-off-by: Jerry Snitselaar --- driver

Re: [PATCH v3 0/3] Locality support for tpm_crb

2017-03-03 Thread Jerry Snitselaar
> 1 file changed, 137 insertions(+), 48 deletions(-) Reviewed-by: Jerry Snitselaar <jsnit...@redhat.com>

Re: [PATCH v3 0/3] Locality support for tpm_crb

2017-03-03 Thread Jerry Snitselaar
> 1 file changed, 137 insertions(+), 48 deletions(-) Reviewed-by: Jerry Snitselaar

Re: [PATCH] dma: remove bad_dma_ops to fix build fail

2016-06-12 Thread Jerry Snitselaar
On Sun Jun 12 16, Sudip Mukherjee wrote: m32r allmodconfig is failng with errors like: ERROR: "bad_dma_ops" [sound/soc/bcm/snd-soc-cygnus.ko] undefined! On checking the code it turns out that struct bad_dma_ops has been declared as extern but no one has actually defined struct bad_dma_ops. Lets

Re: [PATCH] dma: remove bad_dma_ops to fix build fail

2016-06-12 Thread Jerry Snitselaar
On Sun Jun 12 16, Sudip Mukherjee wrote: m32r allmodconfig is failng with errors like: ERROR: "bad_dma_ops" [sound/soc/bcm/snd-soc-cygnus.ko] undefined! On checking the code it turns out that struct bad_dma_ops has been declared as extern but no one has actually defined struct bad_dma_ops. Lets

ima and tpm2.0

2016-06-08 Thread Jerry Snitselaar
Should the ima Kconfig have a select line for tpm_crb similar to the tpm_tis and tpm_ibmvtpm bits?

ima and tpm2.0

2016-06-08 Thread Jerry Snitselaar
Should the ima Kconfig have a select line for tpm_crb similar to the tpm_tis and tpm_ibmvtpm bits?

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

2016-02-25 Thread Jerry Snitselaar
On Mon Feb 22 16, Jarkko Sakkinen wrote: On Mon, Feb 22, 2016 at 12:56:53PM +1100, James Morris wrote: On Sat, 20 Feb 2016, Jarkko Sakkinen wrote: > Hi James, > > I'm sorry for the late pull request for 4.5. The reason for this was > the latency in my previous one. I picked with care the

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

2016-02-25 Thread Jerry Snitselaar
On Mon Feb 22 16, Jarkko Sakkinen wrote: On Mon, Feb 22, 2016 at 12:56:53PM +1100, James Morris wrote: On Sat, 20 Feb 2016, Jarkko Sakkinen wrote: > Hi James, > > I'm sorry for the late pull request for 4.5. The reason for this was > the latency in my previous one. I picked with care the

Re: [tpmdd-devel] [PATCH] tpm: remove unneeded include of actbl2.h

2016-01-04 Thread Jerry Snitselaar
On Mon Jan 04 16, Jerry Snitselaar wrote: tpm_tis.c already gets actbl2.h via linux/acpi.h -> acpi/acpi.h -> acpi/actbl.h -> acpi/actbl2.h, so the direct include in tpm_tis.c is not needed. Signed-off-by: Jerry Snitselaar --- Jarrko, this is a trivial thing I noticed while doing

<    1   2   3   >