Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-14 Thread Rijo Thomas
On 14/04/21 10:16 pm, Jens Wiklander wrote: > Hi Jiro, > > On Mon, Apr 12, 2021 at 12:20 PM Rijo Thomas wrote: >> >> >> >> On 12/04/21 1:06 pm, Jens Wiklander wrote: >>> On Mon, Apr 5, 2021 at 11:43 AM Rijo Thomas >>> wrote: Same Trusted Application (TA) can be loaded in multiple

Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-14 Thread Jens Wiklander
Hi Jiro, On Mon, Apr 12, 2021 at 12:20 PM Rijo Thomas wrote: > > > > On 12/04/21 1:06 pm, Jens Wiklander wrote: > > On Mon, Apr 5, 2021 at 11:43 AM Rijo Thomas > > wrote: > >> > >> Same Trusted Application (TA) can be loaded in multiple TEE contexts. > >> > >> If it is a single instance TA,

Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-12 Thread Rijo Thomas
On 12/04/21 1:06 pm, Jens Wiklander wrote: > On Mon, Apr 5, 2021 at 11:43 AM Rijo Thomas wrote: >> >> Same Trusted Application (TA) can be loaded in multiple TEE contexts. >> >> If it is a single instance TA, the TA should not get unloaded from AMD >> Secure Processor, while it is still in use

Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-12 Thread Rijo Thomas
On 09/04/21 2:15 pm, Dan Carpenter wrote: > On Mon, Apr 05, 2021 at 03:13:09PM +0530, Rijo Thomas wrote: >> @@ -340,7 +398,8 @@ int handle_open_session(struct >> tee_ioctl_open_session_arg *arg, u32 *info, >> >> int handle_load_ta(void *data, u32 size, struct tee_ioctl_open_session_arg >>

Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-12 Thread Jens Wiklander
On Mon, Apr 5, 2021 at 11:43 AM Rijo Thomas wrote: > > Same Trusted Application (TA) can be loaded in multiple TEE contexts. > > If it is a single instance TA, the TA should not get unloaded from AMD > Secure Processor, while it is still in use in another TEE context. > > Therefore reference

Re: [PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-09 Thread Dan Carpenter
On Mon, Apr 05, 2021 at 03:13:09PM +0530, Rijo Thomas wrote: > @@ -340,7 +398,8 @@ int handle_open_session(struct tee_ioctl_open_session_arg > *arg, u32 *info, > > int handle_load_ta(void *data, u32 size, struct tee_ioctl_open_session_arg > *arg) > { > - struct tee_cmd_load_ta cmd = {0};

[PATCH v2] tee: amdtee: unload TA only when its refcount becomes 0

2021-04-05 Thread Rijo Thomas
Same Trusted Application (TA) can be loaded in multiple TEE contexts. If it is a single instance TA, the TA should not get unloaded from AMD Secure Processor, while it is still in use in another TEE context. Therefore reference count TA and unload it when the count becomes zero. Fixes: