All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip v8 0/4] kprobes related bugfix
@ 2017-07-30 10:10 Masami Hiramatsu
  2017-07-30 10:12 ` [PATCH -tip v8 1/4] h8300: mark _stext and _etext as char-arrays, not single char Masami Hiramatsu
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Masami Hiramatsu @ 2017-07-30 10:10 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner
  Cc: Francis Deslauriers, mathieu.desnoyers, Ingo Molnar,
	H . Peter Anvin, x86, Masami Hiramatsu,
	Ananth N Mavinakayanahalli, Anil S Keshavamurthy,
	David S . Miller, linux-kernel, Yoshinori Sato, Chris Zankel,
	Max Filippov

Hi,

Here are the series of patches to fix kprobes not
to optimize on the functions in irqentry text ([4/4]).
To check the irqentry text always, [3/4] makes irqentry
text section unconditional.

This involves some other cleanups on h8300, xtensa,
because those sources declare section start/end symbol
as single characters, but generic sections.h declares
it as character arrays. So it leads build errors if
we apply [3/4].

Thank you,

---

Masami Hiramatsu (4):
      h8300: mark _stext and _etext as char-arrays, not single char
      xtensa: mark _stext and _end as char-arrays, not single char
      irq: Make irqentry text section unconditional
      [BUGFIX] kprobes/x86: Do not jump-optimize kprobes on irq entry code


 arch/arm/include/asm/traps.h      |    7 -------
 arch/arm64/include/asm/traps.h    |    7 -------
 arch/h8300/include/asm/traps.h    |    6 +++---
 arch/x86/entry/entry_64.S         |    9 ++-------
 arch/x86/kernel/kprobes/opt.c     |    9 ++++++---
 arch/x86/kernel/unwind_frame.c    |    2 --
 arch/xtensa/kernel/setup.c        |    6 +++---
 include/asm-generic/sections.h    |    4 ++++
 include/asm-generic/vmlinux.lds.h |    8 --------
 include/linux/interrupt.h         |   14 +-------------
 10 files changed, 19 insertions(+), 53 deletions(-)

--
Masami Hiramatsu

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

* [PATCH -tip v8 1/4] h8300: mark _stext and _etext as char-arrays, not single char
  2017-07-30 10:10 [PATCH -tip v8 0/4] kprobes related bugfix Masami Hiramatsu
@ 2017-07-30 10:12 ` Masami Hiramatsu
  2017-07-30 10:13 ` [PATCH -tip v8 2/4] xtensa: mark _stext and _end " Masami Hiramatsu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Masami Hiramatsu @ 2017-07-30 10:12 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner
  Cc: Francis Deslauriers, mathieu.desnoyers, Ingo Molnar,
	H . Peter Anvin, x86, Masami Hiramatsu,
	Ananth N Mavinakayanahalli, Anil S Keshavamurthy,
	David S . Miller, linux-kernel, Yoshinori Sato, Chris Zankel,
	Max Filippov

Mark _stext and _etext as character arrays instead of
single character, as same as include/asm-generic/sections.h
does.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 arch/h8300/include/asm/traps.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/h8300/include/asm/traps.h b/arch/h8300/include/asm/traps.h
index 15e701130b27..1c5a30ec2df8 100644
--- a/arch/h8300/include/asm/traps.h
+++ b/arch/h8300/include/asm/traps.h
@@ -33,9 +33,9 @@ extern unsigned long *_interrupt_redirect_table;
 #define TRAP2_VEC 10
 #define TRAP3_VEC 11
 
-extern char _start, _etext;
+extern char _start[], _etext[];
 #define check_kernel_text(addr) \
-	((addr >= (unsigned long)(&_start)) && \
-	 (addr <  (unsigned long)(&_etext)) && !(addr & 1))
+	((addr >= (unsigned long)(_start)) && \
+	 (addr <  (unsigned long)(_etext)) && !(addr & 1))
 
 #endif /* _H8300_TRAPS_H */

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

* [PATCH -tip v8 2/4] xtensa: mark _stext and _end as char-arrays, not single char
  2017-07-30 10:10 [PATCH -tip v8 0/4] kprobes related bugfix Masami Hiramatsu
  2017-07-30 10:12 ` [PATCH -tip v8 1/4] h8300: mark _stext and _etext as char-arrays, not single char Masami Hiramatsu
@ 2017-07-30 10:13 ` Masami Hiramatsu
  2017-07-30 10:14 ` [PATCH -tip v8 3/4] irq: Make irqentry text section unconditional Masami Hiramatsu
  2017-07-30 10:16 ` [PATCH -tip v8 4/4] [BUGFIX] kprobes/x86: Do not jump-optimize kprobes on irq entry code Masami Hiramatsu
  3 siblings, 0 replies; 8+ messages in thread
From: Masami Hiramatsu @ 2017-07-30 10:13 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner
  Cc: Francis Deslauriers, mathieu.desnoyers, Ingo Molnar,
	H . Peter Anvin, x86, Masami Hiramatsu,
	Ananth N Mavinakayanahalli, Anil S Keshavamurthy,
	David S . Miller, linux-kernel, Yoshinori Sato, Chris Zankel,
	Max Filippov

Mark _stext and _end as character arrays instead of single
character, as same as include/asm-generic/sections.h does.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
---
 arch/xtensa/kernel/setup.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 33bfa5270d95..08175df7a69e 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -273,8 +273,8 @@ void __init init_arch(bp_tag_t *bp_start)
  * Initialize system. Setup memory and reserve regions.
  */
 
-extern char _end;
-extern char _stext;
+extern char _end[];
+extern char _stext[];
 extern char _WindowVectors_text_start;
 extern char _WindowVectors_text_end;
 extern char _DebugInterruptVector_literal_start;
@@ -333,7 +333,7 @@ void __init setup_arch(char **cmdline_p)
 	}
 #endif
 
-	mem_reserve(__pa(&_stext), __pa(&_end));
+	mem_reserve(__pa(_stext), __pa(_end));
 
 #ifdef CONFIG_VECTORS_OFFSET
 	mem_reserve(__pa(&_WindowVectors_text_start),

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

* [PATCH -tip v8 3/4] irq: Make irqentry text section unconditional
  2017-07-30 10:10 [PATCH -tip v8 0/4] kprobes related bugfix Masami Hiramatsu
  2017-07-30 10:12 ` [PATCH -tip v8 1/4] h8300: mark _stext and _etext as char-arrays, not single char Masami Hiramatsu
  2017-07-30 10:13 ` [PATCH -tip v8 2/4] xtensa: mark _stext and _end " Masami Hiramatsu
@ 2017-07-30 10:14 ` Masami Hiramatsu
  2017-08-02 17:35   ` kbuild test robot
  2017-08-02 19:11   ` kbuild test robot
  2017-07-30 10:16 ` [PATCH -tip v8 4/4] [BUGFIX] kprobes/x86: Do not jump-optimize kprobes on irq entry code Masami Hiramatsu
  3 siblings, 2 replies; 8+ messages in thread
From: Masami Hiramatsu @ 2017-07-30 10:14 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner
  Cc: Francis Deslauriers, mathieu.desnoyers, Ingo Molnar,
	H . Peter Anvin, x86, Masami Hiramatsu,
	Ananth N Mavinakayanahalli, Anil S Keshavamurthy,
	David S . Miller, linux-kernel, Yoshinori Sato, Chris Zankel,
	Max Filippov

Generate irqentry and softirqentry text sections without
any configs. This will add above extra sections, but
no performace impact.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Suggested-by: Ingo Molnar <mingo@kernel.org>
---
 arch/arm/include/asm/traps.h      |    7 -------
 arch/arm64/include/asm/traps.h    |    7 -------
 arch/x86/entry/entry_64.S         |    9 ++-------
 arch/x86/kernel/unwind_frame.c    |    2 --
 include/asm-generic/sections.h    |    4 ++++
 include/asm-generic/vmlinux.lds.h |    8 --------
 include/linux/interrupt.h         |   14 +-------------
 7 files changed, 7 insertions(+), 44 deletions(-)

diff --git a/arch/arm/include/asm/traps.h b/arch/arm/include/asm/traps.h
index f555bb3664dc..683d9230984a 100644
--- a/arch/arm/include/asm/traps.h
+++ b/arch/arm/include/asm/traps.h
@@ -18,7 +18,6 @@ struct undef_hook {
 void register_undef_hook(struct undef_hook *hook);
 void unregister_undef_hook(struct undef_hook *hook);
 
-#ifdef CONFIG_FUNCTION_GRAPH_TRACER
 static inline int __in_irqentry_text(unsigned long ptr)
 {
 	extern char __irqentry_text_start[];
@@ -27,12 +26,6 @@ static inline int __in_irqentry_text(unsigned long ptr)
 	return ptr >= (unsigned long)&__irqentry_text_start &&
 	       ptr < (unsigned long)&__irqentry_text_end;
 }
-#else
-static inline int __in_irqentry_text(unsigned long ptr)
-{
-	return 0;
-}
-#endif
 
 static inline int in_exception_text(unsigned long ptr)
 {
diff --git a/arch/arm64/include/asm/traps.h b/arch/arm64/include/asm/traps.h
index 02e9035b0685..47a9066f7c86 100644
--- a/arch/arm64/include/asm/traps.h
+++ b/arch/arm64/include/asm/traps.h
@@ -37,18 +37,11 @@ void unregister_undef_hook(struct undef_hook *hook);
 
 void arm64_notify_segfault(struct pt_regs *regs, unsigned long addr);
 
-#ifdef CONFIG_FUNCTION_GRAPH_TRACER
 static inline int __in_irqentry_text(unsigned long ptr)
 {
 	return ptr >= (unsigned long)&__irqentry_text_start &&
 	       ptr < (unsigned long)&__irqentry_text_end;
 }
-#else
-static inline int __in_irqentry_text(unsigned long ptr)
-{
-	return 0;
-}
-#endif
 
 static inline int in_exception_text(unsigned long ptr)
 {
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S
index aa58155187c5..5e41396efbbf 100644
--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -766,13 +766,8 @@ apicinterrupt3 \num trace(\sym) smp_trace(\sym)
 #endif
 
 /* Make sure APIC interrupt handlers end up in the irqentry section: */
-#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
-# define PUSH_SECTION_IRQENTRY	.pushsection .irqentry.text, "ax"
-# define POP_SECTION_IRQENTRY	.popsection
-#else
-# define PUSH_SECTION_IRQENTRY
-# define POP_SECTION_IRQENTRY
-#endif
+#define PUSH_SECTION_IRQENTRY	.pushsection .irqentry.text, "ax"
+#define POP_SECTION_IRQENTRY	.popsection
 
 .macro apicinterrupt num sym do_sym
 PUSH_SECTION_IRQENTRY
diff --git a/arch/x86/kernel/unwind_frame.c b/arch/x86/kernel/unwind_frame.c
index 7574ef5f16ec..d145a0b1f529 100644
--- a/arch/x86/kernel/unwind_frame.c
+++ b/arch/x86/kernel/unwind_frame.c
@@ -84,10 +84,8 @@ static bool in_entry_code(unsigned long ip)
 	if (addr >= __entry_text_start && addr < __entry_text_end)
 		return true;
 
-#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
 	if (addr >= __irqentry_text_start && addr < __irqentry_text_end)
 		return true;
-#endif
 
 	return false;
 }
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 532372c6cf15..e5da44eddd2f 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -27,6 +27,8 @@
  *	__kprobes_text_start, __kprobes_text_end
  *	__entry_text_start, __entry_text_end
  *	__ctors_start, __ctors_end
+ *	__irqentry_text_start, __irqentry_text_end
+ *	__softirqentry_text_start, __softirqentry_text_end
  */
 extern char _text[], _stext[], _etext[];
 extern char _data[], _sdata[], _edata[];
@@ -39,6 +41,8 @@ extern char __per_cpu_load[], __per_cpu_start[], __per_cpu_end[];
 extern char __kprobes_text_start[], __kprobes_text_end[];
 extern char __entry_text_start[], __entry_text_end[];
 extern char __start_rodata[], __end_rodata[];
+extern char __irqentry_text_start[], __irqentry_text_end[];
+extern char __softirqentry_text_start[], __softirqentry_text_end[];
 
 /* Start and end of .ctors section - used for constructor calls. */
 extern char __ctors_start[], __ctors_end[];
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index fffc9bdae025..438b014c192f 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -483,25 +483,17 @@
 		*(.entry.text)						\
 		VMLINUX_SYMBOL(__entry_text_end) = .;
 
-#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
 #define IRQENTRY_TEXT							\
 		ALIGN_FUNCTION();					\
 		VMLINUX_SYMBOL(__irqentry_text_start) = .;		\
 		*(.irqentry.text)					\
 		VMLINUX_SYMBOL(__irqentry_text_end) = .;
-#else
-#define IRQENTRY_TEXT
-#endif
 
-#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
 #define SOFTIRQENTRY_TEXT						\
 		ALIGN_FUNCTION();					\
 		VMLINUX_SYMBOL(__softirqentry_text_start) = .;		\
 		*(.softirqentry.text)					\
 		VMLINUX_SYMBOL(__softirqentry_text_end) = .;
-#else
-#define SOFTIRQENTRY_TEXT
-#endif
 
 /* Section used for early init (in .S files) */
 #define HEAD_TEXT  *(.head.text)
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index a2fddddb0d60..59ba11661b6e 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -18,6 +18,7 @@
 #include <linux/atomic.h>
 #include <asm/ptrace.h>
 #include <asm/irq.h>
+#include <asm/sections.h>
 
 /*
  * These correspond to the IORESOURCE_IRQ_* defines in
@@ -726,7 +727,6 @@ extern int early_irq_init(void);
 extern int arch_probe_nr_irqs(void);
 extern int arch_early_irq_init(void);
 
-#if defined(CONFIG_FUNCTION_GRAPH_TRACER) || defined(CONFIG_KASAN)
 /*
  * We want to know which function is an entrypoint of a hardirq or a softirq.
  */
@@ -734,16 +734,4 @@ extern int arch_early_irq_init(void);
 #define __softirq_entry  \
 	__attribute__((__section__(".softirqentry.text")))
 
-/* Limits of hardirq entrypoints */
-extern char __irqentry_text_start[];
-extern char __irqentry_text_end[];
-/* Limits of softirq entrypoints */
-extern char __softirqentry_text_start[];
-extern char __softirqentry_text_end[];
-
-#else
-#define __irq_entry
-#define __softirq_entry
-#endif
-
 #endif

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

* [PATCH -tip v8 4/4] [BUGFIX] kprobes/x86: Do not jump-optimize kprobes on irq entry code
  2017-07-30 10:10 [PATCH -tip v8 0/4] kprobes related bugfix Masami Hiramatsu
                   ` (2 preceding siblings ...)
  2017-07-30 10:14 ` [PATCH -tip v8 3/4] irq: Make irqentry text section unconditional Masami Hiramatsu
@ 2017-07-30 10:16 ` Masami Hiramatsu
  3 siblings, 0 replies; 8+ messages in thread
From: Masami Hiramatsu @ 2017-07-30 10:16 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner
  Cc: Francis Deslauriers, mathieu.desnoyers, Ingo Molnar,
	H . Peter Anvin, x86, Masami Hiramatsu,
	Ananth N Mavinakayanahalli, Anil S Keshavamurthy,
	David S . Miller, linux-kernel, Yoshinori Sato, Chris Zankel,
	Max Filippov

Since the kernel segment registers are not prepared at the
entry of irq-entry code, if a kprobe on such code is
jump-optimized, accessing per-cpu variables may cause
kernel panic.
However, if the kprobe is not optimized, it kicks int3
exception and set segment registers correctly.

This checks probe-address and if it is in irq-entry code,
it prohibits optimizing such kprobes. This means we can
continuously probing such interrupt handlers by kprobes
but it is not optimized anymore.

Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Reported-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Tested-by: Francis Deslauriers <francis.deslauriers@efficios.com>
---
 arch/x86/kernel/kprobes/opt.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/kprobes/opt.c b/arch/x86/kernel/kprobes/opt.c
index 69ea0bc1cfa3..4f98aad38237 100644
--- a/arch/x86/kernel/kprobes/opt.c
+++ b/arch/x86/kernel/kprobes/opt.c
@@ -39,6 +39,7 @@
 #include <asm/insn.h>
 #include <asm/debugreg.h>
 #include <asm/set_memory.h>
