Re: [Tee-dev] [RFC v2 2/6] tee: enable support to register kernel memory

2019-08-08 Thread Sumit Garg
On Fri, 9 Aug 2019 at 03:57, Stuart Yoder wrote: > > > > On 7/30/19 7:23 AM, Sumit Garg wrote: > > > @@ -264,7 +266,17 @@ struct tee_shm *tee_shm_register(struct tee_context > > *ctx, unsigned long addr, > > goto err; > > } >

Re: [Tee-dev] [RFC v2 0/6] Introduce TEE based Trusted Keys support

2019-08-01 Thread Sumit Garg
On Thu, 1 Aug 2019 at 14:00, Janne Karhunen wrote: > > On Thu, Aug 1, 2019 at 10:58 AM Sumit Garg wrote: > > > > Anyway, just my .02c. I guess having any new support in the kernel for > > > new trust sources is good and improvement from the current state. I > > &

Re: [RFC v2 0/6] Introduce TEE based Trusted Keys support

2019-08-01 Thread Sumit Garg
On Thu, 1 Aug 2019 at 13:30, Janne Karhunen wrote: > > On Thu, Aug 1, 2019 at 10:40 AM Sumit Garg wrote: > > > > I chose the userspace plugin due to this, you can use userspace aids > > > to provide any type of service. Use the crypto library you desire to

Re: [Tee-dev] [RFC v2 0/6] Introduce TEE based Trusted Keys support

2019-08-01 Thread Sumit Garg
On Thu, 1 Aug 2019 at 13:00, Janne Karhunen wrote: > > On Thu, Aug 1, 2019 at 9:50 AM Rouven Czerwinski > wrote: > > > > I'm aware of it - I have implemented a large part of the GP TEE APIs > > > earlier (primarily the crypto functions). Does the TEE you work with > > > actually support GP proper

Re: [RFC v2 0/6] Introduce TEE based Trusted Keys support

2019-08-01 Thread Sumit Garg
On Thu, 1 Aug 2019 at 11:51, Janne Karhunen wrote: > > On Wed, Jul 31, 2019 at 4:58 PM Sumit Garg wrote: > > > > To clarify a bit further - my thought was to support any type of trust > > > source. > > > > That could be very well accomplished via Truste

Re: [RFC v2 0/6] Introduce TEE based Trusted Keys support

2019-07-31 Thread Sumit Garg
On Wed, 31 Jul 2019 at 16:33, Janne Karhunen wrote: > > On Wed, Jul 31, 2019 at 1:26 PM Sumit Garg wrote: > > > > Interesting, I wrote something similar and posted it to the lists a while > > > back: > > > https://github.com/jkrh/linux/commit/d77e

Re: [RFC v2 0/6] Introduce TEE based Trusted Keys support

2019-07-31 Thread Sumit Garg
em. Besides, the help from usage of shm > > is pretty limited due to the size of the keydata. > > > > > > -- > > Janne > > > > > > > > > > On Tue, Jul 30, 2019 at 3:26 PM Sumit Garg wrote: > > > > > > Add support for TEE b

Re: [RFC v2 0/6] Introduce TEE based Trusted Keys support

2019-07-31 Thread Sumit Garg
. So there isn't any limitation due to the size of the keydata. -Sumit > > -- > Janne > > > > > On Tue, Jul 30, 2019 at 3:26 PM Sumit Garg wrote: > > > > Add support for TEE based trusted keys where TEE provides the functionality > > to seal and unseal tr

[RFC v2 6/6] MAINTAINERS: Add entry for TEE based Trusted Keys

2019-07-30 Thread Sumit Garg
Add MAINTAINERS entry for TEE based Trusted Keys framework. Signed-off-by: Sumit Garg --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index ce06877..0b61ecf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8930,6 +8930,15 @@ F: include

[RFC v2 3/6] tee: add private login method for kernel clients

2019-07-30 Thread Sumit Garg
login method range: (0x8000 - 0x). Signed-off-by: Sumit Garg --- drivers/tee/tee_core.c | 6 ++ include/uapi/linux/tee.h | 8 2 files changed, 14 insertions(+) diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index 0f16d9f..2c2f646 100644 --- a/driver

[RFC v2 0/6] Introduce TEE based Trusted Keys support

2019-07-30 Thread Sumit Garg
1. Add reviewed-by tags for patch #1 and #2. 2. Incorporate comments from Jens for patch #3. 3. Switch to use generic trusted keys framework. Sumit Garg (6): tee: optee: allow kernel pages to register as shm tee: enable support to register kernel memory tee: add private login method for kernel

[RFC v2 1/6] tee: optee: allow kernel pages to register as shm

2019-07-30 Thread Sumit Garg
Kernel pages are marked as normal type memory only so allow kernel pages to be registered as shared memory with OP-TEE. Signed-off-by: Sumit Garg Reviewed-by: Jarkko Sakkinen Reviewed-by: Jens Wiklander --- drivers/tee/optee/call.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a

[RFC v2 5/6] doc: keys: Document usage of TEE based Trusted Keys

2019-07-30 Thread Sumit Garg
Provide documentation for usage of TEE based Trusted Keys via existing user-space "keyctl" utility. Also, document various use-cases. Signed-off-by: Sumit Garg --- Documentation/security/keys/index.rst | 1 + Documentation/security/keys/tee-truste

[RFC v2 2/6] tee: enable support to register kernel memory

2019-07-30 Thread Sumit Garg
Enable support to register kernel memory reference with TEE. This change will allow TEE bus drivers to register memory references. Signed-off-by: Sumit Garg Reviewed-by: Jarkko Sakkinen Reviewed-by: Jens Wiklander --- drivers/tee/tee_shm.c | 16 ++-- include/linux/tee_drv.h | 1

[RFC v2 4/6] KEYS: trusted: Introduce TEE based Trusted Keys

2019-07-30 Thread Sumit Garg
Add support for TEE based trusted keys where TEE provides the functionality to seal and unseal trusted keys using hardware unique key. Refer to Documentation/tee.txt for detailed information about TEE. Signed-off-by: Sumit Garg --- include/keys/trusted-type.h | 3 + include/keys

Re: [RFC 3/7] tee: add private login method for kernel clients

2019-07-29 Thread Sumit Garg
On Mon, 29 Jul 2019 at 12:39, Jens Wiklander wrote: > > Hi Sumit, > > On Tue, Jul 9, 2019 at 11:36 AM Sumit Garg wrote: > > > > On Tue, 9 Jul 2019 at 12:33, Jens Wiklander > > wrote: > > > > > > On Tue, Jul 09, 2019 at 11:26:19AM +0530, Sumit G

Re: [RFC 3/7] tee: add private login method for kernel clients

2019-07-09 Thread Sumit Garg
On Tue, 9 Jul 2019 at 12:33, Jens Wiklander wrote: > > On Tue, Jul 09, 2019 at 11:26:19AM +0530, Sumit Garg wrote: > > Thanks Jens for your comments. > > > > On Mon, 8 Jul 2019 at 21:09, Jens Wiklander > > wrote: > > > > > > Hi Sumit, > > &

Re: [RFC 0/7] Introduce TEE based Trusted Keys support

2019-07-08 Thread Sumit Garg
On Mon, 8 Jul 2019 at 22:01, Jens Wiklander wrote: > > Hi Sumit, > > On Mon, Jul 08, 2019 at 06:11:39PM +0530, Sumit Garg wrote: > > Hi Jens, > > > > On Thu, 13 Jun 2019 at 16:01, Sumit Garg wrote: > > > > > > Add support for TEE based trusted

Re: [RFC 3/7] tee: add private login method for kernel clients

2019-07-08 Thread Sumit Garg
Thanks Jens for your comments. On Mon, 8 Jul 2019 at 21:09, Jens Wiklander wrote: > > Hi Sumit, > > On Thu, Jun 13, 2019 at 04:00:29PM +0530, Sumit Garg wrote: > > There are use-cases where user-space shouldn't be allowed to communicate > > directly with a TEE

Re: [RFC 0/7] Introduce TEE based Trusted Keys support

2019-07-08 Thread Sumit Garg
Hi Jens, On Thu, 13 Jun 2019 at 16:01, Sumit Garg wrote: > > Add support for TEE based trusted keys where TEE provides the functionality > to seal and unseal trusted keys using hardware unique key. Also, this is > an alternative in case platform doesn't possess a TPM device. >

Re: [PATCH v7 1/2] fTPM: firmware TPM running in TEE

2019-07-03 Thread Sumit Garg
On Wed, 3 Jul 2019 at 13:42, Ilias Apalodimas wrote: > > Hi Thirupathaiah, > > (+Joakim) > > On Wed, 3 Jul 2019 at 09:58, Ilias Apalodimas > wrote: > > > > Hi Thirupathaiah, > > > > > > First of all, Thanks a lot for trying to test the driver. > > > > > np > > > > [...] > > > > I managed to do so

Re: [PATCH v7 1/2] fTPM: firmware TPM running in TEE

