Page 1 of 1

grsecurity-2.1.14-2.6.32.10 - MODULES disabled

PostPosted: Thu Mar 25, 2010 11:38 am
by Pommi
Hi,

I'm having problems compiling a 2.6.32.10 kernel (i386) using the latest stable grsecurity patch (grsecurity-2.1.14-2.6.32.10-201003211638.patch).

The following error occurs in the final stages of compiling the kernel:
Code: Select all
  LD      init/built-in.o
  LD      .tmp_vmlinux1
kernel/built-in.o: In function `is_ksym_addr':
kallsyms.c:(.text+0x2f7d3): undefined reference to `MODULES_EXEC_VADDR'
kallsyms.c:(.text+0x2f7dd): undefined reference to `MODULES_EXEC_END'
make: *** [.tmp_vmlinux1] Error 1

Loadable module support is disabled in my configuration. This may be the cause of the problem.

After replacing line 79 in kernel/kallsyms.c
Code: Select all
#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)

to
Code: Select all
#if defined(CONFIG_MODULES) && defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)

the compilation finished succesfully. I'm not an expert but I think this is a bug. Is this the right solution to fix this problem?

Re: grsecurity-2.1.14-2.6.32.10 - MODULES disabled

PostPosted: Thu Mar 25, 2010 3:06 pm
by PaX Team
Pommi wrote:Loadable module support is disabled in my configuration. This may be the cause of the problem.

After replacing line 79 in kernel/kallsyms.c
Code: Select all
#if defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)

to
Code: Select all
#if defined(CONFIG_MODULES) && defined(CONFIG_X86_32) && defined(CONFIG_PAX_KERNEXEC)

the compilation finished succesfully. I'm not an expert but I think this is a bug. Is this the right solution to fix this problem?
yes, that's the problem but the fix is not correct, you only want the #ifdef MODULES for the first 'if' using those two symbols, not the whole block. in any case, i'll fix it in the next patch, thanks for reporting.

Re: grsecurity-2.1.14-2.6.32.10 - MODULES disabled

PostPosted: Tue Apr 06, 2010 2:30 pm
by grebneke
Was this really fixed, I'm having the same problem using grsecurity-2.1.14-2.6.33.2-201004051743.patch and grsecurity-2.1.14-2.6.32.11-201004051743.patch

I can try to hack like the OP but since that was not entirely correct I'd rather have the official solution!

Regards,
/Johan

Re: grsecurity-2.1.14-2.6.32.10 - MODULES disabled

PostPosted: Tue Apr 06, 2010 9:21 pm
by PaX Team
grebneke wrote:Was this really fixed, I'm having the same problem using grsecurity-2.1.14-2.6.33.2-201004051743.patch and grsecurity-2.1.14-2.6.32.11-201004051743.patch
uh, now it is ;), somehow i managed to lose that chunk in one of the trees, sorry about it.