Linux 2.4.32 with grsec 2.4.32 SEGMEXEC compilation problem
Posted: Thu Mar 09, 2006 9:26 pm
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:
The fix is the following patch:
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