[tpmdd-devel] [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

Re: [tpmdd-devel] [PATCH] tpm_crb: request and relinquish locality 0

2017-03-10 Thread Jason Gunthorpe
On Sat, Mar 11, 2017 at 01:58:00AM +0200, Jarkko Sakkinen wrote: > Added two new callbacks to struct tpm_class_ops: > > - request_locality > - relinquish_locality > > These are called before sending and receiving data from the TPM. If we are going to add new ops, I think we should also adjust

[tpmdd-devel] [PATCH] tpm_crb: request and relinquish locality 0

2017-03-10 Thread Jarkko Sakkinen
Added two new callbacks to struct tpm_class_ops: - request_locality - relinquish_locality These are called before sending and receiving data from the TPM. Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm-interface.c | 9 +

Re: [tpmdd-devel] Support for Crypto Agile format in IMA

2017-03-10 Thread Mimi Zohar
On Fri, 2017-03-10 at 17:28 +0100, Roberto Sassu wrote: > On 3/10/2017 4:36 PM, Ken Goldman wrote: > > It's not a TCG standard, just a way of making sure the unused PCR bank > > doesn't remain at zero, permitting forged measurements. > > > > As for the verifier, I ignore the bank I'm not

[tpmdd-devel] [PATCH v1 1/2] tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver

2017-03-10 Thread Nayna Jain
Commit 500462a9de65 "timers: Switch to a non-cascading wheel" replaced the 'classic' timer wheel, which aimed for near 'exact' expiry of the timers. Their analysis was that the vast majority of timeout timers are used as safeguards, not as real timers, and are cancelled or rearmed before

Re: [tpmdd-devel] [PATCH 1/3] ACPICA: Update TPM2 ACPI table

2017-03-10 Thread Jiandi An
On 03/10/17 09:35, Moore, Robert wrote: > This appears to be the latest version on the TCG website: > > *TCG ACPI Specification for Family 1.2 and 2.0, Level 00, Revision 00.37 > December 19, 2014 > > Which is what ACPICA is using. > > Please send me a link to a newer version if you have it. Hi

Re: [tpmdd-devel] [PATCH 2/3] tpm: Add start method for ARM Secure Monitor Call

2017-03-10 Thread Jason Gunthorpe
On Fri, Mar 10, 2017 at 03:58:08AM -0600, Jiandi An wrote: > +/* > + * This is a TPM Command Response Buffer start method that invokes a > + * Secure Monitor Call to requrest the firmware to execute or cancel > + * a TPM 2.0 command. > + */ > +static inline int tpm_crb_smc_start(unsigned long

Re: [tpmdd-devel] Support for Crypto Agile format in IMA

2017-03-10 Thread Roberto Sassu
On 3/10/2017 4:36 PM, Ken Goldman wrote: > It's not a TCG standard, just a way of making sure the unused PCR bank > doesn't remain at zero, permitting forged measurements. > > As for the verifier, I ignore the bank I'm not interested in. I don't > verify the truncated/padded bank.

Re: [tpmdd-devel] Support for Crypto Agile format in IMA

2017-03-10 Thread Ken Goldman
On 3/8/2017 4:58 AM, Roberto Sassu wrote: > > Regarding modifying the digest before it is passed to the extend > function, can truncating/padding with zeros be considered > a standard? If not, verifiers have to look at the software > implementation, in order to find how the digest was modified. >

[tpmdd-devel] [PATCH 3/3] tpm/tpm_crb: Enable TPM CRB interface for ARM64

2017-03-10 Thread Jiandi An
This enables TPM Command Response Buffer interface driver for ARM64 and implements an ARM specific TPM CRB start method that invokes a Secure Monitor Call to request the Firmware to execute or cancel a TPM 2.0 command. Signed-off-by: Jiandi An ---

[tpmdd-devel] [PATCH 0/3] tpm/tpm_crb: Enable TPM CRB interface for ARM64

2017-03-10 Thread Jiandi An
TCG ACPI Specification Family "1.2" and "2.0" Version 1.2 Revision 8 introduces a new start method (type 11) for ARM64, along with platform specific paramters for this new start method. This new start method invokes a Secure Monitor Call to request the firmware to execute or cancel a TPM 2.0

[tpmdd-devel] [PATCH 1/3] ACPICA: Update TPM2 ACPI table

2017-03-10 Thread Jiandi An
TCG ACPI Specification Family "1.2" and "2.0" Version 1.2 Revision 8 introduces new start method for ARM SMC. - Add new start method (type 11) for ARM SMC - Add start method specific parameters for ARM SMC start method Signed-off-by: Jiandi An ---