+#include <asm/sections.h>
 
 #include "common.h"
 
@@ -251,10 +252,12 @@ static int can_optimize(unsigned long paddr)
 
 	/*
 	 * Do not optimize in the entry code due to the unstable
-	 * stack handling.
+	 * stack handling and registers setup.
 	 */
-	if ((paddr >= (unsigned long)__entry_text_start) &&
-	    (paddr <  (unsigned long)__entry_text_end))
+	if (((paddr >= (unsigned long)__entry_text_start) &&
+	     (paddr <  (unsigned long)__entry_text_end)) ||
+	    ((paddr >= (unsigned long)__irqentry_text_start) &&
+	     (paddr <  (unsigned long)__irqentry_text_end)))
 		return 0;
 
 	/* Check there is enough space for a relative jump. */

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

* Re: [PATCH -tip v8 3/4] irq: Make irqentry text section unconditional
  2017-07-30 10:14 ` [PATCH -tip v8 3/4] irq: Make irqentry text section unconditional Masami Hiramatsu
@ 2017-08-02 17:35   ` kbuild test robot
  2017-08-03  2:16     ` Masami Hiramatsu
  2017-08-02 19:11   ` kbuild test robot
  1 sibling, 1 reply; 8+ messages in thread
From: kbuild test robot @ 2017-08-02 17:35 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: kbuild-all, Ingo Molnar, Thomas Gleixner, Francis Deslauriers,
	mathieu.desnoyers, Ingo Molnar, H . Peter Anvin, x86,
	Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Anil S Keshavamurthy, David S . Miller, linux-kernel,
	Yoshinori Sato, Chris Zankel, Max Filippov

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

