* [PATCH] x86/xen: panic on bad Xen-provided memory map
@ 2014-10-17 3:48 Martin Kelly
2014-10-17 12:46 ` [Xen-devel] " David Vrabel
0 siblings, 1 reply; 2+ messages in thread
From: Martin Kelly @ 2014-10-17 3:48 UTC (permalink / raw)
To: david.vrabel, xen-devel, x86, linux-kernel
Cc: konrad.wilk, boris.ostrovsky, tglx, mingo, Martin Kelly,
Martin Kelly
Panic if Xen provides a memory map with 0 entries. Although this is
unlikely, it is better to catch the error at the point of seeing the map
than later on as a symptom of some other crash.
Signed-off-by: Martin Kelly <martkell@amazon.com>
---
arch/x86/xen/setup.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
index af72161..29834b3 100644
--- a/arch/x86/xen/setup.c
+++ b/arch/x86/xen/setup.c
@@ -595,6 +595,7 @@ char * __init xen_memory_setup(void)
rc = 0;
}
BUG_ON(rc);
+ BUG_ON(memmap.nr_entries == 0);
/*
* Xen won't allow a 1:1 mapping to be created to UNUSABLE
--
2.1.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Xen-devel] [PATCH] x86/xen: panic on bad Xen-provided memory map
2014-10-17 3:48 [PATCH] x86/xen: panic on bad Xen-provided memory map Martin Kelly
@ 2014-10-17 12:46 ` David Vrabel
0 siblings, 0 replies; 2+ messages in thread
From: David Vrabel @ 2014-10-17 12:46 UTC (permalink / raw)
To: Martin Kelly, david.vrabel, xen-devel, x86, linux-kernel
Cc: mingo, Martin Kelly, boris.ostrovsky, tglx
On 17/10/14 04:48, Martin Kelly wrote:
> Panic if Xen provides a memory map with 0 entries. Although this is
> unlikely, it is better to catch the error at the point of seeing the map
> than later on as a symptom of some other crash.
Applied, thanks.
David
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-17 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-17 3:48 [PATCH] x86/xen: panic on bad Xen-provided memory map Martin Kelly
2014-10-17 12:46 ` [Xen-devel] " David Vrabel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox