[FOSS_TLK]Revert "security: tlk_driver: delete te_pin_user_pages() and its usage"
authorSharif Inamdar <isharif@nvidia.com>
Tue, 3 Jun 2014 04:48:11 +0000 (09:48 +0530)
committerVarun Wadekar <vwadekar@nvidia.com>
Thu, 18 Jun 2015 12:03:43 +0000 (05:03 -0700)
commit624f59a033d87318d863ab2c0dc14cd2d247c31b
treee5984ca8c782f8d73489869102534e821bcdbd50
parent8c0c6f006568fbef85f75e2ff2f5d38f1697e9b3
[FOSS_TLK]Revert "security: tlk_driver: delete te_pin_user_pages() and its usage"

We are reverting this as we want to add support of
te_pin_user_pages(). TA can have dynamic mappings
created as part of an OpenSession or LaunchOperation
command.

If either of these specify a buffer as an argument
(with virt addr and length as params), the TLK kernel
will create a mapping to it. This happens for things
that go between TAs (no pin issue there) and between
the NS and S worlds.

In the case of NS buffers being passed in, we need
phys memory to stay where it is, because the secure
world has a mapping to it that Linux is unaware of,
which is why we pin it.

This reverts commit f4a063081552617e72cbdda5596ae7bd537696f7.

Change-Id: I7676f7786cef469f6cbb39a76a05541b417dc5f7
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/754994
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