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; > > } > > > > - rc = get_user_pages_fast(start, num_pag

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

2019-08-08 Thread Stuart Yoder
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; } - rc = get_user_pages_fast(start, num_pages, FOLL_WRITE, shm->pages); + if (flags & TEE_SHM_USER_MAPPED) { +