Fix undefined symbols for nommu architecture --improved version
PATCH 1/1 Fix undefined symbols for nommu architecture --improved version
Hi,
This is the improved version of my last email patch. Thanks for
Andrew's advice. The "randomize_va_space" is defined as a macro instead of an variable. I saw the previous patch is accepted, is it OK to resend a modified patch?
To add or export some undefined symbols in nommu
architectures (mm/nommu.c). Based on latest mm-tree.
linux-2.6/mm/nommu.c 2006-02-20 12:09:32.000000000 +0800 renamed from linux-2.6/mm/nommu.c 2006-02-17 17:40:34.000000000 +0800 +3 -0
@@ -57,7 +57,10 @@ EXPORT_SYMBOL(vfree); EXPORT_SYMBOL(vmalloc_to_page); EXPORT_SYMBOL(vmalloc_32); +EXPORT_SYMBOL(vmap); +EXPORT_SYMBOL(vunmap); +#define randomize_va_space 0 /* * Handle all mappings that got truncated by a "truncate()" * system call.
--
Best regards,
Luke Yang
[email protected]; [email protected]
Quoted 12 lines · Luke Yang
Index:
git/linux-2.6/mm/nommu.c
===================================================================
---git.orig/linux-2.6/mm/nommu.c2006-02-17 17:40:34.000000000 +0800
+++git/linux-2.6/mm/nommu.c2006-02-20 12:09:32.000000000 +0800
@@ -57,7 +57,10 @@
EXPORT_SYMBOL(vfree);
EXPORT_SYMBOL(vmalloc_to_page);
EXPORT_SYMBOL(vmalloc_32);
+EXPORT_SYMBOL(vmap);
+EXPORT_SYMBOL(vunmap);
Quoted 4 lines
+#define
randomize_va_space0
/*
* Handle all mappings that got truncated by a "truncate()"
* system call.
That can't be right - the #define should be in a header file - mm.h:
#ifdef CONFIG_NOMMU
#define randomize_va_space 0
#else
extern int randomize_va_space;
#endif
Are you sure you test-compiled this?
Hi,
This is renewed patch. Tested on Blackfin platform.
linux-2.6/mm/nommu.c +2 -0
@@ -57,6 +57,8 @@EXPORT_SYMBOL (vfree);EXPORT_SYMBOL (vmalloc_to_page);EXPORT_SYMBOL (vmalloc_32); +EXPORT_SYMBOL (vmap); +EXPORT_SYMBOL (vunmap);/* * Handle all mappings that got truncated by a "truncate()"
linux-2.6/include/linux/mm.h +4 -0
@@ -1051,7 +1051,11 @@void drop_pagecache (void );void drop_slab (void ); +#ifndef CONFIG_MMU +#define randomize_va_space 0 +#else extern int randomize_va_space; +#endif #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */
linux-2.6/kernel/sysctl.c +2 -0
@@ -638,6 +638,7 @@ .proc_handler = &proc_dointvec, },#endif +#if defined(CONFIG_MMU ) { .ctl_name = KERN_RANDOMIZE, .procname = "randomize_va_space",
@@ -646,6 +647,7 @@ .mode = 0644, .proc_handler = &proc_dointvec, }, +#endif #if defined(CONFIG_S390 ) && defined(CONFIG_SMP ) { .ctl_name = KERN_SPIN_RETRY,
Quoted 20 lines · Andrew Morton
Quoted 12 lines · Luke Yang
Index:
git/linux-2.6/mm/nommu.c
===================================================================
---git.orig/linux-2.6/mm/nommu.c2006-02-17 17:40:34.000000000 +0800
+++git/linux-2.6/mm/nommu.c2006-02-20 12:09:32.000000000 +0800
@@ -57,7 +57,10 @@
EXPORT_SYMBOL(vfree);
EXPORT_SYMBOL(vmalloc_to_page);
EXPORT_SYMBOL(vmalloc_32);
+EXPORT_SYMBOL(vmap);
+EXPORT_SYMBOL(vunmap);Quoted 4 lines
+#define
randomize_va_space0
/*
* Handle all mappings that got truncated by a "truncate()"
* system call.That can't be right - the #define should be in a header file -
mm.h:
Quoted 7 lines
#ifdef
CONFIG_NOMMU
#definerandomize_va_space0
#else
extern intrandomize_va_space;
#endifAre you sure you test-compiled this?
Sorry, nommu.c was compiled but the error still exists at the end of
compilation. This time it is right.
Quoted 1 line
--
Best regards,
Luke Yang
[email protected]; [email protected]
David Howells
Acked-bylinux-2.6/include/linux/mm.h line 1058
Quoted 5 lines · Luke Yang
linux-2.6/include/linux/mm.h +4
-0+#ifndef CONFIG_MMU +#define randomize_va_space 0 +#else extern int randomize_va_space; +#endif