Page 1 of 1

2.6.18 patch problems

PostPosted: Sun Sep 24, 2006 2:43 am
by linkfanel
Hello there,

I just tested the last grsecurity-2.1.9-2.6.18-200609222230.patch with my previous .config settings, and it compiles and runs seemingly well, except that I have no log at all on my system! Both klog and syslog don't seem to work, and log files remain empty. Neither do I get grsec-generated logs (such as when time is set) displayed on console after bootup (whereas I get some during bootup). Log system works fine with a not patched 2.6.18 kernel.

So I wanted to try a kernel with no grsec option enabled, but I ran into another problem : kernel fails to compile.

CC arch/i386/kernel/ldt.o
In file included from arch/i386/kernel/ldt.c:21:
include/asm/mmu_context.h: In function 'switch_mm':
include/asm/mmu_context.h:54: error: 'mm_context_t' has no member named 'user_cs_base'
include/asm/mmu_context.h:54: error: 'mm_context_t' has no member named 'user_cs_base'
include/asm/mmu_context.h:55: error: 'mm_context_t' has no member named 'user_cs_limit'
include/asm/mmu_context.h:55: error: 'mm_context_t' has no member named 'user_cs_limit'
make[2]: *** [arch/i386/kernel/ldt.o] Erreur 1
make[1]: *** [arch/i386/kernel] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-2.6.18 »
make: *** [debian/stamp-build-kernel] Erreur 2

.config available at http://andrea.via.ecp.fr/config-2.6.18-grsec_amy

PostPosted: Sun Sep 24, 2006 7:12 am
by amdfanatyk
Code: Select all
CC      arch/i386/mm/pgtable.o
  CC      arch/i386/mm/fault.o
