* [PATCH] xen: relax signature check
@ 2007-12-10 21:00 Jeremy Fitzhardinge
0 siblings, 0 replies; 5+ messages in thread
From: Jeremy Fitzhardinge @ 2007-12-10 21:00 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Andrew Morton, Linux Kernel Mailing List, Xen-devel
Some versions of Xen 3.x set their magic number to "xen-3.[12]", so
relax the test to match them.
[ Linus: Please apply for 2.6.24. Thanks - J ]
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
---
arch/x86/xen/enlighten.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
===================================================================
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1131,7 +1131,7 @@ asmlinkage void __init xen_start_kernel(
if (!xen_start_info)
return;
- BUG_ON(memcmp(xen_start_info->magic, "xen-3.0", 7) != 0);
+ BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0);
/* Install Xen paravirt ops */
pv_info = xen_info;
^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <9yY38-5oa-11@gated-at.bofh.it>]
* Re: [PATCH] xen: relax signature check
[not found] <9yY38-5oa-11@gated-at.bofh.it>
@ 2007-12-11 15:52 ` Bodo Eggert
2007-12-11 17:16 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 5+ messages in thread
From: Bodo Eggert @ 2007-12-11 15:52 UTC (permalink / raw)
To: Jeremy Fitzhardinge, Linus Torvalds, Andrew Morton,
Linux Kernel Mailing List, Xen-devel
Jeremy Fitzhardinge <jeremy@goop.org> wrote:
> Some versions of Xen 3.x set their magic number to "xen-3.[12]", so
> relax the test to match them.
> - BUG_ON(memcmp(xen_start_info->magic, "xen-3.0", 7) != 0);
> + BUG_ON(memcmp(xen_start_info->magic, "xen-3", 5) != 0);
Not BUG_ON(memcmp(xen_start_info->magic, "xen-3.", 6) != 0); ?
I don't thin Xen version 32 will be compatible ...
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] xen: relax signature check
2007-12-11 15:52 ` Bodo Eggert
@ 2007-12-11 17:16 ` Jeremy Fitzhardinge
2007-12-12 19:14 ` Anthony Liguori
0 siblings, 1 reply; 5+ messages in thread
From: Jeremy Fitzhardinge @ 2007-12-11 17:16 UTC (permalink / raw)
To: 7eggert; +Cc: Linus Torvalds, Andrew Morton, Linux Kernel Mailing List,
Xen-devel
Bodo Eggert wrote:
> Not BUG_ON(memcmp(xen_start_info->magic, "xen-3.", 6) != 0); ?
> I don't thin Xen version 32 will be compatible ...
>
It had better be; if it loads the kernel, it should present a xen-3
compatible ABI.
But this is just a sanity check to make sure things are basically OK;
BUG_ON is hardly nice error reporting (not that there's much else we can
do at that point).
J
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] xen: relax signature check
2007-12-11 17:16 ` Jeremy Fitzhardinge
@ 2007-12-12 19:14 ` Anthony Liguori
2007-12-12 19:36 ` Jeremy Fitzhardinge
0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2007-12-12 19:14 UTC (permalink / raw)
To: Jeremy Fitzhardinge
Cc: 7eggert, Andrew Morton, Xen-devel, Linus Torvalds,
Linux Kernel Mailing List
Jeremy Fitzhardinge wrote:
> Bodo Eggert wrote:
>> Not BUG_ON(memcmp(xen_start_info->magic, "xen-3.", 6) != 0); ?
>> I don't thin Xen version 32 will be compatible ...
>>
>
> It had better be; if it loads the kernel, it should present a xen-3
> compatible ABI.
If xen-32.0 should be compatible than wouldn't xen-24.0 be compatible
too? I think the point was that you should either be checking for
'xen-3.x' or something more general that would accept anything >= xen-3.0.
Regards,
Anthony Liguori
> But this is just a sanity check to make sure things are basically OK;
> BUG_ON is hardly nice error reporting (not that there's much else we can
> do at that point).
>
> J
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xen: relax signature check
2007-12-12 19:14 ` Anthony Liguori
@ 2007-12-12 19:36 ` Jeremy Fitzhardinge
0 siblings, 0 replies; 5+ messages in thread
From: Jeremy Fitzhardinge @ 2007-12-12 19:36 UTC (permalink / raw)
To: Anthony Liguori
Cc: 7eggert, Andrew Morton, Xen-devel, Linus Torvalds,
Linux Kernel Mailing List
Anthony Liguori wrote:
> If xen-32.0 should be compatible than wouldn't xen-24.0 be compatible
> too? I think the point was that you should either be checking for
> 'xen-3.x' or something more general that would accept anything >=
> xen-3.0.
The signature is supposed to be an ABI signature, so regardless of the
actual hypervisor version, it should always present "xen-3.0"
(presumably backwards compat if it also supports other versions of the
ABI). There was a bug in some versions where it puts the actual
hypervisor version in there, requiring this patch. Technically that
means that looking for "xen-3." is more accurate, but frankly not
important enough to bother raising a patch over.
J
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-12-12 19:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-10 21:00 [PATCH] xen: relax signature check Jeremy Fitzhardinge
[not found] <9yY38-5oa-11@gated-at.bofh.it>
2007-12-11 15:52 ` Bodo Eggert
2007-12-11 17:16 ` Jeremy Fitzhardinge
2007-12-12 19:14 ` Anthony Liguori
2007-12-12 19:36 ` Jeremy Fitzhardinge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox