linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	npiggin@gmail.com, benh@kernel.crashing.org, paulus@samba.org
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org
Subject: Re: [1/2] powerpc/mm: Check memblock_add against MAX_PHYSMEM_BITS range
Date: Tue, 24 Jul 2018 23:59:50 +1000 (AEST)	[thread overview]
Message-ID: <41Zg3B6ywcz9s1x@ozlabs.org> (raw)
In-Reply-To: <20180621083158.30849-1-aneesh.kumar@linux.ibm.com>

On Thu, 2018-06-21 at 08:31:57 UTC, "Aneesh Kumar K.V" wrote:
> With SPARSEMEM config enabled, we make sure that we don't add sections beyond
> MAX_PHYSMEM_BITS range. This results in not building vmemmap mapping for
> range beyond max range. But our memblock layer looks the device tree and create
> mapping for the full memory range. Prevent this by checking against
> MAX_PHSYSMEM_BITS when doing memblock_add.
> 
> We don't do similar check for memeblock_reserve_range. If reserve range is beyond
> MAX_PHYSMEM_BITS we expect that to be configured with 'nomap'. Any other
> reserved range should come from existing memblock ranges which we already
> filtered while adding.
> 
> This avoids crash as below when running on a system with system ram config above
> MAX_PHSYSMEM_BITS
> 
>  Unable to handle kernel paging request for data at address 0xc00a001000000440
>  Faulting instruction address: 0xc000000001034118
>  cpu 0x0: Vector: 300 (Data Access) at [c00000000124fb30]
>      pc: c000000001034118: __free_pages_bootmem+0xc0/0x1c0
>      lr: c00000000103b258: free_all_bootmem+0x19c/0x22c
>      sp: c00000000124fdb0
>     msr: 9000000002001033
>     dar: c00a001000000440
>   dsisr: 40000000
>    current = 0xc00000000120dd00
>    paca    = 0xc000000001f60000^I irqmask: 0x03^I irq_happened: 0x01
>      pid   = 0, comm = swapper
>  [c00000000124fe20] c00000000103b258 free_all_bootmem+0x19c/0x22c
>  [c00000000124fee0] c000000001010a68 mem_init+0x3c/0x5c
>  [c00000000124ff00] c00000000100401c start_kernel+0x298/0x5e4
>  [c00000000124ff90] c00000000000b57c start_here_common+0x1c/0x520
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/6aba0c84ec474534bbae3675e95464

cheers

      parent reply	other threads:[~2018-07-24 13:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-21  8:31 [PATCH 1/2] powerpc/mm: Check memblock_add against MAX_PHYSMEM_BITS range Aneesh Kumar K.V
2018-06-21  8:31 ` [PATCH 2/2] powerpc/mm: Increase MAX_PHYSMEM_BITS to 128TB with SPARSEMEM_VMEMMAP config Aneesh Kumar K.V
2018-06-21 11:32   ` Balbir Singh
2018-06-21 15:42     ` Aneesh Kumar K.V
2018-06-21 15:43     ` Aneesh Kumar K.V
2018-07-24 13:59 ` Michael Ellerman [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=41Zg3B6ywcz9s1x@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).