Patches contributed by Eötvös Lorand University


commit f09eac9034a4502cce558b0ec4bf7d422b8b355b
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Dec 31 09:43:46 2008 +0100

    tracing/kmemtrace: fix typo
    
    Impact: build fix
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/mm/slab.c b/mm/slab.c
index 83075f36df7b..c65c52dc78d4 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -102,7 +102,7 @@
 #include	<linux/cpu.h>
 #include	<linux/sysctl.h>
 #include	<linux/module.h>
-#include	<tracing/kmemtrace.h>
+#include	<trace/kmemtrace.h>
 #include	<linux/rcupdate.h>
 #include	<linux/string.h>
 #include	<linux/uaccess.h>

commit a9de18eb761f7c1c860964b2e5addc1a35c7e861
Merge: b2aaf8f74cdc 6a94cb73064c
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Dec 31 08:31:57 2008 +0100

    Merge branch 'linus' into stackprotector
    
    Conflicts:
            arch/x86/include/asm/pda.h
            kernel/fork.c

diff --cc arch/x86/include/asm/pda.h
index 45fd2aee8d6a,2fbfff88df37..3fea2fdb3302
--- a/arch/x86/include/asm/pda.h
+++ b/arch/x86/include/asm/pda.h
@@@ -132,6 -134,4 +132,6 @@@ do {									
  
  #define PDA_STACKOFFSET (5*8)
  
 +#define refresh_stack_canary() write_pda(stack_canary, current->stack_canary)
 +
- #endif /* ASM_X86__PDA_H */
+ #endif /* _ASM_X86_PDA_H */
diff --cc arch/x86/kernel/Makefile
index 50632e16d01c,d364df03c1d6..eb074530c7d3
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@@ -21,11 -23,10 +23,11 @@@ nostackp := $(call cc-option, -fno-stac
  CFLAGS_vsyscall_64.o	:= $(PROFILING) -g0 $(nostackp)
  CFLAGS_hpet.o		:= $(nostackp)
  CFLAGS_tsc.o		:= $(nostackp)
 +CFLAGS_paravirt.o	:= $(nostackp)
  
- obj-y			:= process_$(BITS).o signal_$(BITS).o entry_$(BITS).o
- obj-y			+= traps.o irq_$(BITS).o dumpstack_$(BITS).o
- obj-y			+= time_$(BITS).o ioport.o ldt.o
+ obj-y			:= process_$(BITS).o signal.o entry_$(BITS).o
+ obj-y			+= traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
+ obj-y			+= time_$(BITS).o ioport.o ldt.o dumpstack.o
  obj-y			+= setup.o i8259.o irqinit_$(BITS).o setup_percpu.o
  obj-$(CONFIG_X86_VISWS)	+= visws_quirks.o
  obj-$(CONFIG_X86_32)	+= probe_roms_32.o
diff --cc arch/x86/mm/fault.c
index d18ea136d8a6,57ec8c86a877..4c056b5d6a95
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@@ -589,10 -589,9 +590,11 @@@ void __kprobes do_page_fault(struct pt_
  	unsigned long address;
  	int write, si_code;
  	int fault;
 +	unsigned long *stackend;
 +
  #ifdef CONFIG_X86_64
  	unsigned long flags;
+ 	int sig;
  #endif
  
  	tsk = current;
diff --cc kernel/fork.c
index 99c5c655b098,43cbf30669e6..913284e3db14
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@@ -58,7 -60,7 +60,8 @@@
  #include <linux/tty.h>
  #include <linux/proc_fs.h>
  #include <linux/blkdev.h>
+ #include <trace/sched.h>
 +#include <linux/magic.h>
  
  #include <asm/pgtable.h>
  #include <asm/pgalloc.h>
diff --cc kernel/panic.c
index e0a87bb025c0,13f06349a786..3a0b0898690a
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@@ -357,9 -359,10 +367,12 @@@ EXPORT_SYMBOL(warn_slowpath)
   */
  void __stack_chk_fail(void)
  {
 -	panic("stack-protector: Kernel stack is corrupted");
 +	panic("stack-protector: Kernel stack is corrupted in: %p\n",
 +		__builtin_return_address(0));
  }
  EXPORT_SYMBOL(__stack_chk_fail);
 +
  #endif
+ 
+ core_param(panic, panic_timeout, int, 0644);
+ core_param(pause_on_oops, pause_on_oops, int, 0644);

commit 818fa7f3908c7bd6c0045e9d94dc23a899ef6144
Merge: 3fd4bc015ef8 5fdf7e5975a0
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Dec 31 08:19:48 2008 +0100

    Merge branch 'tracing/kmemtrace' into tracing/kmemtrace2

commit 5fdf7e5975a0b0f6a0370655612c5dca3fd6311b
Merge: 7a51cffbd108 6a94cb73064c
Author: Ingo Molnar <mingo@elte.hu>
Date:   Wed Dec 31 08:14:29 2008 +0100

    Merge branch 'linus' into tracing/kmemtrace
    
    Conflicts:
            mm/slub.c

commit 3fd4bc015ef879a7d2b955ce97fb125e3a51ba7e
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Dec 30 12:07:27 2008 +0100

    tracing/kmemtrace: export kmemtrace_mark_alloc_node() / kmemtrace_mark_free()
    
    Impact: build fix
    
    Also fix up Kconfig dependencies and include files.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 27fb74b06b3c..cc9f91e7daf4 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -267,7 +267,8 @@ config HW_BRANCH_TRACER
 config KMEMTRACE
 	bool "Trace SLAB allocations"
 	select TRACING
-	depends on RELAY
+	select MARKERS
+	select RELAY
 	help
 	  kmemtrace provides tracing for slab allocator functions, such as
 	  kmalloc, kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected
diff --git a/kernel/trace/kmemtrace.c b/kernel/trace/kmemtrace.c
index d69cbe3c2a4b..2bfdcd326226 100644
--- a/kernel/trace/kmemtrace.c
+++ b/kernel/trace/kmemtrace.c
@@ -296,6 +296,7 @@ void kmemtrace_mark_alloc_node(enum kmemtrace_type_id type_id,
 
 	trace_wake_up();
 }
+EXPORT_SYMBOL(kmemtrace_mark_alloc_node);
 
 void kmemtrace_mark_free(enum kmemtrace_type_id type_id,
 		       unsigned long call_site,
@@ -325,6 +326,7 @@ void kmemtrace_mark_free(enum kmemtrace_type_id type_id,
 
 	trace_wake_up();
 }
+EXPORT_SYMBOL(kmemtrace_mark_free);
 
 static struct tracer kmem_tracer __read_mostly = {
 	.name		= "kmemtrace",
diff --git a/mm/slab.c b/mm/slab.c
index bcf08ea88380..7f72bb386a09 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -102,7 +102,7 @@
 #include	<linux/cpu.h>
 #include	<linux/sysctl.h>
 #include	<linux/module.h>
-#include	<linux/kmemtrace.h>
+#include	<tracing/kmemtrace.h>
 #include	<linux/rcupdate.h>
 #include	<linux/string.h>
 #include	<linux/uaccess.h>

commit b6ab4afee4ed56d0f69df59485585cff828c327d
Author: Ingo Molnar <mingo@elte.hu>
Date:   Tue Dec 30 09:41:04 2008 +0100

    tracing, kvm: change MARKERS to select instead of depends on
    
    Impact: build fix
    
    fix:
    
     kernel/trace/Kconfig:42:error: found recursive dependency: TRACING ->
     TRACEPOINTS -> MARKERS -> KVM_TRACE -> RELAY -> KMEMTRACE -> TRACING
    
    markers is a facility that should be selected - not depended on
    by an interactive Kconfig entry.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index b81125f0bdee..c7da3683f4c5 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -55,7 +55,8 @@ config KVM_AMD
 
 config KVM_TRACE
 	bool "KVM trace support"
-	depends on KVM && MARKERS && SYSFS
+	depends on KVM && SYSFS
+	select MARKERS
 	select RELAY
 	select DEBUG_FS
 	default n

commit 7a51cffbd10886c0557677dd916c090097c691ef
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Dec 29 16:03:40 2008 +0100

    relayfs: replace BUG() with WARN_ON() in relay_late_setup_files()
    
    Impact: turn boot crash into boot warning
    
    This BUG() can trigger:
    
    [   16.684131] initcall fail_page_alloc_debugfs+0x0/0xc1 returned 0 after 0 usecs
    [   16.692035] calling  kmemtrace_setup_late+0x0/0xd5 @ 1
    [   16.700087] relay_late_setup_files: CPU 1 has no buffer, it must have!
    [   16.704044] ------------[ cut here ]------------
    [   16.708030] kernel BUG at kernel/relay.c:680!
    [   16.708030] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
    [   16.708030] last sysfs file:
    [   16.708030]
    [   16.708030] Pid: 1, comm: swapper Not tainted (2.6.28-tip-03903-g9a39f58-dirty #13207) System Product Name
    [   16.708030] EIP: 0060:[<c01604ae>] EFLAGS: 00010246 CPU: 1
    [   16.708030] EIP is at relay_late_setup_files+0x8c/0x176
    
    Reduce it to a more reportable WARN_ONCE().
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/relay.c b/kernel/relay.c
index 09ac2008f77b..d06450670c86 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -675,9 +675,7 @@ int relay_late_setup_files(struct rchan *chan,
 	 */
 	for_each_online_cpu(i) {
 		if (unlikely(!chan->buf[i])) {
-			printk(KERN_ERR "relay_late_setup_files: CPU %u "
-					"has no buffer, it must have!\n", i);
-			BUG();
+			WARN_ONCE(1, KERN_ERR "CPU has no buffer!\n");
 			err = -EINVAL;
 			break;
 		}

commit 2a38b1c4f123afa4579cb1d29380b337e9195cbb
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Dec 29 15:29:04 2008 +0100

    kmemtrace: move #include lines
    
    Impact: avoid conflicts with kmemcheck
    
    kmemcheck modifies the same area of slab.c and slub.c - move the
    include lines up a bit.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/mm/slab.c b/mm/slab.c
index b6d9b8cdefa9..bcf08ea88380 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -102,6 +102,7 @@
 #include	<linux/cpu.h>
 #include	<linux/sysctl.h>
 #include	<linux/module.h>
+#include	<linux/kmemtrace.h>
 #include	<linux/rcupdate.h>
 #include	<linux/string.h>
 #include	<linux/uaccess.h>
@@ -112,7 +113,6 @@
 #include	<linux/rtmutex.h>
 #include	<linux/reciprocal_div.h>
 #include	<linux/debugobjects.h>
-#include	<linux/kmemtrace.h>
 
 #include	<asm/cacheflush.h>
 #include	<asm/tlbflush.h>
diff --git a/mm/slub.c b/mm/slub.c
index 4cd7bfd2ab2c..cc4001fee7ac 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -16,6 +16,7 @@
 #include <linux/slab.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <linux/kmemtrace.h>
 #include <linux/cpu.h>
 #include <linux/cpuset.h>
 #include <linux/mempolicy.h>
@@ -24,7 +25,6 @@
 #include <linux/kallsyms.h>
 #include <linux/memory.h>
 #include <linux/math64.h>
-#include <linux/kmemtrace.h>
 
 /*
  * Lock order:

commit 2ff9f9d9629bf9530fe2ab8d803d612761ffc059
Merge: 0f01f07fad4e a4900437f3d7
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Dec 29 15:16:24 2008 +0100

    Merge branch 'topic/kmemtrace' of git://git.kernel.org/pub/scm/linux/kernel/git/penberg/slab-2.6 into tracing/kmemtrace

commit a103e2ab7377dbbef2506be59c49a3f2ae10b60b
Author: Ingo Molnar <mingo@elte.hu>
Date:   Mon Dec 29 15:07:47 2008 +0100

    tracing/selftest: remove TRACE_CONT reference
    
    Impact: build fix
    
    TRACE_CONT is gone - fix up the self-test too.
    
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c
index 88c8eb70f54a..5013812578b1 100644
--- a/kernel/trace/trace_selftest.c
+++ b/kernel/trace/trace_selftest.c
@@ -9,7 +9,6 @@ static inline int trace_valid_entry(struct trace_entry *entry)
 	case TRACE_FN:
 	case TRACE_CTX:
 	case TRACE_WAKE:
-	case TRACE_CONT:
 	case TRACE_STACK:
 	case TRACE_PRINT:
 	case TRACE_SPECIAL: