mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-10-01 01:35:54 -04:00
56 lines
2.1 KiB
Diff
56 lines
2.1 KiB
Diff
From 4fa7499742c56c7f7064c9dc14c3a34f4be38851 Mon Sep 17 00:00:00 2001
|
|
From: Ariel Yin <ayin@google.com>
|
|
Date: Fri, 13 Jan 2017 13:58:56 -0800
|
|
Subject: [PATCH] msm: vidc: WARN_ON() reveals fuction addresses
|
|
|
|
There is a security vulnerability where function addresses are
|
|
printed in kernel message if WARN_ON() is invoked implicitly.
|
|
WARN_ON() call is made explicit to avoid this issue.
|
|
|
|
Bug: 32873615
|
|
CRs-Fixed: 1093693
|
|
Change-Id: If75581803adf62cb9bda3784ad1d4f4088e0d797
|
|
Signed-off-by: Sanjay Singh <sisanj@codeaurora.org>
|
|
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
|
|
---
|
|
drivers/media/platform/msm/vidc/msm_vidc.c | 3 ++-
|
|
drivers/media/platform/msm/vidc/venus_hfi.c | 4 ++--
|
|
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/drivers/media/platform/msm/vidc/msm_vidc.c b/drivers/media/platform/msm/vidc/msm_vidc.c
|
|
index 0f55f3254a43b..b90ebc11d527a 100644
|
|
--- a/drivers/media/platform/msm/vidc/msm_vidc.c
|
|
+++ b/drivers/media/platform/msm/vidc/msm_vidc.c
|
|
@@ -1405,7 +1405,8 @@ static void cleanup_instance(struct msm_vidc_inst *inst)
|
|
debugfs_remove_recursive(inst->debugfs_root);
|
|
|
|
mutex_lock(&inst->pending_getpropq.lock);
|
|
- WARN_ON(!list_empty(&inst->pending_getpropq.list));
|
|
+ WARN_ON(!list_empty(&inst->pending_getpropq.list)
|
|
+ && (msm_vidc_debug & VIDC_INFO));
|
|
mutex_unlock(&inst->pending_getpropq.lock);
|
|
}
|
|
}
|
|
diff --git a/drivers/media/platform/msm/vidc/venus_hfi.c b/drivers/media/platform/msm/vidc/venus_hfi.c
|
|
index a7a391f9c8d30..6f6d79a1f6946 100644
|
|
--- a/drivers/media/platform/msm/vidc/venus_hfi.c
|
|
+++ b/drivers/media/platform/msm/vidc/venus_hfi.c
|
|
@@ -261,7 +261,7 @@ static int venus_hfi_acquire_regulator(struct regulator_info *rinfo)
|
|
rinfo->name);
|
|
}
|
|
}
|
|
- WARN_ON(!regulator_is_enabled(rinfo->regulator));
|
|
+ WARN_ON(!regulator_is_enabled(rinfo->regulator) && (msm_vidc_debug & VIDC_INFO));
|
|
return rc;
|
|
}
|
|
|
|
@@ -3954,7 +3954,7 @@ static int venus_hfi_disable_regulator(struct regulator_info *rinfo)
|
|
disable_regulator_failed:
|
|
|
|
/* Bring attention to this issue */
|
|
- WARN_ON(1);
|
|
+ WARN_ON(msm_vidc_debug & VIDC_INFO);
|
|
return rc;
|
|
}
|
|
|