All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Dmitry Lavnikevich <d.lavnikevich@sam-solutions.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/2] memtest: fix 4GB overflow fail
Date: Tue, 27 Jan 2015 09:10:46 +0100	[thread overview]
Message-ID: <20150127081046.GU12209@pengutronix.de> (raw)
In-Reply-To: <54C6204F.5060908@sam-solutions.com>

On Mon, Jan 26, 2015 at 02:09:03PM +0300, Dmitry Lavnikevich wrote:
> On 26/01/15 12:09, Sascha Hauer wrote:
> >(Adding Alexander Aring)
> >@@ -107,8 +106,8 @@ static int request_memtest_regions(struct list_head *list)
> >  		r = list_last_entry(&bank->res->children,
> >  				     struct resource, sibling);
> >  		start = PAGE_ALIGN(r->end);
> still here we have overflow.
> Last region (stack) on 4GB systems ends on 0xfffffff7. So aligned
> up, start=0x00000000.
> After that
> >-		end = PAGE_ALIGN_DOWN(bank->res->end) - 1;
> >-		size = end - start + 1;
> >+		end = bank->res->end;
> >+		size = PAGE_ALIGN_DOWN(end - start + 1);
> >  		if (start < end) {
> This check detects that there are some space after last region
> (start=0x00000000) till end of bank (0xffffffff) and then
> >  			ret = alloc_memtest_region(list, start, size);
> >  			if (ret < 0)
> fails to allocate region from 0x00000000 for size 0x00000000.

Ok, so your original patch is still necessary. I applied both my patch
and yours to -next.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2015-01-27  8:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23 11:41 [PATCH 1/2] memtest: fix 4GB overflow fail Dmitry Lavnikevich
2015-01-23 11:48 ` [PATCH 2/2] dts:imx6:pfla02: Align nand partitions by 512k Dmitry Lavnikevich
2015-01-27  8:09   ` Sascha Hauer
2015-01-27  9:35     ` Christian Hemp
2015-01-27  9:39       ` Dmitry Lavnikevich
2015-01-26  9:09 ` [PATCH 1/2] memtest: fix 4GB overflow fail Sascha Hauer
2015-01-26 11:09   ` Dmitry Lavnikevich
2015-01-27  8:10     ` Sascha Hauer [this message]

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=20150127081046.GU12209@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=d.lavnikevich@sam-solutions.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 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.