linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: WANG Chao <wcwxyz@gmail.com>
Cc: kbuild-all@01.org, Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched: unlikely corrupted stack end
Date: Tue, 14 Jun 2016 17:08:42 +0800	[thread overview]
Message-ID: <201606141733.erFn24fS%fengguang.wu@intel.com> (raw)
In-Reply-To: <20160614082423.6068-1-wcwxyz@gmail.com>

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

Hi,

[auto build test ERROR on tip/sched/core]
[also build test ERROR on v4.7-rc3 next-20160614]
[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/WANG-Chao/sched-unlikely-corrupted-stack-end/20160614-162711
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 4.9.0
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=ia64 

All error/warnings (new ones prefixed by >>):

   warning: (FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && KMEMCHECK && LOCKDEP) selects FRAME_POINTER which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || FRV || UML || AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS)
   warning: (FAULT_INJECTION_STACKTRACE_FILTER && LATENCYTOP && KMEMCHECK && LOCKDEP) selects FRAME_POINTER which has unmet direct dependencies (DEBUG_KERNEL && (CRIS || M68K || FRV || UML || AVR32 || SUPERH || BLACKFIN || MN10300 || METAG) || ARCH_WANT_FRAME_POINTERS)
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/uapi/linux/capability.h:16,
                    from include/linux/capability.h:15,
                    from include/linux/sched.h:15,
                    from arch/ia64/kernel/asm-offsets.c:9:
   include/linux/sched.h: In function 'task_stack_end_corrupted':
>> arch/ia64/include/asm/ptrace.h:37:29: error: 'IA64_TASK_SIZE' undeclared (first use in this function)
    #define IA64_RBS_OFFSET   ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 31) & ~31)
                                ^
   include/linux/compiler.h:170:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
>> arch/ia64/include/asm/thread_info.h:74:57: note: in expansion of macro 'IA64_RBS_OFFSET'
    #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
                                                            ^
>> include/linux/sched.h:3006:20: note: in expansion of macro 'end_of_stack'
     return unlikely(*(end_of_stack(p)) != STACK_END_MAGIC);
                       ^
   arch/ia64/include/asm/ptrace.h:37:29: note: each undeclared identifier is reported only once for each function it appears in
    #define IA64_RBS_OFFSET   ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 31) & ~31)
                                ^
   include/linux/compiler.h:170:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
>> arch/ia64/include/asm/thread_info.h:74:57: note: in expansion of macro 'IA64_RBS_OFFSET'
    #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
                                                            ^
>> include/linux/sched.h:3006:20: note: in expansion of macro 'end_of_stack'
     return unlikely(*(end_of_stack(p)) != STACK_END_MAGIC);
                       ^
>> arch/ia64/include/asm/ptrace.h:37:46: error: 'IA64_THREAD_INFO_SIZE' undeclared (first use in this function)
    #define IA64_RBS_OFFSET   ((IA64_TASK_SIZE + IA64_THREAD_INFO_SIZE + 31) & ~31)
                                                 ^
   include/linux/compiler.h:170:42: note: in definition of macro 'unlikely'
    # define unlikely(x) __builtin_expect(!!(x), 0)
                                             ^
>> arch/ia64/include/asm/thread_info.h:74:57: note: in expansion of macro 'IA64_RBS_OFFSET'
    #define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
                                                            ^
>> include/linux/sched.h:3006:20: note: in expansion of macro 'end_of_stack'
     return unlikely(*(end_of_stack(p)) != STACK_END_MAGIC);
                       ^
   make[2]: *** [arch/ia64/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [sub-make] Error 2

vim +/end_of_stack +3006 include/linux/sched.h

  2990	 * When the stack grows up, this is the highest address.
  2991	 * Beyond that position, we corrupt data on the next page.
  2992	 */
  2993	static inline unsigned long *end_of_stack(struct task_struct *p)
  2994	{
  2995	#ifdef CONFIG_STACK_GROWSUP
  2996		return (unsigned long *)((unsigned long)task_thread_info(p) + THREAD_SIZE) - 1;
  2997	#else
  2998		return (unsigned long *)(task_thread_info(p) + 1);
  2999	#endif
  3000	}
  3001	
  3002	#endif
  3003	
  3004	static inline int task_stack_end_corrupted(struct task_struct *p)
  3005	{
> 3006		return unlikely(*(end_of_stack(p)) != STACK_END_MAGIC);
  3007	}
  3008	
  3009	static inline int object_is_on_stack(void *obj)
  3010	{
  3011		void *stack = task_stack_page(current);
  3012	
  3013		return (obj >= stack) && (obj < (stack + THREAD_SIZE));
  3014	}

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

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 43700 bytes --]

      parent reply	other threads:[~2016-06-14  9:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-14  6:43 [PATCH] " WANG Chao
2016-06-14  7:43 ` Ingo Molnar
2016-06-14  8:17 ` Peter Zijlstra
2016-06-14  8:24 ` [PATCH v2] " WANG Chao
2016-06-14  8:56   ` Ingo Molnar
2016-06-14 10:17     ` WANG Chao
2016-06-14 10:26       ` Ingo Molnar
2016-06-14 16:55         ` WANG Chao
2016-06-15  8:25           ` Ingo Molnar
2016-06-15  8:53             ` [PATCH v3] " WANG Chao
2016-06-14  9:08   ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201606141733.erFn24fS%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=wcwxyz@gmail.com \
    --subject='Re: [PATCH v2] sched: unlikely corrupted stack end' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).