mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix undefined symbols for nommu architecture --improved version
@ 2006-02-20  6:33 Luke Yang
  2006-02-20  6:39 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Luke Yang @ 2006-02-20  6:33 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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.

Signed-off-by: Luke Yang <luke.adi@gmail.com>

Index: git/linux-2.6/mm/nommu.c
===================================================================
--- git.orig/linux-2.6/mm/nommu.c       2006-02-17 17:40:34.000000000 +0800
+++ git/linux-2.6/mm/nommu.c    2006-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);

+#define randomize_va_space 0
 /*
 * Handle all mappings that got truncated by a "truncate()"
 * system call.
--
Best regards,
Luke Yang
magic.yyang@gmail.com; luke.adi@gmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix undefined symbols for nommu architecture --improved version
  2006-02-20  6:33 [PATCH] Fix undefined symbols for nommu architecture --improved version Luke Yang
@ 2006-02-20  6:39 ` Andrew Morton
  2006-02-20  7:40   ` Luke Yang
  2006-02-20 10:35   ` David Howells
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Morton @ 2006-02-20  6:39 UTC (permalink / raw)
  To: Luke Yang; +Cc: linux-kernel

"Luke Yang" <luke.adi@gmail.com> wrote:
>
> Index: git/linux-2.6/mm/nommu.c
>  ===================================================================
>  --- git.orig/linux-2.6/mm/nommu.c       2006-02-17 17:40:34.000000000 +0800
>  +++ git/linux-2.6/mm/nommu.c    2006-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);
> 
>  +#define randomize_va_space 0
>   /*
>   * 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?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix undefined symbols for nommu architecture --improved version
  2006-02-20  6:39 ` Andrew Morton
@ 2006-02-20  7:40   ` Luke Yang
  2006-02-20 10:35   ` David Howells
  1 sibling, 0 replies; 4+ messages in thread
From: Luke Yang @ 2006-02-20  7:40 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Hi,

  This is renewed patch. Tested on Blackfin platform.

  Signed-off-by: Luke Yang <luke.adi@gmail.com>

Index: git/linux-2.6/mm/nommu.c
===================================================================
--- git.orig/linux-2.6/mm/nommu.c	2006-02-20 12:33:25.000000000 +0800
+++ git/linux-2.6/mm/nommu.c	2006-02-20 15:12:08.000000000 +0800
@@ -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()"
Index: git/linux-2.6/include/linux/mm.h
===================================================================
--- git.orig/linux-2.6/include/linux/mm.h	2006-02-20 15:25:21.000000000 +0800
+++ git/linux-2.6/include/linux/mm.h	2006-02-20 15:26:24.000000000 +0800
@@ -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 */
Index: git/linux-2.6/kernel/sysctl.c
===================================================================
--- git.orig/linux-2.6/kernel/sysctl.c	2006-02-20 15:26:47.000000000 +0800
+++ git/linux-2.6/kernel/sysctl.c	2006-02-20 15:27:22.000000000 +0800
@@ -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,


On 2/20/06, Andrew Morton <akpm@osdl.org> wrote:
> "Luke Yang" <luke.adi@gmail.com> wrote:
> >
> > Index: git/linux-2.6/mm/nommu.c
> >  ===================================================================
> >  --- git.orig/linux-2.6/mm/nommu.c       2006-02-17 17:40:34.000000000 +0800
> >  +++ git/linux-2.6/mm/nommu.c    2006-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);
> >
> >  +#define randomize_va_space 0
> >   /*
> >   * 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?
 Sorry, nommu.c was compiled but the error still exists at the end of
compilation.  This time it is right.

>


--
Best regards,
Luke Yang
magic.yyang@gmail.com; luke.adi@gmail.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix undefined symbols for nommu architecture --improved version
  2006-02-20  6:39 ` Andrew Morton
  2006-02-20  7:40   ` Luke Yang
@ 2006-02-20 10:35   ` David Howells
  1 sibling, 0 replies; 4+ messages in thread
From: David Howells @ 2006-02-20 10:35 UTC (permalink / raw)
  To: Luke Yang; +Cc: Andrew Morton, linux-kernel

Luke Yang <luke.adi@gmail.com> wrote:

> +#ifndef CONFIG_MMU
> +#define randomize_va_space 0
> +#else
>  extern int randomize_va_space;
> +#endif

Acked-By: David Howells <dhowells@redhat.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-20 10:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-20  6:33 [PATCH] Fix undefined symbols for nommu architecture --improved version Luke Yang
2006-02-20  6:39 ` Andrew Morton
2006-02-20  7:40   ` Luke Yang
2006-02-20 10:35   ` David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®