All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Aristeu Rozanski <aris@redhat.com>
Cc: linux-edac@vger.kernel.org, mchehab@kernel.org, arozansk@redhat.com
Subject: Re: [RESEND PATCH] i5000_edac: fix slot number passed to determine_mtr()
Date: Wed, 21 Sep 2022 21:38:06 +0200	[thread overview]
Message-ID: <YytoHtVULW7w3/8Z@zn.tnic> (raw)
In-Reply-To: <20220921181009.oxytvicy6sry6it7@redhat.com>

On Wed, Sep 21, 2022 at 02:10:09PM -0400, Aristeu Rozanski wrote:
> When the logic mapping branch/slot/channel was reworked back in
> 64e1fdaf55d6 ("i5000_edac: Fix the logic that retrieves memory information")
> i5000_init_csrows() was not updated and kept passing twice the number
> of slots to determine_mtr(), which leads to acessing past the end of
> i5000_pvt.b1_mtr[]. This was found by KASAN.
> 
> Fixes: 64e1fdaf55d6 ("i5000_edac: Fix the logic that retrieves memory information")
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Borislav Petkov <bp@suse.de>
> Signed-off-by: Aristeu Rozanski <aris@redhat.com>
> 
> ---
>  drivers/edac/i5000_edac.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> --- linus-2.6.orig/drivers/edac/i5000_edac.c	2022-07-25 15:26:40.093989879 -0400
> +++ linus-2.6/drivers/edac/i5000_edac.c	2022-07-26 14:32:23.644694778 -0400
> @@ -1249,14 +1249,12 @@ static int i5000_init_csrows(struct mem_
>  	struct i5000_pvt *pvt;
>  	struct dimm_info *dimm;
>  	int empty;
> -	int max_csrows;
>  	int mtr;
>  	int csrow_megs;
>  	int channel;
>  	int slot;
>  
>  	pvt = mci->pvt_info;
> -	max_csrows = pvt->maxdimmperch * 2;

So it looks to me like back then, the number of CS rows was twice the
DIMMs per channel, implying two CS rows per DIMM, I guess dual-ranked
DIMMs or so.

Now you're saying the number CS rows is the number of DIMMs. Which
means, single-ranked DIMMs?

But all this is broken as it needs to deal with both single-ranked and
dual-ranked DIMMs elegantly and not assume any DIMM types...

Do we have hardware where we can test this or can we declare this hw for
dead?

Because

https://www.intel.com/content/www/us/en/products/sku/27746/intel-5000p-memory-controller/specifications.html

says launch date Q1 2006 which is a whole another era in IT years.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2022-09-21 19:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 18:10 [RESEND PATCH] i5000_edac: fix slot number passed to determine_mtr() Aristeu Rozanski
2022-09-21 19:38 ` Borislav Petkov [this message]
2022-09-22 13:46   ` Aristeu Rozanski
2022-09-22 13:55     ` Borislav Petkov
2022-09-26 16:51       ` Aristeu Rozanski
2022-09-26 18:02         ` Borislav Petkov
2022-09-28 12:48           ` [PATCH] i5000_edac: mark as BROKEN Aristeu Rozanski
2022-10-17 14:41             ` 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=YytoHtVULW7w3/8Z@zn.tnic \
    --to=bp@alien8.de \
    --cc=aris@redhat.com \
    --cc=arozansk@redhat.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.