[FOSS_TLK]security: tlk_driver: lock/fault userspace pages
authorMahesh Lagadapati <mlagadapati@nvidia.com>
Fri, 31 Oct 2014 03:36:17 +0000 (20:36 -0700)
committerVarun Wadekar <vwadekar@nvidia.com>
Thu, 18 Jun 2015 12:10:18 +0000 (05:10 -0700)
commit103e25ec6845ec1983ab08fc08b5e3c94b1a7cc3
treeb9326e0b9f8a12dd2a43964c474fd4679759102b
parent96d3be530ee87a78f86f58a8d8ff5d1cfa14c20b
[FOSS_TLK]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.

Change-Id: If1a70f7e9d8fb0e1d03a837d277e068c8ce22042
Signed-off-by: Mahesh Lagadapati <mlagadapati@nvidia.com>
Reviewed-on: http://git-master/r/755007
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
security/tlk_driver/ote_comms.c
security/tlk_driver/ote_protocol.h