2019-06-27 Thread Sumit Garg
Hi Jarkko and Sasha, On Thu, 27 Jun 2019 at 18:47, Jarkko Sakkinen wrote: > > On Wed, 2019-06-26 at 19:56 -0400, Sasha Levin wrote: > > > You've used so much on this so shouldn't this have that somewhat new > > > co-developed-by tag? I'm also wondering can this work at all > > > > Honestly, I've

Re: [PATCH v4 1/2] fTPM: firmware TPM running in TEE

2019-06-14 Thread Sumit Garg
On Wed, 5 Jun 2019 at 16:39, Sumit Garg wrote: > > On Wed, 5 Jun 2019 at 01:39, Sasha Levin wrote: > > > > On Tue, Jun 04, 2019 at 11:45:52AM +0530, Sumit Garg wrote: > > >On Thu, 30 May 2019 at 20:58, Sasha Levin wrote: > > >> + /* Open context wit

Re: [RFC 0/7] Introduce TEE based Trusted Keys support

2019-06-14 Thread Sumit Garg
Thanks Mimi for your comments. On Fri, 14 Jun 2019 at 05:33, Mimi Zohar wrote: > > On Thu, 2019-06-13 at 09:40 -0700, Casey Schaufler wrote: > > On 6/13/2019 3:30 AM, Sumit Garg wrote: > > > Add support for TEE based trusted keys where TEE provides the > > > f

Re: [RFC 0/7] Introduce TEE based Trusted Keys support

2019-06-13 Thread Sumit Garg
On Thu, 13 Jun 2019 at 22:10, Casey Schaufler wrote: > > On 6/13/2019 3:30 AM, Sumit Garg wrote: > > Add support for TEE based trusted keys where TEE provides the functionality > > to seal and unseal trusted keys using hardware unique key. Also, this is > > an alternative

Re: [RFC 4/7] KEYS: trusted: Introduce TEE based Trusted Keys

2019-06-13 Thread Sumit Garg
On Thu, 13 Jun 2019 at 21:02, Jarkko Sakkinen wrote: > > On Thu, Jun 13, 2019 at 04:00:30PM +0530, Sumit Garg wrote: > > Add support for TEE based trusted keys where TEE provides the functionality > > to seal and unseal trusted keys using hardware unique key. > > &g

Re: [RFC 6/7] doc: keys: Document usage of TEE based Trusted Keys

2019-06-13 Thread Sumit Garg
On Thu, 13 Jun 2019 at 21:04, Jarkko Sakkinen wrote: > > On Thu, Jun 13, 2019 at 04:00:32PM +0530, Sumit Garg wrote: > > Provide documentation for usage of TEE based Trusted Keys via existing > > user-space "keyctl" utility. Also, document various use-cases. >

Re: [RFC 2/7] tee: enable support to register kernel memory

2019-06-13 Thread Sumit Garg
On Thu, 13 Jun 2019 at 20:50, Jarkko Sakkinen wrote: > > On Thu, Jun 13, 2019 at 04:00:28PM +0530, Sumit Garg wrote: > > Enable support to register kernel memory reference with TEE. This change > > will allow TEE bus drivers to register memory references. > > >

Re: [RFC 1/7] tee: optee: allow kernel pages to register as shm

2019-06-13 Thread Sumit Garg
On Thu, 13 Jun 2019 at 20:47, Jarkko Sakkinen wrote: > > On Thu, Jun 13, 2019 at 06:17:14PM +0300, Jarkko Sakkinen wrote: > > On Thu, Jun 13, 2019 at 06:12:57PM +0300, Jarkko Sakkinen wrote: > > > On Thu, Jun 13, 2019 at 04:00:27PM +0530, Sumit Garg wrote: > > >

[RFC 3/7] tee: add private login method for kernel clients

2019-06-13 Thread Sumit Garg
ff-by: Sumit Garg --- drivers/tee/tee_core.c | 6 ++ include/uapi/linux/tee.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index 0f16d9f..4581bd1 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -334,6 +334,12 @@ s

[RFC 4/7] KEYS: trusted: Introduce TEE based Trusted Keys

2019-06-13 Thread Sumit Garg
x27;t possess one. Signed-off-by: Sumit Garg --- include/keys/tee_trusted.h | 84 include/keys/trusted-type.h | 1 + security/keys/Kconfig | 3 + security/keys/Makefile | 3 + security/keys/tee_trusted.c | 506 5 files changed

[RFC 2/7] tee: enable support to register kernel memory

2019-06-13 Thread Sumit Garg
Enable support to register kernel memory reference with TEE. This change will allow TEE bus drivers to register memory references. Signed-off-by: Sumit Garg --- drivers/tee/tee_shm.c | 16 ++-- include/linux/tee_drv.h | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff

[RFC 0/7] Introduce TEE based Trusted Keys support

2019-06-13 Thread Sumit Garg
E based trusted keys. This patch-set has been tested with OP-TEE based pseudo TA which can be found here [1]. Looking forward to your valuable feedback/suggestions. [1] https://github.com/OP-TEE/optee_os/pull/3082 Sumit Garg (7): tee: optee: allow kernel pages to register as shm tee: en

[RFC 1/7] tee: optee: allow kernel pages to register as shm

2019-06-13 Thread Sumit Garg
Kernel pages are marked as normal type memory only so allow kernel pages to be registered as shared memory with OP-TEE. Signed-off-by: Sumit Garg --- drivers/tee/optee/call.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c index

[RFC 6/7] doc: keys: Document usage of TEE based Trusted Keys

2019-06-13 Thread Sumit Garg
Provide documentation for usage of TEE based Trusted Keys via existing user-space "keyctl" utility. Also, document various use-cases. Signed-off-by: Sumit Garg --- Documentation/security/keys/tee-trusted.rst | 93 + 1 file changed, 93 insertions(+) c

[RFC 7/7] MAINTAINERS: Add entry for TEE based Trusted Keys

2019-06-13 Thread Sumit Garg
Add MAINTAINERS entry for TEE based Trusted Keys framework. Signed-off-by: Sumit Garg --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 57f496c..db84fc4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8728,6 +8728,15 @@ F: include

[RFC 5/7] KEYS: encrypted: Allow TEE based trusted master keys

2019-06-13 Thread Sumit Garg
Allow search for TEE based trusted keys to act as master keys in case TPM device is not present. Signed-off-by: Sumit Garg --- security/keys/encrypted-keys/masterkey_trusted.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/security/keys/encrypted-keys

Re: [PATCH v4 1/2] fTPM: firmware TPM running in TEE

2019-06-05 Thread Sumit Garg
On Wed, 5 Jun 2019 at 01:39, Sasha Levin wrote: > > On Tue, Jun 04, 2019 at 11:45:52AM +0530, Sumit Garg wrote: > >On Thu, 30 May 2019 at 20:58, Sasha Levin wrote: > >> + /* Open context with TEE driver */ > >> + pvt_data->ctx = tee_client_open_c

