Page 1 of 1

Compile error - fs/proc/array.c - 2.4.32 grsec-2.1.8

PostPosted: Wed Apr 12, 2006 12:04 pm
by marcaurel
Hello.

When building 2.4.32 kernel with lastest grsec I got error like this:

array.c: In function `proc_pid_stat':
array.c:371: error: structure has no member named `pax_flags'
array.c:371: error: structure has no member named `pax_flags'
array.c:423: error: structure has no member named `pax_flags'
array.c:423: error: structure has no member named `pax_flags'
array.c:424: error: structure has no member named `pax_flags'
array.c:424: error: structure has no member named `pax_flags'
array.c:425: error: structure has no member named `pax_flags'
array.c:425: error: structure has no member named `pax_flags'
array.c: In function `show_map':
array.c:583: error: structure has no member named `pax_flags'
array.c:583: error: structure has no member named `pax_flags'
array.c:584: error: structure has no member named `pax_flags'
array.c:584: error: structure has no member named `pax_flags'
array.c:594: error: structure has no member named `pax_flags'
array.c:594: error: structure has no member named `pax_flags'
make[3]: *** [array.o] Error 1
make[3]: Leaving directory `/root/new_sour/linux-2.4.32/fs/proc'
make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/root/new_sour/linux-2.4.32/fs/proc'
make[1]: *** [_subdir_proc] Error 2
make[1]: Leaving directory `/root/new_sour/linux-2.4.32/fs'
make: *** [_dir_fs] Error 2


I found solution on mailing list (about changing MAC control to 'none') but it didn't work. I already checked other options combinations. No effect.

.config:

(...)
# CONFIG_GRKERNSEC_PAX_SOFTMODE is not set
# CONFIG_GRKERNSEC_PAX_EI_PAX is not set
# CONFIG_GRKERNSEC_PAX_PT_PAX_FLAGS is not set
CONFIG_GRKERNSEC_PAX_NO_ACL_FLAGS=y
# CONFIG_GRKERNSEC_PAX_HAVE_ACL_FLAGS is not set
# CONFIG_GRKERNSEC_PAX_HOOK_ACL_FLAGS is not set
(...)



array.c:371

#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
if (PAX_RAND_FLAGS(mm)) {
eip = 0;
esp = 0;
wchan = 0;
}
#endif



array.c:422

#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
PAX_RAND_FLAGS(mm) ? 0 : (mm ? mm->start_code : 0),
PAX_RAND_FLAGS(mm) ? 0 : (mm ? mm->end_code : 0),
PAX_RAND_FLAGS(mm) ? 0 : (mm ? mm->start_stack : 0),
#else
mm ? mm->start_code : 0,
mm ? mm->end_code : 0,
mm ? mm->start_stack : 0,
#endif




grsecurity-2.1.8-2.4.32-200601211647.patch
gcc version 3.4.6

Any idea about that?

Thanks in advance.
Best regards, Mark.

Re: Compile error - fs/proc/array.c - 2.4.32 grsec-2.1.8

PostPosted: Sun Apr 16, 2006 11:53 am
by PaX Team
marcaurel wrote:array.c:422

#ifdef CONFIG_GRKERNSEC_PROC_MEMMAP
PAX_RAND_FLAGS(mm) ? 0 : (mm ? mm->start_code : 0),
PAX_RAND_FLAGS(mm) ? 0 : (mm ? mm->end_code : 0),
PAX_RAND_FLAGS(mm) ? 0 : (mm ? mm->start_stack : 0),
#else
mm ? mm->start_code : 0,
mm ? mm->end_code : 0,
mm ? mm->start_stack : 0,
#endif




grsecurity-2.1.8-2.4.32-200601211647.patch
gcc version 3.4.6

Any idea about that?
don't enable CONFIG_GRKERNSEC_PROC_MEMMAP, you don't use PaX/ASLR, nothing to hide then.