lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1385565585-28306-1-git-send-email-taras.kondratiuk@linaro.org>
Date:	Wed, 27 Nov 2013 17:19:44 +0200
From:	Taras Kondratiuk <taras.kondratiuk@...aro.org>
To:	Rob Herring <rob.herring@...xeda.com>
Cc:	patches@...aro.org, linaro-networking@...aro.org,
	linaro-kernel@...ts.linaro.org,
	Russell King <linux@....linux.org.uk>,
	Tony Lindgren <tony@...mide.com>,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-omap@...r.kernel.org
Subject: [PATCH v2] ARM: OMAP4/highbank: Flush L2 cache before disabling

Kexec disables outer cache before jumping to reboot code, but it doesn't
flush it explicitly. Flush is done implicitly inside of l2x0_disable().
But some SoC's override default .disable handler and don't flush cache.
This may lead to a corrupted memory during Kexec reboot on these
platforms.

This patch adds cache flush inside of OMAP4 and Highbank outer_cache.disable()
handlers to make it consistent with default l2x0_disable().

Acked-by: Rob Herring <rob.herring@...xeda.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@...com>
Acked-by: Tony Lindgren <tony@...mide.com>
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@...aro.org>
---
I was not aware about Russell's patch tracker process, so this patch
was not hooked there. Highbank moved to PSCI since then, so patch
has to be slightly modified.

Rob, are you still ok with this patch?

v1..v2: Removed changes in highbank_suspend_finish since after
        commit dd68eb0 "ARM: highbank: adapt to use ARM PSCI calls"
        cache is not explicitly disabled there.

v1: http://www.spinics.net/lists/linux-omap/msg98318.html

RFC v2: https://patchwork.kernel.org/patch/2990231/
        Make the fix specific to platforms that don't use
	l2x0_disable().
RFC v1: https://patchwork.kernel.org/patch/2974431/

Based on v3.13-rc1
---
 arch/arm/mach-highbank/highbank.c  |    1 +
 arch/arm/mach-omap2/omap4-common.c |    1 +
 2 files changed, 2 insertions(+)

diff --git a/arch/arm/mach-highbank/highbank.c b/arch/arm/mach-highbank/highbank.c
index b3d7e56..ae17150 100644
--- a/arch/arm/mach-highbank/highbank.c
+++ b/arch/arm/mach-highbank/highbank.c
@@ -50,6 +50,7 @@ static void __init highbank_scu_map_io(void)
 
 static void highbank_l2x0_disable(void)
 {
+	outer_flush_all();
 	/* Disable PL310 L2 Cache controller */
 	highbank_smc1(0x102, 0x0);
 }
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index b39efd4..c0ab9b2 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -162,6 +162,7 @@ void __iomem *omap4_get_l2cache_base(void)
 
 static void omap4_l2x0_disable(void)
 {
+	outer_flush_all();
 	/* Disable PL310 L2 Cache controller */
 	omap_smc1(0x102, 0x0);
 }
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