Skip to contentSkip to conversation

xen: relax signature check

PATCH Bodo Eggert 3 participants 5 messages Dec 11, 2007 – Dec 12, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Review

Quoted 6 lines · Jeremy Fitzhardinge

Some versions of Xen 3.x set their magic number to "xen-3.[12]", so relax the test to match them.

(quoted diff) +1 -1
-     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 ...

#2 lore raw
In reply to a message not in the archive

Review

Quoted 6 lines · Jeremy Fitzhardinge

Some versions of Xen 3.x set their magic number to "xen-3.[12]", so relax the test to match them.

(quoted diff) +1 -1
-     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 ...

#3 lore raw
Quoted 3 lines · Bodo Eggert

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

#4 lore raw
Quoted 7 lines · Jeremy Fitzhardinge
Quoted 3 lines · Bodo Eggert

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

Quoted 5 lines

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

#5 lore raw
Quoted 4 lines · Anthony Liguori

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