Re: [PATCH v4 1/2] fTPM: firmware TPM running in TEE

2019-06-03 Thread Sumit Garg
On Thu, 30 May 2019 at 20:58, Sasha Levin wrote: > > This patch adds support for a software-only implementation of a TPM > running in TEE. > > There is extensive documentation of the design here: > https://www.microsoft.com/en-us/research/publication/ftpm-software-implementation-tpm-chip/ > . > >

Re: [PATCH v3 0/2] ftpm: a firmware based TPM driver

2019-05-19 Thread Sumit Garg
On Fri, 17 May 2019 at 22:53, Thirupathaiah Annapureddy wrote: > > > > > -Original Message- > > From: Sumit Garg > > Sent: Thursday, May 16, 2019 11:57 PM > > To: Thirupathaiah Annapureddy > > Cc: Sasha Levin ; Jarkko Sakkinen > > ; peterhu

Re: [PATCH v3 0/2] ftpm: a firmware based TPM driver

2019-05-16 Thread Sumit Garg
+ Rob On Fri, 17 May 2019 at 00:54, Thirupathaiah Annapureddy wrote: > > > > > -Original Message- > > From: Sumit Garg > > Sent: Thursday, May 16, 2019 12:06 AM > > To: Thirupathaiah Annapureddy > > Cc: Sasha Levin ; Jarkko Sakkinen > >

Re: [PATCH v3 0/2] ftpm: a firmware based TPM driver

2019-05-16 Thread Sumit Garg
On Thu, 16 May 2019 at 06:30, Thirupathaiah Annapureddy wrote: > > > > > -Original Message- > > From: Sumit Garg > > Sent: Tuesday, May 14, 2019 7:02 PM > > To: Sasha Levin > > Cc: Jarkko Sakkinen ; peterhu...@gmx.de; > > j...@ziepe.ca; cor

Re: [PATCH v3 0/2] ftpm: a firmware based TPM driver

2019-05-14 Thread Sumit Garg
On Wed, 15 May 2019 at 01:00, Sasha Levin wrote: > > On Wed, May 08, 2019 at 03:44:36PM +0300, Jarkko Sakkinen wrote: > >On Tue, May 07, 2019 at 01:40:20PM -0400, Sasha Levin wrote: > >> On Mon, Apr 15, 2019 at 11:56:34AM -0400, Sasha Levin wrote: > >> > From: "Sasha Levin (Microsoft)" > >> > > >