All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: sh build failure
@ 2009-03-20  0:06 Stephen Rothwell
  2009-03-20 18:24 ` Mathieu Desnoyers
  2009-03-22 19:39 ` [tip:tracing/core] tracing, Text Edit Lock - kprobes architecture independent support, nommu fix Ingo Molnar
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Rothwell @ 2009-03-20  0:06 UTC (permalink / raw)
  To: Paul Mundt
  Cc: linux-next, Mathieu Desnoyers, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

Hi Paul,

Yesterday's linux-next build of sh allmodconfig failed like this:

kernel/built-in.o: In function `disable_all_kprobes':
kernel/kprobes.c:1382: undefined reference to `text_mutex'
kernel/built-in.o: In function `__unregister_kprobe_top':
kernel/kprobes.c:773: undefined reference to `text_mutex'
kernel/built-in.o: In function `register_kprobe':
kernel/kprobes.c:724: undefined reference to `text_mutex'

Introduced by commit 4460fdad85becd569f11501ad5b91814814335ff ("tracing,
Text Edit Lock - kprobes architecture independent support") from the
tracing tree.  text_mutex is defined in mm/memory.c which is only built
if CONFIG_MMU is defined, which is not true for sh allmodconfig.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

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

* Re: linux-next: sh build failure
  2009-03-20  0:06 linux-next: sh build failure Stephen Rothwell
@ 2009-03-20 18:24 ` Mathieu Desnoyers
  2009-03-20 18:34   ` Ingo Molnar
  2009-03-22 19:39 ` [tip:tracing/core] tracing, Text Edit Lock - kprobes architecture independent support, nommu fix Ingo Molnar
  1 sibling, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2009-03-20 18:24 UTC (permalink / raw)
  To: Stephen Rothwell, Ingo Molnar
  Cc: Paul Mundt, linux-next, Thomas Gleixner, H. Peter Anvin

[-- Attachment #1: Type: text/plain, Size: 1609 bytes --]

* Stephen Rothwell (sfr@canb.auug.org.au) wrote:
> Hi Paul,
> 
> Yesterday's linux-next build of sh allmodconfig failed like this:
> 
> kernel/built-in.o: In function `disable_all_kprobes':
> kernel/kprobes.c:1382: undefined reference to `text_mutex'
> kernel/built-in.o: In function `__unregister_kprobe_top':
> kernel/kprobes.c:773: undefined reference to `text_mutex'
> kernel/built-in.o: In function `register_kprobe':
> kernel/kprobes.c:724: undefined reference to `text_mutex'
> 
> Introduced by commit 4460fdad85becd569f11501ad5b91814814335ff ("tracing,
> Text Edit Lock - kprobes architecture independent support") from the
> tracing tree.  text_mutex is defined in mm/memory.c which is only built
> if CONFIG_MMU is defined, which is not true for sh allmodconfig.

Hrm, so we should move the text_mutex in a obj-y file. It's not clear to
me which of mm/Makefile would be the best choice :

obj-y                   := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
                           maccess.o page_alloc.o page-writeback.o pdflush.o \
                           readahead.o swap.o truncate.o vmscan.o shmem.o \
                           prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
                           page_isolation.o mm_init.o $(mmu-y)

Or maybe we add a new file, or put this in kernel/*.c. Suggestions ?

Mathieu

> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/



-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: linux-next: sh build failure
  2009-03-20 18:24 ` Mathieu Desnoyers
@ 2009-03-20 18:34   ` Ingo Molnar
  0 siblings, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2009-03-20 18:34 UTC (permalink / raw)
  To: Mathieu Desnoyers
  Cc: Stephen Rothwell, Paul Mundt, linux-next, Thomas Gleixner,
	H. Peter Anvin


* Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:

> * Stephen Rothwell (sfr@canb.auug.org.au) wrote:
> > Hi Paul,
> > 
> > Yesterday's linux-next build of sh allmodconfig failed like this:
> > 
> > kernel/built-in.o: In function `disable_all_kprobes':
> > kernel/kprobes.c:1382: undefined reference to `text_mutex'
> > kernel/built-in.o: In function `__unregister_kprobe_top':
> > kernel/kprobes.c:773: undefined reference to `text_mutex'
> > kernel/built-in.o: In function `register_kprobe':
> > kernel/kprobes.c:724: undefined reference to `text_mutex'
> > 
> > Introduced by commit 4460fdad85becd569f11501ad5b91814814335ff ("tracing,
> > Text Edit Lock - kprobes architecture independent support") from the
> > tracing tree.  text_mutex is defined in mm/memory.c which is only built
> > if CONFIG_MMU is defined, which is not true for sh allmodconfig.
> 
> Hrm, so we should move the text_mutex in a obj-y file. It's not clear to
> me which of mm/Makefile would be the best choice :
> 
> obj-y                   := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
>                            maccess.o page_alloc.o page-writeback.o pdflush.o \
>                            readahead.o swap.o truncate.o vmscan.o shmem.o \
>                            prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
>                            page_isolation.o mm_init.o $(mmu-y)
> 
> Or maybe we add a new file, or put this in kernel/*.c. Suggestions ?

i already fixed it earlier today via the commit below.

(the commit notification did not go out to the thread because lkml 
was not Cc:-ed.)

	Ingo

-------------------->
>From 505f2b970b2269ce4cb669b3ff4f6479d379cec2 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 20 Mar 2009 11:05:04 +0100
Subject: [PATCH] tracing, Text Edit Lock - kprobes architecture independent support, nommu fix

Impact: build fix on SH !CONFIG_MMU

Stephen Rothwell reported this linux-next build failure on the SH
architecture:

  kernel/built-in.o: In function `disable_all_kprobes':
  kernel/kprobes.c:1382: undefined reference to `text_mutex'
  [...]

And observed:

| Introduced by commit 4460fdad85becd569f11501ad5b91814814335ff ("tracing,
| Text Edit Lock - kprobes architecture independent support") from the
| tracing tree.  text_mutex is defined in mm/memory.c which is only built
| if CONFIG_MMU is defined, which is not true for sh allmodconfig.

Move this lock to kernel/extable.c (which is already home to various
kernel text related routines), which file is always built-in.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
LKML-Reference: <20090320110602.86351a91.sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/extable.c |   14 ++++++++++++--
 mm/memory.c      |    8 --------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/kernel/extable.c b/kernel/extable.c
index 0df6253..25d39b0 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -15,11 +15,21 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
+#include <linux/ftrace.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/init.h>
-#include <linux/ftrace.h>
-#include <asm/uaccess.h>
+
 #include <asm/sections.h>
+#include <asm/uaccess.h>
+
+/*
+ * mutex protecting text section modification (dynamic code patching).
+ * some users need to sleep (allocating memory...) while they hold this lock.
+ *
+ * NOT exported to modules - patching kernel text is a really delicate matter.
+ */
+DEFINE_MUTEX(text_mutex);
 
 extern struct exception_table_entry __start___ex_table[];
 extern struct exception_table_entry __stop___ex_table[];
diff --git a/mm/memory.c b/mm/memory.c
index 05fab3b..dfc9e4e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -101,14 +101,6 @@ int randomize_va_space __read_mostly =
 					2;
 #endif
 
-/*
- * mutex protecting text section modification (dynamic code patching).
- * some users need to sleep (allocating memory...) while they hold this lock.
- *
- * NOT exported to modules - patching kernel text is a really delicate matter.
- */
-DEFINE_MUTEX(text_mutex);
-
 static int __init disable_randmaps(char *s)
 {
 	randomize_va_space = 0;

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

* [tip:tracing/core] tracing, Text Edit Lock - kprobes architecture independent support, nommu fix
  2009-03-20  0:06 linux-next: sh build failure Stephen Rothwell
  2009-03-20 18:24 ` Mathieu Desnoyers
@ 2009-03-22 19:39 ` Ingo Molnar
  1 sibling, 0 replies; 4+ messages in thread
From: Ingo Molnar @ 2009-03-22 19:39 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, mathieu.desnoyers, hpa, mingo, lethal, tglx, sfr, mingo

Commit-ID:  505f2b970b2269ce4cb669b3ff4f6479d379cec2
Gitweb:     http://git.kernel.org/tip/505f2b970b2269ce4cb669b3ff4f6479d379cec2
Author:     Ingo Molnar <mingo@elte.hu>
AuthorDate: Fri, 20 Mar 2009 11:05:04 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 20 Mar 2009 11:09:27 +0100

tracing, Text Edit Lock - kprobes architecture independent support, nommu fix

Impact: build fix on SH !CONFIG_MMU

Stephen Rothwell reported this linux-next build failure on the SH
architecture:

  kernel/built-in.o: In function `disable_all_kprobes':
  kernel/kprobes.c:1382: undefined reference to `text_mutex'
  [...]

And observed:

| Introduced by commit 4460fdad85becd569f11501ad5b91814814335ff ("tracing,
| Text Edit Lock - kprobes architecture independent support") from the
| tracing tree.  text_mutex is defined in mm/memory.c which is only built
| if CONFIG_MMU is defined, which is not true for sh allmodconfig.

Move this lock to kernel/extable.c (which is already home to various
kernel text related routines), which file is always built-in.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
LKML-Reference: <20090320110602.86351a91.sfr@canb.auug.org.au>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 kernel/extable.c |   14 ++++++++++++--
 mm/memory.c      |    8 --------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/kernel/extable.c b/kernel/extable.c
index 0df6253..25d39b0 100644
--- a/kernel/extable.c
+++ b/kernel/extable.c
@@ -15,11 +15,21 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
+#include <linux/ftrace.h>
 #include <linux/module.h>
+#include <linux/mutex.h>
 #include <linux/init.h>
-#include <linux/ftrace.h>
-#include <asm/uaccess.h>
+
 #include <asm/sections.h>
+#include <asm/uaccess.h>
+
+/*
+ * mutex protecting text section modification (dynamic code patching).
+ * some users need to sleep (allocating memory...) while they hold this lock.
+ *
+ * NOT exported to modules - patching kernel text is a really delicate matter.
+ */
+DEFINE_MUTEX(text_mutex);
 
 extern struct exception_table_entry __start___ex_table[];
 extern struct exception_table_entry __stop___ex_table[];
diff --git a/mm/memory.c b/mm/memory.c
index 05fab3b..dfc9e4e 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -101,14 +101,6 @@ int randomize_va_space __read_mostly =
 					2;
 #endif
 
-/*
- * mutex protecting text section modification (dynamic code patching).
- * some users need to sleep (allocating memory...) while they hold this lock.
- *
- * NOT exported to modules - patching kernel text is a really delicate matter.
- */
-DEFINE_MUTEX(text_mutex);
-
 static int __init disable_randmaps(char *s)
 {
 	randomize_va_space = 0;

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

end of thread, other threads:[~2009-03-22 19:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-20  0:06 linux-next: sh build failure Stephen Rothwell
2009-03-20 18:24 ` Mathieu Desnoyers
2009-03-20 18:34   ` Ingo Molnar
2009-03-22 19:39 ` [tip:tracing/core] tracing, Text Edit Lock - kprobes architecture independent support, nommu fix Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.