DivestOS/Patches/Linux_CVEs/CVE-2017-6423/ANY/0.patch
2017-10-29 22:14:37 -04:00

68 lines
2.3 KiB
Diff

From 0f264f812b61884390b432fdad081a3e995ba768 Mon Sep 17 00:00:00 2001
From: Kaushal Kumar <kaushalk@codeaurora.org>
Date: Fri, 20 Jan 2017 15:23:40 +0530
Subject: soc: qcom: make debugfs support configurable for kryo l2 accessors
driver
Add config option to enable/disable l2 indirect access debug capability.
The driver exposes l2 indirect access debugfs interface to get/set data,
address, and target cpus so keep it disabled by default.
Change-Id: I22f84d16a3bf12a78295f2d052bb50e90d6f2a8b
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
---
drivers/soc/qcom/Kconfig | 10 ++++++++++
drivers/soc/qcom/kryo-l2-accessors.c | 6 +++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index ae2f304..b039090 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -292,6 +292,16 @@ config MSM_CACHE_M4M_ERP64_PANIC_ON_UE
Say 'Y' here to cause kernel panic when uncorrectable cache/M4M errors
are detected.
+config MSM_L2_IA_DEBUG
+ bool "Enable MSM L2 Indirect Access Debug"
+ depends on DEBUG_FS
+ default n
+ help
+ This option enables L2 indirect access debug
+ capability. It exposes L2 indirect access
+ debugfs interface to get/set data, address,
+ and target cpus.
+
config MSM_RPM_SMD
bool "RPM driver using SMD protocol"
help
diff --git a/drivers/soc/qcom/kryo-l2-accessors.c b/drivers/soc/qcom/kryo-l2-accessors.c
index a945f9e..1d81074 100644
--- a/drivers/soc/qcom/kryo-l2-accessors.c
+++ b/drivers/soc/qcom/kryo-l2-accessors.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2015, 2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -80,7 +80,7 @@ u64 get_l2_indirect_reg(u64 reg)
}
EXPORT_SYMBOL(get_l2_indirect_reg);
-#if defined(CONFIG_DEBUG_FS)
+#if defined(CONFIG_MSM_L2_IA_DEBUG)
static u32 debug_addr;
static int debug_target_cpu;
@@ -180,4 +180,4 @@ static int l2_ia_debug_init(void)
}
late_initcall(l2_ia_debug_init);
-#endif /* CONFIG_DEBUG_FS */
+#endif /* CONFIG_MSM_L2_IA_DEBUG */
--
cgit v1.1