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-next>] [day] [month] [year] [list]
Message-Id: <20101013131057.88238be6.randy.dunlap@oracle.com>
Date:	Wed, 13 Oct 2010 13:10:57 -0700
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	lkml <linux-kernel@...r.kernel.org>
Cc:	Doug Thompson <dougthompson@...ssion.com>,
	Borislav Petkov <borislav.petkov@....com>,
	akpm <akpm@...ux-foundation.org>
Subject: [PATCH -next] edac/mce_amd: fix shift warning

From: Randy Dunlap <randy.dunlap@...cle.com>

The BIT() macro works on unsigned longs, but this warning happens
on i386 (X86_32), where UL is 32 bits and this value needs to be
64 bits, so use open-coded ULL.

drivers/edac/mce_amd.c:262: warning: left shift count >= width of type

Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
Cc: Doug Thompson <dougthompson@...ssion.com>
Cc: Borislav Petkov <borislav.petkov@....com>
---
 drivers/edac/mce_amd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-next-20101012.orig/drivers/edac/mce_amd.c
+++ linux-next-20101012/drivers/edac/mce_amd.c
@@ -259,7 +259,8 @@ static void amd_decode_ic_mce(struct mce
 		pr_cont("%s TLB %s.\n", LL_MSG(ec),
 			(xec ? "multimatch" : "parity error"));
 	else if (BUS_ERROR(ec)) {
-		bool k8 = (boot_cpu_data.x86 == 0xf && (m->status & BIT(58)));
+		bool k8 = (boot_cpu_data.x86 == 0xf &&
+				(m->status & (1ULL << 58)));
 
 		pr_cont("during %s.\n", (k8 ? "system linefill" : "NB data read"));
 	} else if (fam_ops->ic_mce(ec))
--
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