Hi Masami,

[auto build test ERROR on tip/x86/core]
[also build test ERROR on v4.13-rc3 next-20170802]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/kprobes-related-bugfix/20170731-031202
config: cris-artpec_3_defconfig (attached as .config)
compiler: cris-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=cris 

All errors (new ones prefixed by >>):

>> arch/cris/arch-v32/mach-a3/arbiter.c:230:13: error: conflicting types for '_stext'
    extern char _stext, _etext;
                ^~~~~~
   In file included from ./arch/cris/include/generated/asm/sections.h:1:0,
                    from include/linux/interrupt.h:21,
                    from arch/cris/arch-v32/mach-a3/arbiter.c:44:
   include/asm-generic/sections.h:33:22: note: previous declaration of '_stext' was here
    extern char _text[], _stext[], _etext[];
                         ^~~~~~
>> arch/cris/arch-v32/mach-a3/arbiter.c:230:21: error: conflicting types for '_etext'
    extern char _stext, _etext;
                        ^~~~~~
   In file included from ./arch/cris/include/generated/asm/sections.h:1:0,
                    from include/linux/interrupt.h:21,
                    from arch/cris/arch-v32/mach-a3/arbiter.c:44:
   include/asm-generic/sections.h:33:32: note: previous declaration of '_etext' was here
    extern char _text[], _stext[], _etext[];
                                   ^~~~~~

