security: tlk_driver: Pin user space page(s).
Pin user space pages based on the type of memory i.e.
read or write.
TE_PARAM_TYPE_MEM_RO or TE_PARAM_TYPE_MEM_RW param
indicates whether the TLK kernel will setup a RO/RW
mapping for the TA to this buffer.
Based on the type of memory we should pin the pages
using get_user_pages() as RO/RW.
Bug
1519770
Change-Id: Ib937433b64602f10cd1114f19845e9f6b4f8bf06
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/418897
(cherry picked from commit
a37d707aff592dc868ae554b026191bd9f4951a5)
Reviewed-on: http://git-master/r/488997
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Tested-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Kevin Kranzusch <kevink@nvidia.com>