Page 1 of 1

Linux 2.4.32 with grsec 2.4.32 SEGMEXEC compilation problem

PostPosted: Thu Mar 09, 2006 9:26 pm
by cpc
When compiling kernel 2.4.32 with grsec 2.1.8 (patch 2.1.8-2.4.32-200601211647), if you use SEGMEXEC, you get an undefined reference to pax_handle_fetch_fault:

fault.c: In function `do_page_fault':
fault.c:297: warning: implicit declaration of function `pax_handle_fetch_fault'
...
arch/i386/mm/mm.o: In function `do_page_fault':
arch/i386/mm/mm.o(.text+0xc0d): undefined reference to `pax_handle_fetch_fault'


The fix is the following patch:

Code: Select all
--- linux-2.4.32/arch/i386/mm/fault.c.orig      Thu Mar  9 15:40:37 2006
+++ linux-2.4.32/arch/i386/mm/fault.c   Thu Mar  9 15:40:49 2006
@@ -499,7 +499,7 @@
  *         4 when gcc trampoline was detected
  *        5 when legitimate ET_EXEC was detected
  */
-#ifdef CONFIG_GRKERNSEC_PAX_PAGEEXEC
+#if defined(CONFIG_GRKERNSEC_PAX_PAGEEXEC) || defined(CONFIG_GRKERNSEC_PAX_SEGMEXEC)
 static int pax_handle_fetch_fault(struct pt_regs *regs)
 {
 #ifdef CONFIG_GRKERNSEC_PAX_EMUTRAMP

Re: Linux 2.4.32 with grsec 2.4.32 SEGMEXEC compilation prob

PostPosted: Fri Mar 10, 2006 8:50 am
by PaX Team
cpc wrote:When compiling kernel 2.4.32 with grsec 2.1.8 (patch 2.1.8-2.4.32-200601211647), if you use SEGMEXEC, you get an undefined reference to pax_handle_fetch_fault:
FYI, this has already been fixed in 2.1.9, it's available in ~spender.