vim +/_stext +230 arch/cris/arch-v32/mach-a3/arbiter.c

035e111f Jesper Nilsson 2007-11-29  229  
035e111f Jesper Nilsson 2007-11-29 @230  extern char _stext, _etext;
035e111f Jesper Nilsson 2007-11-29  231  

:::::: The code at line 230 was first introduced by commit
:::::: 035e111f9a9b29843bc899f03d56f19d94bebb53 CRIS v32: Add new machine dependent files for Etrax-FS and Artpec-3.

:::::: TO: Jesper Nilsson <jespern@stork.se.axis.com>
:::::: CC: Jesper Nilsson <jesper.nilsson@axis.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 9199 bytes --]

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

* Re: [PATCH -tip v8 3/4] irq: Make irqentry text section unconditional
  2017-07-30 10:14 ` [PATCH -tip v8 3/4] irq: Make irqentry text section unconditional Masami Hiramatsu
  2017-08-02 17:35   ` kbuild test robot
@ 2017-08-02 19:11   ` kbuild test robot
  1 sibling, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2017-08-02 19:11 UTC (permalink / raw)
  To: Masami Hiramatsu
  Cc: kbuild-all, Ingo Molnar, Thomas Gleixner, Francis Deslauriers,
	mathieu.desnoyers, Ingo Molnar, H . Peter Anvin, x86,
	Masami Hiramatsu, Ananth N Mavinakayanahalli,
	Anil S Keshavamurthy, David S . Miller, linux-kernel,
	Yoshinori Sato, Chris Zankel, Max Filippov

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

Hi Masami,

[auto build test ERROR on tip/x86/core]
[also build test ERROR on v4.13-rc3 next-20170802]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/kprobes-related-bugfix/20170731-031202
config: cris-etraxfs_defconfig (attached as .config)
compiler: cris-linux-gcc (GCC) 6.2.0
reproduce:
        wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=cris 

All errors (new ones prefixed by >>):

>> arch/cris/arch-v32/mach-fs/arbiter.c:161:13: error: conflicting types for '_stext'
    extern char _stext, _etext;
                ^~~~~~
   In file included from ./arch/cris/include/generated/asm/sections.h:1:0,
                    from include/linux/interrupt.h:21,
                    from arch/cris/arch-v32/mach-fs/arbiter.c:17:
   include/asm-generic/sections.h:33:22: note: previous declaration of '_stext' was here
    extern char _text[], _stext[], _etext[];
                         ^~~~~~
>> arch/cris/arch-v32/mach-fs/arbiter.c:161:21: error: conflicting types for '_etext'
    extern char _stext, _etext;
                        ^~~~~~
   In file included from ./arch/cris/include/generated/asm/sections.h:1:0,
                    from include/linux/interrupt.h:21,
                    from arch/cris/arch-v32/mach-fs/arbiter.c:17:
   include/asm-generic/sections.h:33:32: note: previous declaration of '_etext' was here
    extern char _text[], _stext[], _etext[];
                                   ^~~~~~

vim +/_stext +161 arch/cris/arch-v32/mach-fs/arbiter.c

035e111f Jesper Nilsson 2007-11-29  160  
035e111f Jesper Nilsson 2007-11-29 @161  extern char _stext, _etext;
035e111f Jesper Nilsson 2007-11-29  162  

:::::: The code at line 161 was first introduced by commit
:::::: 035e111f9a9b29843bc899f03d56f19d94bebb53 CRIS v32: Add new machine dependent files for Etrax-FS and Artpec-3.

:::::: TO: Jesper Nilsson <jespern@stork.se.axis.com>
:::::: CC: Jesper Nilsson <jesper.nilsson@axis.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 9137 bytes --]

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

* Re: [PATCH -tip v8 3/4] irq: Make irqentry text section unconditional
  2017-08-02 17:35   ` kbuild test robot
