Linux EDAC development
 help / color / mirror / Atom feed
From: Anna Karbownik <anna.karbownik@intel.com>
To: mchehab@kernel.org, bp@alien8.de, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: dan.carpenter@oracle.com, tony.luck@intel.com,
	jim.m.snow@intel.com, qiuxu.zhuo@intel.com,
	lukasz.odzioba@intel.com, krzysztof.paliswiat@intel.com,
	anna.karbownik@intel.com
Subject: [1/1] EDAC, sb_edac: Fix out of bound write during DIMM configuration on KNL
Date: Thu, 22 Feb 2018 16:18:13 +0100	[thread overview]
Message-ID: <1519312693-4789-1-git-send-email-anna.karbownik@intel.com> (raw)

From: akarbown <anna.karbownik@intel.com>

In one of the previous patches we decreased NUM_CHANNELS from 8 to 4, but
it is not enough for Knights Landing which supports up to 6 channels.

This caused unattended writes to pvt->mirror_mode and pvt->tolm variables
which don't pay critical role on KNL code path, so driver was somehow functional.

The easiest way of fixing it is to change NUM_CHANNELS to 6.
An alternative solution would be to restructure KNL part of the driver to
2MC/3channel representation.

Fixes: 3286d3eb906c ("EDAC, sb_edac: Drop NUM_CHANNELS from 8 back to 4")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Anna Karbownik <anna.karbownik@intel.com>
---
 drivers/edac/sb_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index f34430f..8721002 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -279,7 +279,7 @@ static inline int sad_pkg(const struct interleave_pkg *table, u32 reg,
  * sbridge structs
  */
 
-#define NUM_CHANNELS		4	/* Max channels per MC */
+#define NUM_CHANNELS		6	/* Max channels per MC */
 #define MAX_DIMMS		3	/* Max DIMMS per channel */
 #define KNL_MAX_CHAS		38	/* KNL max num. of Cache Home Agents */
 #define KNL_MAX_CHANNELS	6	/* KNL max num. of PCI channels */

             reply	other threads:[~2018-02-22 15:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 15:18 Anna Karbownik [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-02-23 11:09 [1/1] EDAC, sb_edac: Fix out of bound write during DIMM configuration on KNL Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1519312693-4789-1-git-send-email-anna.karbownik@intel.com \
    --to=anna.karbownik@intel.com \
    --cc=bp@alien8.de \
    --cc=dan.carpenter@oracle.com \
    --cc=jim.m.snow@intel.com \
    --cc=krzysztof.paliswiat@intel.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukasz.odzioba@intel.com \
    --cc=mchehab@kernel.org \
    --cc=qiuxu.zhuo@intel.com \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox