EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 20 Jan 2016 09:54:51 +0000 (12:54 +0300)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 08:42:44 +0000 (10:42 +0200)
commita3fda4b44dc0a885a08d634e423cfb7e0dfb99e1
tree3c398dbd3b13b4defc5e68b818f1830c28d988f8
parentf556290916cc40b8504f9f20baf21e7099a77376
EDAC, amd64_edac: Shift wrapping issue in f1x_get_norm_dct_addr()

commit 6f3508f61c814ee852c199988a62bd954c50dfc1 upstream.

dct_sel_base_off is declared as a u64 but we're only using the lower 32
bits because of a shift wrapping bug. This can possibly truncate the
upper 16 bits of DctSelBaseOffset[47:26], causing us to misdecode the CS
row.

Fixes: c8e518d5673d ('amd64_edac: Sanitize f10_get_base_addr_offset')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/20160120095451.GB19898@mwanda
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/edac/amd64_edac.c