@ 2017-08-03  2:16     ` Masami Hiramatsu
  0 siblings, 0 replies; 8+ messages in thread
From: Masami Hiramatsu @ 2017-08-03  2:16 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, Ingo Molnar, Thomas Gleixner, Francis Deslauriers,
	mathieu.desnoyers, Ingo Molnar, H . Peter Anvin, x86,
	Ananth N Mavinakayanahalli, Anil S Keshavamurthy,
	David S . Miller, linux-kernel, Yoshinori Sato, Chris Zankel,
	Max Filippov

On Thu, 3 Aug 2017 01:35:11 +0800
kbuild test robot <lkp@intel.com> wrote:

> Hi Masami,
> 
> [auto build test ERROR on tip/x86/core]
> [also build test ERROR on v4.13-rc3 next-20170802]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/kprobes-related-bugfix/20170731-031202
> config: cris-artpec_3_defconfig (attached as .config)
> compiler: cris-linux-gcc (GCC) 6.2.0
> reproduce:
>         wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=cris 
> 
> All errors (new ones prefixed by >>):
> 
> >> arch/cris/arch-v32/mach-a3/arbiter.c:230:13: error: conflicting types for '_stext'
>     extern char _stext, _etext;
>                 ^~~~~~
>    In file included from ./arch/cris/include/generated/asm/sections.h:1:0,
>                     from include/linux/interrupt.h:21,
>                     from arch/cris/arch-v32/mach-a3/arbiter.c:44:
>    include/asm-generic/sections.h:33:22: note: previous declaration of '_stext' was here
>     extern char _text[], _stext[], _etext[];
>                          ^~~~~~
> >> arch/cris/arch-v32/mach-a3/arbiter.c:230:21: error: conflicting types for '_etext'
>     extern char _stext, _etext;
>                         ^~~~~~
>    In file included from ./arch/cris/include/generated/asm/sections.h:1:0,
>                     from include/linux/interrupt.h:21,
>                     from arch/cris/arch-v32/mach-a3/arbiter.c:44:
>    include/asm-generic/sections.h:33:32: note: previous declaration of '_etext' was here
>     extern char _text[], _stext[], _etext[];
>                                    ^~~~~~

OK, I'll add a fix for cris.

Thanks,

> 
> vim +/_stext +230 arch/cris/arch-v32/mach-a3/arbiter.c
> 
> 035e111f Jesper Nilsson 2007-11-29  229  
> 035e111f Jesper Nilsson 2007-11-29 @230  extern char _stext, _etext;
> 035e111f Jesper Nilsson 2007-11-29  231  
> 
> :::::: The code at line 230 was first introduced by commit
> :::::: 035e111f9a9b29843bc899f03d56f19d94bebb53 CRIS v32: Add new machine dependent files for Etrax-FS and Artpec-3.
> 
> :::::: TO: Jesper Nilsson <jespern@stork.se.axis.com>
> :::::: CC: Jesper Nilsson <jesper.nilsson@axis.com>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


-- 
Masami Hiramatsu <mhiramat@kernel.org>

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

end of thread, other threads:[~2017-08-03  2:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-30 10:10 [PATCH -tip v8 0/4] kprobes related bugfix Masami Hiramatsu
2017-07-30 10:12 ` [PATCH -tip v8 1/4] h8300: mark _stext and _etext as char-arrays, not single char Masami Hiramatsu
2017-07-30 10:13 ` [PATCH -tip v8 2/4] xtensa: mark _stext and _end " Masami Hiramatsu
2017-07-30 10:14 ` [PATCH -tip v8 3/4] irq: Make irqentry text section unconditional Masami Hiramatsu
2017-08-02 17:35   ` kbuild test robot
2017-08-03  2:16     ` Masami Hiramatsu
2017-08-02 19:11   ` kbuild test robot
2017-07-30 10:16 ` [PATCH -tip v8 4/4] [BUGFIX] kprobes/x86: Do not jump-optimize kprobes on irq entry code Masami Hiramatsu

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.