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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 22 Dec 2016 17:09:10 +0300
From:   Alexey Brodkin <Alexey.Brodkin@...opsys.com>
To:     linux-snps-arc@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org,
        Vineet Gupta <Vineet.Gupta1@...opsys.com>,
        Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
        Igor Guryanov <Igor.Guryanov@...opsys.com>,
        stable@...r.kernel.org
Subject: [PATCH 2/2] arc: Fix xCCM size check

CONFIG_ARC_ICCM_SZ in menuconfig is specified in kB while
"cpu->Xccm.sz" contains value in bytes thus direct comparison fails
leading to boot-time panic like that:
----------------------->8---------------------
IDENTITY        : ARCVER [0x52] ARCNUM [0x1] CHIPID [ 0x0]
processor [1]   : ARC HS38 R2.1 (ARCv2 ISA)
Timers          : Timer0 Timer1 Local-64-bit-Ctr (not used)
ISA Extn        : atomic ll64 unalign (not used)
                : mpy[opt 9] div_rem norm barrel-shift swap minmax swape
BPU             : full match, cache:2048, Predict Table:16384
MMU [v0]        : 0k PAGE, JTLB 0 (0x0), uDTLB 0, uITLB 0
I-Cache         : N/A
D-Cache         : N/A
Peripherals     : 0xf0000000, IO-Coherency (disabled)
Vector Table    : 0x80000000
FPU             : SP DP
DEBUG           : ActionPoint smaRT RTT
Extn [CCM]      : DCCM @ e0000000, 256 KB / ICCM: @ 60000000, 256 KB
OS ABI [v4]     : 64-bit data any register aligned
Extn [SMP]      : ARConnect (v2): 2 cores with IPI IDU DEBUG GFRC
Kernel panic - not syncing: Linux built with incorrect DCCM Size

---[ end Kernel panic - not syncing: Linux built with incorrect DCCM Size
----------------------->8---------------------

Signed-off-by: Alexey Brodkin <abrodkin@...opsys.com>
Cc: Igor Guryanov <guryanov@...opsys.com>
Cc: stable@...r.kernel.org
---
 arch/arc/kernel/setup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index ee574f37f365..601dab6fe5e0 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -333,12 +333,12 @@ static void arc_chk_core_config(void)
 	if ((unsigned int)__arc_dccm_base != cpu->dccm.base_addr)
 		panic("Linux built with incorrect DCCM Base address\n");
 
-	if (CONFIG_ARC_DCCM_SZ != cpu->dccm.sz)
+	if (CONFIG_ARC_DCCM_SZ != TO_KB(cpu->dccm.sz))
 		panic("Linux built with incorrect DCCM Size\n");
 #endif
 
 #ifdef CONFIG_ARC_HAS_ICCM
-	if (CONFIG_ARC_ICCM_SZ != cpu->iccm.sz)
+	if (CONFIG_ARC_ICCM_SZ != TO_KB(cpu->iccm.sz))
 		panic("Linux built with incorrect ICCM Size\n");
 #endif
 
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