security: tlk_driver: Do not read the pte pointer within te_prep_mem_buffer.

get_user_pages does not pin userspace va mappings, so we cannot rely
on the ptes of pinned pages for finding out read/write permissions,
cacheability attributes, etc.  This information is needed in order
to map physical memory into trusty, though. Instead, recreate this
state from the vma flags and the vm_page_prot bits.

Bug 19423463

Change-Id: Ib4b0390117f4cc0779aa819b76f3117f2d2ba744
Signed-off-by: Riley Andrews <riandrews@google.com>
4 files changed