linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2]arm64:move elfcorehdr reservation early for crash dump kernel
@ 2019-12-30  8:31 Poonam Aggrwal
  2020-01-18  4:31 ` Poonam Aggrwal
  0 siblings, 1 reply; 2+ messages in thread
From: Poonam Aggrwal @ 2019-12-30  8:31 UTC (permalink / raw)
  To: takahiro.akashi, linux-arm-kernel; +Cc: Poonam Aggrwal, Nikhil Gupta

on some SOCs, elfcorehdr address may overlap with the address of reserved
memory allocated using early_init_fdt_scan_reserved_mem 

Reviewed-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
Signed-off-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
---
Overlaps seen on LS1043A SoC:
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000f7c00000, size 4 MiB
[    0.000000] OF: reserved mem: initialized node qman-fqd, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000f4000000, size 32 MiB
[    0.000000] OF: reserved mem: initialized node qman-pfdr, compatible id shared-dma-pool
[    0.000000] Reserved memory: created DMA memory pool at 0x00000000f6000000, size 16 MiB
[    0.000000] OF: reserved mem: initialized node bman-fbpr, compatible id shared-dma-pool
[    0.000000] Reserving 1KB of memory at 0xf7fff000 for elfcorehdr

panic in elfcorehdr_read:
[    0.443984] Unable to handle kernel paging request at virtual address ffff000037fff000
[    0.451942] Mem abort info:
[    0.454740]   ESR = 0x96000006
[    0.457806]   EC = 0x25: DABT (current EL), IL = 32 bits
[    0.463142]   SET = 0, FnV = 0
[    0.466202]   EA = 0, S1PTW = 0
[    0.469353] Data abort info:
[    0.472243]   ISV = 0, ISS = 0x00000006
[    0.476094]   CM = 0, WnR = 0
[    0.479072] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000000d9373000
[    0.485806] [ffff000037fff000] pgd=00000000f7bf7003, pud=00000000f7bf6003, pmd=0000000000000000
[    0.494553] Internal error: Oops: 96000006 [#1] PREEMPT SMP
[    0.500146] Modules linked in:
[    0.503211] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc3-00062-gbf8d1cd #5
[    0.510725] Hardware name: LS1043A RDB Board (DT)
[    0.515446] pstate: 80000005 (Nzcv daif -PAN -UAO)
[    0.520260] pc : __memcpy+0x78/0x180
[    0.523847] lr : elfcorehdr_read+0x28/0x38
<snip>
[    0.611262] Call trace:
[    0.613713]  __memcpy+0x78/0x180
[    0.616950]  vmcore_init+0x70/0x534
 arch/arm64/mm/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
index b65dffd..e610180 100644
--- a/arch/arm64/mm/init.c
+++ b/arch/arm64/mm/init.c
@@ -438,6 +438,8 @@ void __init arm64_memblock_init(void)
 		initrd_end = initrd_start + phys_initrd_size;
 	}
 
+	reserve_elfcorehdr();
+
 	early_init_fdt_scan_reserved_mem();
 
 	if (IS_ENABLED(CONFIG_ZONE_DMA)) {
@@ -452,8 +454,6 @@ void __init arm64_memblock_init(void)
 
 	reserve_crashkernel();
 
-	reserve_elfcorehdr();
-
 	high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
 
 	dma_contiguous_reserve(arm64_dma32_phys_limit);
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH v2]arm64:move elfcorehdr reservation early for crash dump kernel
  2019-12-30  8:31 [PATCH v2]arm64:move elfcorehdr reservation early for crash dump kernel Poonam Aggrwal
@ 2020-01-18  4:31 ` Poonam Aggrwal
  0 siblings, 0 replies; 2+ messages in thread
From: Poonam Aggrwal @ 2020-01-18  4:31 UTC (permalink / raw)
  To: Poonam Aggrwal, takahiro.akashi, linux-arm-kernel; +Cc: Nikhil Gupta

Hello Akashi

Can you please help review.