arch/i386/mm/fault.c: In function ‘do_page_fault’:
arch/i386/mm/fault.c:598: error: label ‘out_of_memory’ used but not defined
arch/i386/mm/fault.c:596: error: label ‘do_sigbus’ used but not defined
arch/i386/mm/fault.c: At top level:
arch/i386/mm/fault.c:743: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:770: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:771: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:772: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:773: error: expected declaration specifiers or ‘...’ before string constant
arch/i386/mm/fault.c:773: error: expected declaration specifiers or ‘...’ before ‘regs’
arch/i386/mm/fault.c:773: error: expected declaration specifiers or ‘...’ before ‘error_code’
arch/i386/mm/fault.c:773: warning: data definition has no type or storage class
arch/i386/mm/fault.c:773: warning: type defaults to ‘int’ in declaration of ‘die’
arch/i386/mm/fault.c:773: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:773: error: conflicting types for ‘die’
arch/i386/mm/fault.c:34: error: previous declaration of ‘die’ was here
arch/i386/mm/fault.c:774: error: expected declaration specifiers or ‘...’ before numeric constant
arch/i386/mm/fault.c:774: warning: data definition has no type or storage class
arch/i386/mm/fault.c:774: warning: type defaults to ‘int’ in declaration of ‘bust_spinlocks’
arch/i386/mm/fault.c:774: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:774: error: conflicting types for ‘bust_spinlocks’
arch/i386/mm/fault.c:75: error: previous definition of ‘bust_spinlocks’ was here
arch/i386/mm/fault.c:775: error: expected declaration specifiers or ‘...’ before numeric constant
arch/i386/mm/fault.c:775: warning: data definition has no type or storage class
arch/i386/mm/fault.c:775: warning: type defaults to ‘int’ in declaration of ‘do_exit’
arch/i386/mm/fault.c:775: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:775: error: conflicting types for ‘do_exit’
include/linux/kernel.h:103: error: previous declaration of ‘do_exit’ was here
arch/i386/mm/fault.c:781: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
arch/i386/mm/fault.c:783: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:788: error: expected declaration specifiers or ‘...’ before string constant
arch/i386/mm/fault.c:788: error: expected declaration specifiers or ‘...’ before ‘tsk’
arch/i386/mm/fault.c:788: warning: data definition has no type or storage class
arch/i386/mm/fault.c:788: warning: type defaults to ‘int’ in declaration of ‘printk’
arch/i386/mm/fault.c:788: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:788: error: conflicting types for ‘printk’
arch/i386/mm/fault.c:788: note: a parameter list with an ellipsis can’t match an empty parameter name list declaration
include/linux/kernel.h:145: error: previous declaration of ‘printk’ was here
arch/i386/mm/fault.c:789: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:791: error: expected identifier or ‘(’ before ‘goto’
arch/i386/mm/fault.c:793: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
arch/i386/mm/fault.c:797: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:801: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:804: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:805: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:806: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:807: error: expected declaration specifiers or ‘...’ before numeric constant
arch/i386/mm/fault.c:807: error: expected declaration specifiers or ‘...’ before ‘(’ token
arch/i386/mm/fault.c:807: error: expected declaration specifiers or ‘...’ before ‘address’
arch/i386/mm/fault.c:807: error: expected declaration specifiers or ‘...’ before ‘tsk’
arch/i386/mm/fault.c:807: warning: data definition has no type or storage class
arch/i386/mm/fault.c:807: warning: type defaults to ‘int’ in declaration of ‘force_sig_info_fault’
arch/i386/mm/fault.c:807: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:807: error: conflicting types for ‘force_sig_info_fault’
arch/i386/mm/fault.c:248: error: previous definition of ‘force_sig_info_fault’ was here
arch/i386/mm/fault.c:808: error: expected identifier or ‘(’ before ‘}’ token
make[1]: *** [arch/i386/mm/fault.o] Błąd 1
make: *** [arch/i386/mm] Błąd 2

PostPosted: Mon Sep 25, 2006 7:01 am
by vipernicus
amdfanatyk wrote:
Code: Select all
CC      arch/i386/mm/pgtable.o
  CC      arch/i386/mm/fault.o
arch/i386/mm/fault.c: In function ‘do_page_fault’:
arch/i386/mm/fault.c:598: error: label ‘out_of_memory’ used but not defined
arch/i386/mm/fault.c:596: error: label ‘do_sigbus’ used but not defined
arch/i386/mm/fault.c: At top level:
arch/i386/mm/fault.c:743: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:770: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:771: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:772: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:773: error: expected declaration specifiers or ‘...’ before string constant
arch/i386/mm/fault.c:773: error: expected declaration specifiers or ‘...’ before ‘regs’
arch/i386/mm/fault.c:773: error: expected declaration specifiers or ‘...’ before ‘error_code’
arch/i386/mm/fault.c:773: warning: data definition has no type or storage class
arch/i386/mm/fault.c:773: warning: type defaults to ‘int’ in declaration of ‘die’
arch/i386/mm/fault.c:773: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:773: error: conflicting types for ‘die’
arch/i386/mm/fault.c:34: error: previous declaration of ‘die’ was here
arch/i386/mm/fault.c:774: error: expected declaration specifiers or ‘...’ before numeric constant
arch/i386/mm/fault.c:774: warning: data definition has no type or storage class
arch/i386/mm/fault.c:774: warning: type defaults to ‘int’ in declaration of ‘bust_spinlocks’
arch/i386/mm/fault.c:774: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:774: error: conflicting types for ‘bust_spinlocks’
arch/i386/mm/fault.c:75: error: previous definition of ‘bust_spinlocks’ was here
arch/i386/mm/fault.c:775: error: expected declaration specifiers or ‘...’ before numeric constant
arch/i386/mm/fault.c:775: warning: data definition has no type or storage class
arch/i386/mm/fault.c:775: warning: type defaults to ‘int’ in declaration of ‘do_exit’
arch/i386/mm/fault.c:775: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:775: error: conflicting types for ‘do_exit’
include/linux/kernel.h:103: error: previous declaration of ‘do_exit’ was here
arch/i386/mm/fault.c:781: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
arch/i386/mm/fault.c:783: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:788: error: expected declaration specifiers or ‘...’ before string constant
arch/i386/mm/fault.c:788: error: expected declaration specifiers or ‘...’ before ‘tsk’
arch/i386/mm/fault.c:788: warning: data definition has no type or storage class
arch/i386/mm/fault.c:788: warning: type defaults to ‘int’ in declaration of ‘printk’
arch/i386/mm/fault.c:788: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:788: error: conflicting types for ‘printk’
arch/i386/mm/fault.c:788: note: a parameter list with an ellipsis can’t match an empty parameter name list declaration
include/linux/kernel.h:145: error: previous declaration of ‘printk’ was here
arch/i386/mm/fault.c:789: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:791: error: expected identifier or ‘(’ before ‘goto’
arch/i386/mm/fault.c:793: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
arch/i386/mm/fault.c:797: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:801: error: expected identifier or ‘(’ before ‘if’
arch/i386/mm/fault.c:804: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:805: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:806: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘->’ token
arch/i386/mm/fault.c:807: error: expected declaration specifiers or ‘...’ before numeric constant
arch/i386/mm/fault.c:807: error: expected declaration specifiers or ‘...’ before ‘(’ token
arch/i386/mm/fault.c:807: error: expected declaration specifiers or ‘...’ before ‘address’
arch/i386/mm/fault.c:807: error: expected declaration specifiers or ‘...’ before ‘tsk’
arch/i386/mm/fault.c:807: warning: data definition has no type or storage class
arch/i386/mm/fault.c:807: warning: type defaults to ‘int’ in declaration of ‘force_sig_info_fault’
arch/i386/mm/fault.c:807: warning: function declaration isn’t a prototype
arch/i386/mm/fault.c:807: error: conflicting types for ‘force_sig_info_fault’
arch/i386/mm/fault.c:248: error: previous definition of ‘force_sig_info_fault’ was here
arch/i386/mm/fault.c:808: error: expected identifier or ‘(’ before ‘}’ token
make[1]: *** [arch/i386/mm/fault.o] Błąd 1
make: *** [arch/i386/mm] Błąd 2


Same problem I'm having.

PostPosted: Mon Sep 25, 2006 6:46 pm
by linkfanel
Hi again,

Using the latest grsecurity-2.1.9-2.6.18-200609251756.patch, it looks like my log system gets broken when I enable CONFIG_PAX_MEMORY_UDEREF (even when only this option).

Moreover, I'm still getting compilation errors with my original .config :

Code: Select all
  CC      arch/i386/mm/fault.o
arch/i386/mm/fault.c: In function 'do_page_fault':
arch/i386/mm/fault.c:735: error: expected expression before 'else'
arch/i386/mm/fault.c:811: warning: ISO C90 forbids mixed declarations and code
arch/i386/mm/fault.c:855: error: invalid storage class for function 'pax_handle_fetch_fault'
arch/i386/mm/fault.c:946: error: expected declaration or statement at end of input
make[2]: *** [arch/i386/mm/fault.o] Erreur 1
make[1]: *** [arch/i386/mm] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-2.6.18 »
make: *** [debian/stamp-build-kernel] Erreur 2


I'm using debian sid's gcc 4.1.

PostPosted: Tue Sep 26, 2006 4:48 am
by p1kus
hi, i got such errors with grsecurity-2.1.9-2.6.18-200609251928.patch
CC kernel/sysctl.o
kernel/sysctl.c:190: error: redefinition of `pax_table'
kernel/sysctl.c:175: error: `pax_table' previously defined here
{standard input}: Assembler messages:
{standard input}:47: Error: symbol `pax_table' is already defined
make[1]: *** [kernel/sysctl.o] Error 1
make: *** [kernel] Error 2

PostPosted: Tue Sep 26, 2006 9:20 am
by dr-who
i had the same problem, but with the new patch from date 25-Sep-2006 18:44
Everything is ok, the kernel is now compiling

PostPosted: Tue Sep 26, 2006 5:01 pm
by spender
All problems listed here should be fixed with the latest patch in ~spender.

-Brad

PostPosted: Tue Sep 26, 2006 8:52 pm
by linkfanel
I'm not sure if it is what you meant, but I confirm that my log system is still broken when I enable CONFIG_PAX_MEMORY_UDEREF :)

Here is a strace output of syslogd I could produce : http://andrea.via.ecp.fr/syslogd

PostPosted: Wed Sep 27, 2006 5:30 am
by PaX Team
linkfanel wrote:I'm not sure if it is what you meant, but I confirm that my log system is still broken when I enable CONFIG_PAX_MEMORY_UDEREF :)

Here is a strace output of syslogd I could produce : http://andrea.via.ecp.fr/syslogd
thanks, i fixed the problem (was something in linux itself that UDEREF exposed), new test patch is up, the interdiff should apply to grsec as well.

PostPosted: Wed Sep 27, 2006 2:35 pm
by linkfanel
It is working with the last PaX patch. Thanks!