PaX build error 2.6.25.6

Discuss usability issues, general maintenance, and general support issues for a grsecurity-enabled system.

PaX build error 2.6.25.6

Postby cormander » Thu Jun 12, 2008 4:34 pm

Patching a vanilla 2.6.25.6 kernel with pax-linux-2.6.25.6-test23.patch produces this build error:

CC arch/x86/kernel/x8664_ksyms_64.o
arch/x86/kernel/x8664_ksyms_64.c:60: error: 'cpu_gdt_descr' undeclared here (not in a function)
arch/x86/kernel/x8664_ksyms_64.c:60: warning: type defaults to 'int' in declaration of 'cpu_gdt_descr'
make[1]: *** [arch/x86/kernel/x8664_ksyms_64.o] Error 1
make: *** [arch/x86/kernel] Error 2


This is on an AMD 64 CPU. A build on a 32bit CPU obvious doesn't have this problem.
cormander
 
Posts: 154
Joined: Tue Jan 29, 2008 12:51 pm

Re: PaX build error 2.6.25.6

Postby cormander » Fri Jun 13, 2008 1:44 pm

Looks like this only happens when CONFIG_PARAVIRT is set; and all 2.6.25 patches are affected.

PaX modifies include/asm-x86/desc.h and removes this line:

extern struct desc_ptr cpu_gdt_descr[];

I had a look through the xen paravirt_ops patches and don't see cpu_gdt_descr used anywhere specifically - think you should remove the symbol export in the ksyms since you remove it anyway?

--- a/arch/x86/kernel/x8664_ksyms_64.c 2008-06-13 10:50:12.000000000 -0400
+++ b/arch/x86/kernel/x8664_ksyms_64.c 2008-06-13 10:50:17.000000000 -0400
@@ -54,8 +54,3 @@
EXPORT_SYMBOL(load_gs_index);

EXPORT_SYMBOL(_proxy_pda);
-
-#ifdef CONFIG_PARAVIRT
-/* Virtualized guests may want to use it */
-EXPORT_SYMBOL_GPL(cpu_gdt_descr);
-#endif


I know that it may not be talking specifically about xen paravirt here - but removing these few lines in the 2.6.25-xen kernel from fedora doesn't appear to break anything.

This appears to be the only build issue on 64bit with 2.6.25... I'll run some tests and post back when I'm done.
cormander
 
Posts: 154
Joined: Tue Jan 29, 2008 12:51 pm

Re: PaX build error 2.6.25.6

Postby PaX Team » Sat Jun 14, 2008 6:42 pm

cormander wrote:I had a look through the xen paravirt_ops patches and don't see cpu_gdt_descr used anywhere specifically - think you should remove the symbol export in the ksyms since you remove it anyway?
yes, that's exactly what i did in -test24 now. can you test it?
PaX Team
 
Posts: 2310
Joined: Mon Mar 18, 2002 4:35 pm

Re: PaX build error 2.6.25.6

Postby cormander » Wed Jun 18, 2008 2:50 pm

Sorry for the belayed response - yes the test24 (and test26 too) compile and work on my AMD64

Thanks a ton!

As far as actually running pax as a xen domU goes ... still working out the kinks there. I'll keep you posted.
cormander
 
Posts: 154
Joined: Tue Jan 29, 2008 12:51 pm


Return to grsecurity support