From d17f8c50493a7f2a36b97f8e1fa9f64fc83babd1 Mon Sep 17 00:00:00 2001 From: John Reiser Date: Mon, 2 Jul 2007 12:48:14 -0700 Subject: [PATCH] linux-2.6.21.5 CONFIG_PARAVIRT --- src/p_vmlinz.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/p_vmlinz.cpp b/src/p_vmlinz.cpp index 0a485637..44813160 100644 --- a/src/p_vmlinz.cpp +++ b/src/p_vmlinz.cpp @@ -213,10 +213,14 @@ int PackVmlinuzI386::decompressKernel() // see /usr/src/linux/arch/i386/kernel/head.S - // 2.4.x: cld; mov $...,%eax - if (memcmp(ibuf, "\xFC\xB8", 2) == 0) goto head_ok; - // 2.6.x: cld; lgdt ... - if (memcmp(ibuf, "\xFC\x0F\x01", 3) == 0) goto head_ok; + // 2.4.x: [cli;] cld; mov $...,%eax + if (memcmp(ibuf, "\xFC\xB8", 2) == 0) goto head_ok; + if (memcmp(ibuf, "\xFA\xFC\xB8", 3) == 0) goto head_ok; + // 2.6.x: [cli;] cld; lgdt ... + if (memcmp(ibuf, "\xFC\x0F\x01", 3) == 0) goto head_ok; + if (memcmp(ibuf, "\xFA\xFC\x0F\x01", 4) == 0) goto head_ok; + // 2.6.21.5 CONFIG_PARAVIRT mov %cs,%eax; test $3,%eax; jne ...; + if (memcmp(ibuf, "\x8c\xc8\xa9\x03\x00\x00\x00\x0f\x85", 9) == 0) goto head_ok; // 2.6.x+grsecurity+strongswan+openwall+trustix: ljmp $0x10,... if (ibuf[0] == 0xEA && memcmp(ibuf+5, "\x10\x00", 2) == 0) goto head_ok; // x86_64 2.6.x