Re: 2.6.21-rc4-mm1

From: Kees Cook
Date: Tue Mar 20 2007 - 15:20:56 EST


On Tue, Mar 20, 2007 at 10:31:51AM -0700, Randy Dunlap wrote:
> LD .tmp_vmlinux1
> kernel/built-in.o:(.data+0xfc0): undefined reference to `maps_protect'
> make: *** [.tmp_vmlinux1] Error 1
>
> with CONFIG_PROC_FS=n

Gah! Apologies. This should fix it, but I can't test it since I can't
get 2.6.21-rc4-mm1 to compile (with or without this fix):

GEN .version
init/.missing_syscalls.h.cmd:2: *** missing separator. Stop.
make: *** [.tmp_vmlinux1] Error 2


Signed-off-by: Kees Cook <kees@xxxxxxxxxxx>
---
diff -uNrp linux-2.6.21-rc4-mm1/kernel/sysctl.c linux-2.6.21-rc4-mm1-kees/kernel/sysctl.c
--- linux-2.6.21-rc4-mm1/kernel/sysctl.c 2007-03-20 10:45:06.000000000 -0700
+++ linux-2.6.21-rc4-mm1-kees/kernel/sysctl.c 2007-03-20 11:36:06.000000000 -0700
@@ -77,9 +77,12 @@ extern int pid_max_min, pid_max_max;
extern int sysctl_drop_caches;
extern int percpu_pagelist_fraction;
extern int compat_log;
-extern int maps_protect;
extern int print_fatal_signals;

+#ifdef CONFIG_PROC_FS
+extern int maps_protect;
+#endif
+
#if defined(CONFIG_ADAPTIVE_READAHEAD)
extern int readahead_ratio;
extern int readahead_hit_rate;
@@ -619,6 +622,7 @@ static ctl_table kern_table[] = {
.proc_handler = &proc_dointvec,
},
#endif
+#ifdef CONFIG_PROC_FS
{
.ctl_name = CTL_UNNUMBERED,
.procname = "maps_protect",
@@ -627,6 +631,7 @@ static ctl_table kern_table[] = {
.mode = 0644,
.proc_handler = &proc_dointvec,
},
+#endif

{ .ctl_name = 0 }
};




--
Kees Cook @outflux.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/