Regards
Poonam
> -----Original Message-----
> From: Poonam Aggrwal <poonam.aggrwal@nxp.com>
> Sent: Monday, December 30, 2019 2:01 PM
> To: takahiro.akashi@linaro.org; linux-arm-kernel@lists.infradead.org
> Cc: Nikhil Gupta <nikhil.gupta@nxp.com>; Poonam Aggrwal
> <poonam.aggrwal@nxp.com>
> Subject: [PATCH v2]arm64:move elfcorehdr reservation early for crash dump
> kernel
> 
> on some SOCs, elfcorehdr address may overlap with the address of reserved
> memory allocated using early_init_fdt_scan_reserved_mem
> 
> Reviewed-by: Prabhakar Kushwaha <pkushwaha@marvell.com>
> Signed-off-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
> ---
> Overlaps seen on LS1043A SoC:
> [    0.000000] Reserved memory: created DMA memory pool at
> 0x00000000f7c00000, size 4 MiB
> [    0.000000] OF: reserved mem: initialized node qman-fqd, compatible id
> shared-dma-pool
> [    0.000000] Reserved memory: created DMA memory pool at
> 0x00000000f4000000, size 32 MiB
> [    0.000000] OF: reserved mem: initialized node qman-pfdr, compatible id
> shared-dma-pool
> [    0.000000] Reserved memory: created DMA memory pool at
> 0x00000000f6000000, size 16 MiB
> [    0.000000] OF: reserved mem: initialized node bman-fbpr, compatible id
> shared-dma-pool
> [    0.000000] Reserving 1KB of memory at 0xf7fff000 for elfcorehdr
> 
> panic in elfcorehdr_read:
> [    0.443984] Unable to handle kernel paging request at virtual address
> ffff000037fff000
> [    0.451942] Mem abort info:
> [    0.454740]   ESR = 0x96000006
> [    0.457806]   EC = 0x25: DABT (current EL), IL = 32 bits
> [    0.463142]   SET = 0, FnV = 0
> [    0.466202]   EA = 0, S1PTW = 0
> [    0.469353] Data abort info:
> [    0.472243]   ISV = 0, ISS = 0x00000006
> [    0.476094]   CM = 0, WnR = 0
> [    0.479072] swapper pgtable: 4k pages, 48-bit VAs,
> pgdp=00000000d9373000
> [    0.485806] [ffff000037fff000] pgd=00000000f7bf7003,
> pud=00000000f7bf6003, pmd=0000000000000000
> [    0.494553] Internal error: Oops: 96000006 [#1] PREEMPT SMP
> [    0.500146] Modules linked in:
> [    0.503211] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc3-00062-
> gbf8d1cd #5
> [    0.510725] Hardware name: LS1043A RDB Board (DT)
> [    0.515446] pstate: 80000005 (Nzcv daif -PAN -UAO)
> [    0.520260] pc : __memcpy+0x78/0x180
> [    0.523847] lr : elfcorehdr_read+0x28/0x38
> <snip>
> [    0.611262] Call trace:
> [    0.613713]  __memcpy+0x78/0x180
> [    0.616950]  vmcore_init+0x70/0x534
>  arch/arm64/mm/init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index
> b65dffd..e610180 100644
> --- a/arch/arm64/mm/init.c
> +++ b/arch/arm64/mm/init.c
> @@ -438,6 +438,8 @@ void __init arm64_memblock_init(void)
>  		initrd_end = initrd_start + phys_initrd_size;
>  	}
> 
> +	reserve_elfcorehdr();
> +
>  	early_init_fdt_scan_reserved_mem();
> 
>  	if (IS_ENABLED(CONFIG_ZONE_DMA)) {
> @@ -452,8 +454,6 @@ void __init arm64_memblock_init(void)
> 
>  	reserve_crashkernel();
> 
> -	reserve_elfcorehdr();
> -
>  	high_memory = __va(memblock_end_of_DRAM() - 1) + 1;
> 
>  	dma_contiguous_reserve(arm64_dma32_phys_limit);
> --
> 2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-18  4:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-30  8:31 [PATCH v2]arm64:move elfcorehdr reservation early for crash dump kernel Poonam Aggrwal
2020-01-18  4:31 ` Poonam Aggrwal

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).