Page 1 of 1

grsecurity-2.1.6-2.6.11.11 & software suspend 2

PostPosted: Thu Jun 09, 2005 12:08 am
by katt
In file included from kernel/power/suspend2_core/atomic_copy.c:29:
include/asm/suspend2.h: In function `fix_processor_context':
include/asm/suspend2.h:128: error: `per_cpu__init_tss' undeclared (first use in this function)
include/asm/suspend2.h:128: error: (Each undeclared identifier is reported only once
include/asm/suspend2.h:128: error: for each function it appears in.)
include/asm/suspend2.h:128: error: invalid type argument of `unary *'
include/asm/suspend2.h:131: error: `per_cpu__cpu_gdt_table' undeclared (first use in this function)
include/asm/suspend2.h:131: error: invalid type argument of `unary *'
make[3]: *** [kernel/power/suspend2_core/atomic_copy.o] Error 1
make[2]: *** [kernel/power/suspend2_core] Error 2
make[1]: *** [kernel/power] Error 2
make: *** [kernel] Error 2

Grsec patch is reverting the per-cpu changes to these variables that were made around 2.6.9.

PostPosted: Thu Jun 09, 2005 11:54 am
by Dabljuh
I got the following error during make with grsecurity-2.1.6-2.6.11.11 applied



Code: Select all
  CC      fs/proc/array.o
fs/proc/array.c: In Funktion »proc_pid_ipaddr«:
fs/proc/array.c:528: error: structure has no member named `curr_ip'
fs/proc/array.c:528: error: structure has no member named `curr_ip'
fs/proc/array.c:528: error: structure has no member named `curr_ip'
fs/proc/array.c:528: error: structure has no member named `curr_ip'

PostPosted: Thu Jun 09, 2005 1:24 pm
by Dabljuh
removing in menuconfig, what causes the #ifdef to activate, there's more that would require me to disable the main CONFIG_GRSKERNELSOMETHING

PostPosted: Fri Jun 10, 2005 8:13 pm
by katmai
where did u actually got grsecurity-2.1.6-2.6.11.11 ???

PostPosted: Sat Jun 11, 2005 9:42 am
by katt

PostPosted: Sat Jun 11, 2005 4:26 pm
by katmai
ok thanks :)

PostPosted: Thu Jun 16, 2005 6:16 am
by ra
Hi,

I got the same problem here (at least since 2.6.10). It would be nice to get this fixed.

Kind regards,
Robert

Re: grsecurity-2.1.6-2.6.11.11 & software suspend 2

PostPosted: Fri Jun 17, 2005 12:20 pm
by PaX Team
katt wrote:Grsec patch is reverting the per-cpu changes to these variables that were made around 2.6.9.
this is due to PaX and is necessary for some features. on the other hand, updating other patches should not be hard (as far as GDT/TSS access is concerned at least), just look at the conversion that PaX does.

Re: grsecurity-2.1.6-2.6.11.11 & software suspend 2

PostPosted: Tue Aug 09, 2005 6:37 am
by ra
PaX Team wrote:
katt wrote:Grsec patch is reverting the per-cpu changes to these variables that were made around 2.6.9.
this is due to PaX and is necessary for some features. on the other hand, updating other patches should not be hard (as far as GDT/TSS access is concerned at least), just look at the conversion that PaX does.


Just in case someone else is interested in using software suspend with grsecurity/pax:
Changing two lines in include/asm/suspend2.h fixes the compile errors (for swsusp2.1.9):
Change line 128:
struct tss_struct * t = &per_cpu(init_tss,nr);
To:
struct tss_struct * t = init_tss + nr;
and (a few lines below):
per_cpu(cpu_gdt_table,nr)[GDT_ENTRY_TSS].b &= 0xfffffdff;
to:
cpu_gdt_table[nr][GDT_ENTRY_TSS].b &= 0xfffffdff;

no warranty that this doesnt eat your data...