summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-03-23 17:03:25 -0700
committerSteve Kondik <steve@cyngn.com>2015-03-23 17:04:15 -0700
commit08e176767364a6c714f42de21e02143d5cd9ad9e (patch)
tree551d201f50e28c8b6b9de7dcbc99f40288290a16
parent83ac57fd5bd1e94a46b3b1b9657f024f4ee4c5fc (diff)
downloadandroid_hardware_qcom_keymaster-stable/cm-12.1-YOG3C.tar.gz
android_hardware_qcom_keymaster-stable/cm-12.1-YOG3C.tar.bz2
android_hardware_qcom_keymaster-stable/cm-12.1-YOG3C.zip
Revert "Keymaster: Check that keymaster app is loaded"staging/cm-12.1stable/cm-12.1-YOG3C
* Revert this- not all versions support setting the property, which leads to system hang. This reverts commit 86ed8597d0c01506af80dfe7e8fe9f79d3945e8a. Change-Id: I718b6a9a7a17876f7bf5754bca3fcb8f15f08d93
-rw-r--r--Android.mk3
-rw-r--r--keymaster_qcom.cpp25
2 files changed, 1 insertions, 27 deletions
diff --git a/Android.mk b/Android.mk
index d7d87ea..3b1b649 100644
--- a/Android.mk
+++ b/Android.mk
@@ -31,8 +31,7 @@ LOCAL_SHARED_LIBRARIES := \
libcrypto \
liblog \
libc \
- libdl \
- libcutils
+ libdl
LOCAL_ADDITIONAL_DEPENDENCIES := \
$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr \
diff --git a/keymaster_qcom.cpp b/keymaster_qcom.cpp
index 7fc1332..c2ea633 100644
--- a/keymaster_qcom.cpp
+++ b/keymaster_qcom.cpp
@@ -43,7 +43,6 @@
#include <dlfcn.h>
#include <UniquePtr.h>
-#include <cutils/properties.h>
#include "QSEEComAPI.h"
#include "keymaster_qcom.h"
@@ -54,8 +53,6 @@
#define LOG_TAG "QCOMKeyMaster"
#define UNUSED(x) (void)(x)
#define KM_SB_LENGTH (4096 * 2)
-#define MAX_PROPERTY_GET_ATTEMPTS 60
-#define PROPERTY_GET_SLEEP_INTERVAL 1
#include <cutils/log.h>
struct qcom_km_ion_info_t {
@@ -741,8 +738,6 @@ static int qcom_km_open(const hw_module_t* module, const char* name,
hw_device_t** device)
{
int ret = 0;
- unsigned int attempt_num = 0;
- char property_val[PROPERTY_VALUE_MAX] = {0};
qcom_keymaster_handle_t* km_handle;
if (strcmp(name, KEYSTORE_KEYMASTER) != 0)
return -EINVAL;
@@ -765,26 +760,6 @@ static int qcom_km_open(const hw_module_t* module, const char* name,
return -ENOMEM;
}
dev->context = (void *)km_handle;
- while (attempt_num < MAX_PROPERTY_GET_ATTEMPTS)
- {
- property_get("sys.keymaster.loaded", property_val, "");
- if (strncmp(property_val, "true", sizeof(property_val)) == 0)
- {
- ALOGD("keymaster app is loaded");
- break;
- }
- if (attempt_num == 0)
- ALOGE("keymaster app is not loaded, attempt num: %d", attempt_num);
- attempt_num++;
- sleep(PROPERTY_GET_SLEEP_INTERVAL);
- }
- if (attempt_num == MAX_PROPERTY_GET_ATTEMPTS)
- {
- ALOGE("keymaster app not loaded: Max attempts reached");
- free(km_handle);
- return -1;
- }
- ALOGD("keymaster app got loaded at attempt number %d", attempt_num);
ret = (*km_handle->QSEECom_start_app)((struct QSEECom_handle **)&km_handle->qseecom,
"/vendor/firmware/keymaster", "keymaster", KM_SB_LENGTH);
if(ret)