]> xenbits.xensource.com Git - arm/linux.git/commit
tee: optee: Fix dynamic shm pool allocations
authorSumit Garg <sumit.garg@linaro.org>
Fri, 8 Nov 2019 11:27:14 +0000 (16:57 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Jan 2020 09:01:07 +0000 (10:01 +0100)
commit5c179c003b45909df8bf55c072df897bcb2ef0e0
tree3d7bc59a6f76f04982949e55f8c578a52111fa33
parent2eb4d745cf7f4617fdbc33d8278191a36ada0ee4
tee: optee: Fix dynamic shm pool allocations

[ Upstream commit a249dd200d03791cab23e47571f3e13d9c72af6c ]

In case of dynamic shared memory pool, kernel memory allocated using
dmabuf_mgr pool needs to be registered with OP-TEE prior to its usage
during optee_open_session() or optee_invoke_func().

So fix dmabuf_mgr pool allocations via an additional call to
optee_shm_register().

Also, allow kernel pages to be registered as shared memory with OP-TEE.

Fixes: 9733b072a12a ("optee: allow to work without static shared memory")
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tee/optee/call.c
drivers/tee/optee/shm_pool.c