Ref_count should be with shmbridge and shmbridge should
maintain real owner and ref_count info as smcinvoke is a
client it should blindly do register and deregister.
Change-Id: Ib9400af0db1abafa7c6262e7cd80c8ae301a4ed1
Signed-off-by: Nitin LNU <quic_nlakra@quicinc.com>
expose ITrustedCameraDriver header file to camera so
that camera kernel driver can trigger protect/unprotect calls.
Change-Id: I4301fc3d676e4bc12fde5a5af0bd61f6a63988aa
Add support for map opjects to be written into the
async side channel also for the use case where memory
objects are created as a result of a CB request.
Change-Id: I63798d92e40127fe842c08b892d734134f792dd9
Signed-off-by: Reut Zysman <quic_rzysman@quicinc.com>
When qcedev module is exiting, it disconnects SPS.
At this times, crypto clocks need to be turned on
or it will cause a synchronous abort.
Tests: rmmod on the qcedev module.
Change-Id: I1721fe408392ef81b07a6c08d2196b2413ba2b2f
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Steps to test
1. Create symlink
cd kernel_platform
mkdir techpacks
cd techpacks
mkdir securemsm-kernel
cd securemsm-kernel
ln /vendor/qcom/open-source/securemsm-kernel/* .
2. To compile
cd kernel_platfrom
tools/bazel run --lto=thin //techpacks/securemsm-kernel:pineapple_consolidate_securemsm-kernel_dist
Test done::
Able to compile hdcp DLKM and able to install it at
out/target/product/<target>/dlkm/lib/modules
Change-Id: Ic2ab2656bd6434944583a12f54920e3db6c15f2d
Add the full drivers for the PVM and TVM.
Change-Id: I3046306fff91670928c750ffa31db02bd0240c9c
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Use printk_ratelimit() to limit the logs
indicating that secure side is busy,
that the sever state was set to defunct,
and other logs that may be printed frequently.
Change-Id: I93c64bfa65cc2f499cabff3fd26b74764269b6f6
Signed-off-by: Reut Zysman <quic_rzysman@quicinc.com>
Replace DMA_BUF_MAP with IOSYS_MAP Conditionally
based on kernel version.
Add break/fallthrough after every case.
Add return in all the return path.
Import DMA_BUF.
Change-Id: I67c5b477d1f3a44456789dc37ab7ff7ab1ae905b
call release tz object in sync manner
only in case of EBUSY add
object in to post process list, so that we can retry
and process it later in a seprate kthread.
Change-Id: I2158b3faa5c41d2f10ed532c50c9c6b113961c57
Make required changes to satisfy external module dependency.
This gives flexibilty for external modules to include
*.h
linux/*.h
Change-Id: I68c5a5842f84622b85da0056f998775f89e6eebf
Removed name from log message
Test:Compiled and boot up tested.
Change-Id: Ia5c21710a63bb2e461259cf07951c579c3c95bee
Signed-off-by: Indranil Pradhan <quic_ipradhan@quicinc.com>
Steps to test
1. Create symlink
cd kernel_platform
mkdir techpacks
cd techpacks
mkdir securemsm-kernel
cd securemsm-kernel
ln /vendor/qcom/open-source/securemsm-kernel/* .
2. To compile
cd kernel_platfrom
tools/bazel run --lto=thin //techpacks/securemsm-kernel:pineapple_consolidate_securemsm-kernel_dist
3. Test done:
Able to compile smcinvoke/tz_log/qseecom DLKM and able to install it
at
out/target/product/<target>/dlkm/lib/modules
Change-Id: I8258a1351281a0acb05a2e909bbc421d576b4ee0
Add the base of the SMMU proxy driver for Android. The proxy driver
will take memory from the PVM, share it with the TVM and map it into
an S1 context bank on the TVM, before returning an IOVA for the mapped
buffer.
This patch intended to create the driver to allow other kenrel modules
to compile against it.
Change-Id: Id2951fbf467fcce0a3f1a1c45eba5b041f76f080
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
Add the UAPI headers for the SMMU proxy driver and make them usable in
Android.
Change-Id: Ibea130d79631f4d973e957a43dffde27fc472035
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
qcedev: enable/disable bam irqs during clocks
qcedev: fix null pointer dereference in qcedev_release
qcedev: delete request from list if it gets timed out
qcedev: Fix for some coding errors
Test: OEMCrypto tests.
Change-Id: I3c97890963b113d8287f9159adcd192f7be9790f
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
req_done is usually scheduled on success scenarios as
it needs to wakeup the sleep thread. However, in the
scenario where sleep has timed out, there is nothing to
wake up, and req_done can be called sequentially instead
of scheduling it (which might cause use after free).
Test: OEMCrypto tests.
Change-Id: I296076fcb43d91d16b00f08819dca45bd9049198
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
This change makes changes to smcinvoke driver to handle suspend and resume
scenarios. If the accept thread gets interrupted, do not set the server state
as defunct if the thread is in freezing state, i.e. if the thread is going in
suspend. In such cases, increase timeout of that server so that invoke thread
waits indefinitely for response from userspace until the system resumes back.
Tests:
1. Stability testing has been done on kalama.
2. smcinvoke vendor client testing is done on pineapple.
Change-Id: Iaa7b91d6ed484305349c04468263919e26a3316d
Signed-off-by: Anmolpreet Kaur <quic_anmolpre@quicinc.com>
Add support for map objects to be written into the async
side channel rather than have to be explicitly asked for
by QTEE.
Change-Id: Ia1c56555dc3a6422f4fb448f94f73fef661ac89d
Signed-off-by: Reut Zysman <quic_rzysman@quicinc.com>
Handle crypto errors and timeouts better leaving room
for lesser sync issues (especially during timeouts).
Also, support the crypto status changes in the v5.8
CE engine.
Tests: oemcrypto tests on pineapple.
Change-Id: I8d381c9a2b80853260bc779afbea58ae600bccaf
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Change consists creation of ADCI thread at SMCInvoke
driver initialization
Change consists creation of ADCI thread at SMCInvoke driver initialization
Following scenario have been tested for this change
(1) ADCI thread creation and QTEE invocation during driver initialization
(2) Backward Compatibility - IF ADCI feature is not supported (OBJECT_ERROR_INVALID)
then exit the ADCI thread gracefully after cleaning up all the resources
(3) Leak Test: All the resources held by ADCI thread should be released if ADCI feature
is not supported by QTEE
(i) adci task_struct state and exit state:
state = TASK_RUNNING , exit_state = 0 (While ADCI thread execution)
state = TASK_DEAD , exit_state = EXIT_DEAD (During ADCI thread termination)
(ii) adci task_struct = NULL (fetched based on adci thread_id) which make sure
task_struct has been deallocated
(4) SMCInvoke related Test: All the internal(suuported),memobj and cbo testing has been performed.
Change-Id: I2916ce260fae293b88fbc8b9d24baccdee1ea89f
Signed-off-by: Pawan Rai <quic_pawarai@quicinc.com>
Avoid marshalling user args in kernel driver if the corresponding CallBack
invocation fails in userspace.
Change-Id: I1dc5ca562c5a67e1ac2273a1ff2a854f2010c1d3
during smcinvoke callback response handling.
Add Cache flush before invalidating out_buf during cb
response handling in smcinvoke driver.
Change-Id: I68b70c078675f1841690c93048cbba3589a388f3
In case the accept thread has invalid cbtxn, start waiting
for new requests instead of going to userspace and then coming
back.
Change-Id: I2cce16ebb0481d184fed636a559e73adaacdcf0f
Signed-off-by: Anmolpreet Kaur <quic_anmolpre@quicinc.com>
We are exposing headers present in "include/linux" for the rest of the kernel DLKM's.
Aallow other kernel teams to access these headers.
Change-Id: I19c5591d885c7042ba3acd312ce9cb2bddc995c9
CRS-Fixed: 3338788
A new module named qseecom_proxy has been defined in kernel
which acts as a forwarder for calls received from kernel clients
of qseecom and smcinvoke. This change adds the support for calling
that module from the vendor dlkm modules smcinvoke and qseecom.
Change-Id: I0d1aa93b9cea9e6a6e1fee17c33c78e14deb8ecf
Signed-off-by: Anmolpreet Kaur <quic_anmolpre@quicinc.com>
Hdcp2p2 TA handle is getting accessed after freed in hdcp_stop_command
which is causing device crash while running hdcp2p2 use cases. So avoided
hdcp handle access after hdcp_stop call.
Change-Id: I8dc08451e51077b4f3ab086bb0c878d5df4f7f58
This reverts commit 796ae71391.
This commit is being reverted due to build conflicts
with other teams
CRS-Fixed: 3354563
Change-Id: I915cc5bd0e718a1b82641ac02d2f0184f2fa1f37
Release memory object from userspace when a call to release comes in
kernel to prevent the memory leaks in the cases where mem objects
are passed as a response inside a callback call.
Change-Id: I5ce57b6be90e71e255a890895d5f2859312ba1e4
Signed-off-by: Anmolpreet Kaur <quic_anmolpre@quicinc.com>