* kdump, ia64: always reserve elfcore header memory in crash kernel
@ 2008-08-05 9:48 Simon Horman
2008-08-05 9:54 ` Andrew Morton
2008-08-05 12:56 ` Vivek Goyal
0 siblings, 2 replies; 5+ messages in thread
From: Simon Horman @ 2008-08-05 9:48 UTC (permalink / raw)
To: kexec, linux-ia64, linux-kernel; +Cc: Vivek Goyal, Tony Luck, Andrew Morton
elfcore header memory needs to be reserved in a crash kernel.
This means that the relevant code should be protected
by CONFIG_CRASH_DUMP rather than CONFIG_PROC_VMCORE.
Signed-off-by: Simon Horman <horms@verge.net.au>
---
Andrew, this patch fixes bug in the (unlikely) case where
an ia64 crashdump kernel does not have CONFIG_PROC_FS set.
I think it is worth including in 2.6.27. But breakage cases are
likely to be minimal to non-existent, so I am comfortable
with post 2.6.27 too.
This patch should be appended to the series,
"is_kdump_kernel() cleanup and related patches".
http://lists.infradead.org/pipermail/kexec/2008-July/002270.html
Index: linux-2.6/arch/ia64/kernel/efi.c
===================================================================
--- linux-2.6.orig/arch/ia64/kernel/efi.c 2008-08-05 18:31:13.000000000 +1000
+++ linux-2.6/arch/ia64/kernel/efi.c 2008-08-05 18:31:21.000000000 +1000
@@ -1334,7 +1334,7 @@ kdump_find_rsvd_region (unsigned long si
}
#endif
-#ifdef CONFIG_PROC_VMCORE
+#ifdef CONFIG_CRASH_DUMP
/* locate the size find a the descriptor at a certain address */
unsigned long __init
vmcore_find_descriptor_size (unsigned long address)
Index: linux-2.6/arch/ia64/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/ia64/kernel/setup.c 2008-08-05 18:31:20.000000000 +1000
+++ linux-2.6/arch/ia64/kernel/setup.c 2008-08-05 18:31:21.000000000 +1000
@@ -352,7 +352,7 @@ reserve_memory (void)
}
#endif
-#ifdef CONFIG_PROC_VMCORE
+#ifdef CONFIG_CRASH_KERNEL
if (reserve_elfcorehdr(&rsvd_region[n].start,
&rsvd_region[n].end) == 0)
n++;
@@ -496,9 +496,7 @@ static int __init parse_elfcorehdr(char
return 0;
}
early_param("elfcorehdr", parse_elfcorehdr);
-#endif
-#ifdef CONFIG_PROC_VMCORE
int __init reserve_elfcorehdr(unsigned long *start, unsigned long *end)
{
unsigned long length;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kdump, ia64: always reserve elfcore header memory in crash kernel
2008-08-05 9:48 kdump, ia64: always reserve elfcore header memory in crash kernel Simon Horman
@ 2008-08-05 9:54 ` Andrew Morton
2008-08-05 10:14 ` Simon Horman
2008-08-05 12:56 ` Vivek Goyal
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2008-08-05 9:54 UTC (permalink / raw)
To: Simon Horman; +Cc: kexec, linux-ia64, linux-kernel, Vivek Goyal, Tony Luck
On Tue, 5 Aug 2008 19:48:27 +1000 Simon Horman <horms@verge.net.au> wrote:
> elfcore header memory needs to be reserved in a crash kernel.
> This means that the relevant code should be protected
> by CONFIG_CRASH_DUMP rather than CONFIG_PROC_VMCORE.
>
> Signed-off-by: Simon Horman <horms@verge.net.au>
>
> ---
> Andrew, this patch fixes bug in the (unlikely) case where
> an ia64 crashdump kernel does not have CONFIG_PROC_FS set.
> I think it is worth including in 2.6.27. But breakage cases are
> likely to be minimal to non-existent, so I am comfortable
> with post 2.6.27 too.
>
> This patch should be appended to the series,
> "is_kdump_kernel() cleanup and related patches".
hm, that means that we would need to apply a moderate-size seven patch
series to fix one little bug.
I think that if we want to fix this in 2.6.27 then the basic single
patch would be preferable. Or we leave it until 2.6.28/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kdump, ia64: always reserve elfcore header memory in crash kernel
2008-08-05 9:54 ` Andrew Morton
@ 2008-08-05 10:14 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2008-08-05 10:14 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-ia64, Tony Luck, kexec, linux-kernel, Vivek Goyal
On Tue, Aug 05, 2008 at 02:54:42AM -0700, Andrew Morton wrote:
> On Tue, 5 Aug 2008 19:48:27 +1000 Simon Horman <horms@verge.net.au> wrote:
>
> > elfcore header memory needs to be reserved in a crash kernel.
> > This means that the relevant code should be protected
> > by CONFIG_CRASH_DUMP rather than CONFIG_PROC_VMCORE.
> >
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> >
> > ---
> > Andrew, this patch fixes bug in the (unlikely) case where
> > an ia64 crashdump kernel does not have CONFIG_PROC_FS set.
> > I think it is worth including in 2.6.27. But breakage cases are
> > likely to be minimal to non-existent, so I am comfortable
> > with post 2.6.27 too.
> >
> > This patch should be appended to the series,
> > "is_kdump_kernel() cleanup and related patches".
>
> hm, that means that we would need to apply a moderate-size seven patch
> series to fix one little bug.
>
> I think that if we want to fix this in 2.6.27 then the basic single
> patch would be preferable. Or we leave it until 2.6.28/
I think it would be better to wait until 2.6.28 than mess around
with a minimal and then a proper fix. I doubt that anyone is hitting
this.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kdump, ia64: always reserve elfcore header memory in crash kernel
2008-08-05 9:48 kdump, ia64: always reserve elfcore header memory in crash kernel Simon Horman
2008-08-05 9:54 ` Andrew Morton
@ 2008-08-05 12:56 ` Vivek Goyal
2008-08-05 23:47 ` Simon Horman
1 sibling, 1 reply; 5+ messages in thread
From: Vivek Goyal @ 2008-08-05 12:56 UTC (permalink / raw)
To: Simon Horman; +Cc: kexec, linux-ia64, linux-kernel, Tony Luck, Andrew Morton
On Tue, Aug 05, 2008 at 07:48:27PM +1000, Simon Horman wrote:
> elfcore header memory needs to be reserved in a crash kernel.
> This means that the relevant code should be protected
> by CONFIG_CRASH_DUMP rather than CONFIG_PROC_VMCORE.
>
> Signed-off-by: Simon Horman <horms@verge.net.au>
>
> ---
> Andrew, this patch fixes bug in the (unlikely) case where
> an ia64 crashdump kernel does not have CONFIG_PROC_FS set.
> I think it is worth including in 2.6.27. But breakage cases are
> likely to be minimal to non-existent, so I am comfortable
> with post 2.6.27 too.
>
> This patch should be appended to the series,
> "is_kdump_kernel() cleanup and related patches".
>
> http://lists.infradead.org/pipermail/kexec/2008-July/002270.html
>
> Index: linux-2.6/arch/ia64/kernel/efi.c
> ===================================================================
> --- linux-2.6.orig/arch/ia64/kernel/efi.c 2008-08-05 18:31:13.000000000 +1000
> +++ linux-2.6/arch/ia64/kernel/efi.c 2008-08-05 18:31:21.000000000 +1000
> @@ -1334,7 +1334,7 @@ kdump_find_rsvd_region (unsigned long si
> }
> #endif
>
> -#ifdef CONFIG_PROC_VMCORE
> +#ifdef CONFIG_CRASH_DUMP
> /* locate the size find a the descriptor at a certain address */
> unsigned long __init
> vmcore_find_descriptor_size (unsigned long address)
> Index: linux-2.6/arch/ia64/kernel/setup.c
> ===================================================================
> --- linux-2.6.orig/arch/ia64/kernel/setup.c 2008-08-05 18:31:20.000000000 +1000
> +++ linux-2.6/arch/ia64/kernel/setup.c 2008-08-05 18:31:21.000000000 +1000
> @@ -352,7 +352,7 @@ reserve_memory (void)
> }
> #endif
>
> -#ifdef CONFIG_PROC_VMCORE
> +#ifdef CONFIG_CRASH_KERNEL
> if (reserve_elfcorehdr(&rsvd_region[n].start,
> &rsvd_region[n].end) == 0)
> n++;
Hi Simon,
Thanks for the patch. One minor nit. I think compilation will fail
in the case of CONFIG_PROC_VMCORE=n. Because reserve_elfcorehdr will
try to use vmcore_unusabe() which is not available now?
Thanks
Vivek
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kdump, ia64: always reserve elfcore header memory in crash kernel
2008-08-05 12:56 ` Vivek Goyal
@ 2008-08-05 23:47 ` Simon Horman
0 siblings, 0 replies; 5+ messages in thread
From: Simon Horman @ 2008-08-05 23:47 UTC (permalink / raw)
To: Vivek Goyal; +Cc: kexec, linux-ia64, linux-kernel, Tony Luck, Andrew Morton
On Tue, Aug 05, 2008 at 08:56:34AM -0400, Vivek Goyal wrote:
> On Tue, Aug 05, 2008 at 07:48:27PM +1000, Simon Horman wrote:
> > elfcore header memory needs to be reserved in a crash kernel.
> > This means that the relevant code should be protected
> > by CONFIG_CRASH_DUMP rather than CONFIG_PROC_VMCORE.
> >
> > Signed-off-by: Simon Horman <horms@verge.net.au>
> >
> > ---
> > Andrew, this patch fixes bug in the (unlikely) case where
> > an ia64 crashdump kernel does not have CONFIG_PROC_FS set.
> > I think it is worth including in 2.6.27. But breakage cases are
> > likely to be minimal to non-existent, so I am comfortable
> > with post 2.6.27 too.
> >
> > This patch should be appended to the series,
> > "is_kdump_kernel() cleanup and related patches".
> >
> > http://lists.infradead.org/pipermail/kexec/2008-July/002270.html
> >
> > Index: linux-2.6/arch/ia64/kernel/efi.c
> > ===================================================================
> > --- linux-2.6.orig/arch/ia64/kernel/efi.c 2008-08-05 18:31:13.000000000 +1000
> > +++ linux-2.6/arch/ia64/kernel/efi.c 2008-08-05 18:31:21.000000000 +1000
> > @@ -1334,7 +1334,7 @@ kdump_find_rsvd_region (unsigned long si
> > }
> > #endif
> >
> > -#ifdef CONFIG_PROC_VMCORE
> > +#ifdef CONFIG_CRASH_DUMP
> > /* locate the size find a the descriptor at a certain address */
> > unsigned long __init
> > vmcore_find_descriptor_size (unsigned long address)
> > Index: linux-2.6/arch/ia64/kernel/setup.c
> > ===================================================================
> > --- linux-2.6.orig/arch/ia64/kernel/setup.c 2008-08-05 18:31:20.000000000 +1000
> > +++ linux-2.6/arch/ia64/kernel/setup.c 2008-08-05 18:31:21.000000000 +1000
> > @@ -352,7 +352,7 @@ reserve_memory (void)
> > }
> > #endif
> >
> > -#ifdef CONFIG_PROC_VMCORE
> > +#ifdef CONFIG_CRASH_KERNEL
> > if (reserve_elfcorehdr(&rsvd_region[n].start,
> > &rsvd_region[n].end) == 0)
> > n++;
>
> Hi Simon,
>
> Thanks for the patch. One minor nit. I think compilation will fail
> in the case of CONFIG_PROC_VMCORE=n. Because reserve_elfcorehdr will
> try to use vmcore_unusabe() which is not available now?
Yes, sorry. I forgot to send a revised version of the patch that
creates vmcore_unusabe() so that it is present if CONFIG_PROC_VMCORE=n.
I will do so.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2008-08-05 23:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-05 9:48 kdump, ia64: always reserve elfcore header memory in crash kernel Simon Horman
2008-08-05 9:54 ` Andrew Morton
2008-08-05 10:14 ` Simon Horman
2008-08-05 12:56 ` Vivek Goyal
2008-08-05 23:47 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox