Crash Dump Region
Hi,
I am currently looking over the code that places the crashdump region into /proc/iomem, and the code that determines its base address if it is not passed on the kernel comamnd. It seems to me that the current code allows the crashkernel to be placed incide a /proc/iomem region of any type. Is this behaviour correct? If not, should it be restricted to "System RAM" regions?
Signature · 3 lines
Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/
Quoted 7 lines
-----Original Message-----
From: Horms [mailto:[email protected]]
Sent: 2007Äê3ÔÂ6ÈÕ 9:57
To: Zou, Nanhai
Cc: Linux-IA64; fastboot
Subject: Crash Dump Region
Quoted 9 lines
Hi,
I am currently looking over the code that places the crashdump region into
/proc/iomem, and the code that determines its base address if it is not passed on the kernel comamnd. It seems to me that the current code allows the crashkernel to be placed incide a/proc/iomemregion of any type. Is this behaviour correct? If not, should it be restricted to "System RAM" regions?
I not sure if I understand your question.
Kernel will find a big enough region inside efi memmap with WB attribute, excluding all the other reserved regions.
Zou Nanhai.
Quoted 4 lines
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
Quoted 23 lines
-----Original Message-----
From: Zou, Nanhai
Sent: 2007年3月6日 10:11
To: 'Horms'
Cc: Linux-IA64; fastboot
Subject: RE: Crash Dump RegionQuoted 7 lines
-----Original Message-----
From: Horms [mailto:[email protected]]
Sent: 2007年3月6日 9:57
To: Zou, Nanhai
Cc: Linux-IA64; fastboot
Subject: Crash Dump RegionQuoted 9 lines
Hi,
I am currently looking over the code that places the crashdump region into
/proc/iomem, and the code that determines its base address if it is not passed on the kernel comamnd. It seems to me that the current code allows the crashkernel to be placed incide a/proc/iomemregion of any type. Is this behaviour correct? If not, should it be restricted to "System RAM" regions?
Quoted 4 lines
I not sure if I understand your question.
Kernel will find a big enough region inside efi memmap with WB attribute,
excluding all the other reserved regions.
Oh,
You mean we should check is_memory_available(md) instead of only check efi_wb(md) in kdump_find_rsvd_region?
Yes, I think that is better.
Thanks
Zou Nanhai
Quoted 6 lines
Zou Nanhai.
Quoted 4 lines
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 14 lines · Horms
Hi,
I am currently looking over the code that places the crashdump region into
/proc/iomem, and the code that determines its base address if it is not passed on the kernel comamnd. It seems to me that the current code allows the crashkernel to be placed incide a/proc/iomemregion of any type. Is this behaviour correct? If not, should it be restricted to "System RAM" regions?Signature · 3 lines
Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/
Please review the patch.
Thanks
Zou Nan hai
arch/ia64/kernel/efi.c +1 -1
@@ -1154,7 +1154,7 @@ kdump_find_rsvd_region (unsigned long sifor (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { md = p; -if (!efi_wb (md)) +if (!is_memory_available (md))continue ; start =ALIGN (md->phys_addr, alignment); end =efi_md_end (md);
Quoted 23 lines · Nanhai
Quoted 23 lines
-----Original Message-----
From: Zou, Nanhai
Sent: 2007年3月6日 10:11
To: 'Horms'
Cc: Linux-IA64; fastboot
Subject: RE: Crash Dump RegionQuoted 16 lines
-----Original Message-----
From: Horms [mailto:[email protected]]
Sent: 2007年3月6日 9:57
To: Zou, Nanhai
Cc: Linux-IA64; fastboot
Subject: Crash Dump RegionHi,
I am currently looking over the code that places the crashdump region into
/proc/iomem, and the code that determines its base address if it is not passed on the kernel comamnd. It seems to me that the current code allows the crashkernel to be placed incide a/proc/iomemregion of any type. Is this behaviour correct? If not, should it be restricted to "System RAM" regions?
Quoted 7 lines
Quoted 4 lines
I not sure if I understand your question.
Kernel will find a big enough region inside efi memmap with WB attribute,
excluding all the other reserved regions.Oh,
You mean we should checkis_memory_available(md)instead of only checkefi_wb(md)inkdump_find_rsvd_region?
Yes, I think that is better.
Thanks.
I had missed the efi_wb(), which was the cause of some confusion on my part. But as you suggest, is_memory_available() probaly is better, I'll comment on your patch separately.
However, what I am more worried about is the case where the base address is passed by the end-user, in which case it seems that some kind of check should be added to efi_initialize_iomem_resources().
A quick check on my tiger2 box shows that the following is possible. I know its a silly example, but I think it does demonstrate the problem that I was trying to explain in my intial email. And I think that you have answered my question - this is not correct
crashkernel=1k@520k
00082000-00083fff : reserved
00082000-000823ff : Crash kernel
I'll make a patch to fix this up if you have no objections.
Signature · 3 lines
Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/
Horms
Acked-byQuoted 11 lines · Zou Nan hai
Quoted 8 lines · Horms
Hi,
I am currently looking over the code that places the crashdump region into
/proc/iomem, and the code that determines its base address if it is not passed on the kernel comamnd. It seems to me that the current code allows the crashkernel to be placed incide a/proc/iomemregion of any type. Is this behaviour correct? If not, should it be restricted to "System RAM" regions?Please review the patch.
This looks good to me.
Quoted 18 lines
Thanks
Zou Nan haiSigned-off-by Zou Nan hai <[email protected]>arch/ia64/kernel/efi.c +1
-1@@ -1154,7 +1154,7 @@ kdump_find_rsvd_region (unsigned long sifor (p = efi_map_start; p < efi_map_end; p += efi_desc_size) { md = p; -if (!efi_wb (md)) +if (!is_memory_available (md))continue ; start =ALIGN (md->phys_addr, alignment); end =efi_md_end (md);
Signature · 3 lines
Horms H: http://www.vergenet.net/~horms/ W: http://www.valinux.co.jp/en/