security: tlk_driver: lock/fault userspace pages
authorMahesh Lagadapati <mlagadapati@nvidia.com>
Fri, 31 Oct 2014 03:36:17 +0000 (20:36 -0700)
committerMitch Luban <mluban@nvidia.com>
Tue, 13 Jan 2015 23:55:25 +0000 (15:55 -0800)
commita517ace37e656ea3023b527882d349329a026a84
tree84405acfd726ac30472af5ab8f1b767da70df293
parent62e35844bf2a4b28095bd865c5a696d8e1ea6703
security: tlk_driver: lock/fault userspace pages

When AF bit is zero for an user space buffer, access faults are observed
during address translation in the secure world.

Lock userspace buffers using sys_mlock to ensure that AF bit is not
cleared once they are passed to the secure world. Also invoke
fixup_user_fault API to set AF bit to 1 to handle the case when AF bit
is zero even before calling sys_mlock.

Bug 1566742

Change-Id: If1a70f7e9d8fb0e1d03a837d277e068c8ce22042
Signed-off-by: Mahesh Lagadapati <mlagadapati@nvidia.com>
Reviewed-on: http://git-master/r/591946
(cherry picked from commit 0d124dbefd6b0f67d64d29669d4685b267083d99)
Reviewed-on: http://git-master/r/671272
Reviewed-by: Hyung Taek Ryoo <hryoo@nvidia.com>
Reviewed-by: Mitch Luban <mluban@nvidia.com>
security/tlk_driver/ote_comms.c
security/tlk_driver/ote_protocol.h