WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] grsecurity +XEN w/o HVM

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] grsecurity +XEN w/o HVM
From: "John Anderson" <johnha@xxxxxxxxxx>
Date: Mon, 26 Jun 2006 17:05:25 -0700
Delivery-date: Mon, 26 Jun 2006 17:05:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcaZfWRpPhevHeNbQ1Orb0nAkahgGg==
Thread-topic: grsecurity +XEN w/o HVM

Greetings,

 

I’ve undertaken a small task of porting grsecurity-2.1.9 to xen-3.0-testing.  I’ve never done any sort of OS or kernel development before, so it’s pretty daunting.  So far I’ve been able to compile an i386 kernel and compile and boot an x86_64 kernel with some of the grsec/PAX features working.  I’m pretty sure that PAX_RANDSTACK is not working though because of CONFIG_X86_NO_TSS.  The function the grsecurity patch adds to arch/i386/kernel/process.c is:

 

#ifdef CONFIG_PAX_RANDKSTACK

asmlinkage void pax_randomize_kstack(void)

{

       struct tss_struct *tss = init_tss + smp_processor_id();

       unsigned long time;

 

       if (!randomize_va_space)

              return;

 

       rdtscl(time);

 

       /* P4 seems to return a 0 LSB, ignore it */

#ifdef CONFIG_MPENTIUM4

       time &= 0x1EUL;

       time <<= 2;

else

       time &= 0xFUL;

       time <<= 3;

#endif

       tss->esp0 ^= time;

       current->thread.esp0 = tss->esp0;

}

#endif

 

I surrounded the tss_struct declaration and the tss->esp0/current->thread.esp0 assignments with #ifdef CONFIG_X86_NO_TSS lines to get the kernel to compile.  That completely defeats the purpose of this function which is to randomize the kernel stack.  What is available in Xen that is comparable to the capacity that struct tss_struct is used in if CONFIG_X86_NO_TSS is defined?

 

Any ideas would be greatly appreciated.

 

For reference GRSecurity is available at www.grsecurity.net.

 

Thanks,

 

John A.

 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>