mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: kbuild-all@01.org, Ingo Molnar <mingo@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	peterz@infradead.org,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Andrea Righi <righi.andrea@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 2/2] kprobes: Mark ftrace mcount handler functions nokprobe
Date: Tue, 8 Jan 2019 01:23:27 +0800	[thread overview]
Message-ID: <201901080132.eegSABp6%fengguang.wu@intel.com> (raw)
In-Reply-To: <154686795211.15479.15577152313750689302.stgit@devbox>

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

Hi Masami,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.0-rc1 next-20190107]
[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-Fix-kretprobe-incorrect-stacking-order-problem/20190108-003448
config: i386-randconfig-x075-201901 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

>> kernel//trace/ftrace.c:6219:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
    static nokprobe_inline void
                           ^~~~
   kernel//trace/ftrace.c: In function 'ftrace_ops_list_func':
>> kernel//trace/ftrace.c:6277:2: error: implicit declaration of function '__ftrace_ops_list_func'; did you mean 'ftrace_ops_list_func'? [-Werror=implicit-function-declaration]
     __ftrace_ops_list_func(ip, parent_ip, NULL, regs);
     ^~~~~~~~~~~~~~~~~~~~~~
     ftrace_ops_list_func
   kernel//trace/ftrace.c: At top level:
>> kernel//trace/ftrace.c:6279:1: warning: data definition has no type or storage class
    NOKPROBE_SYMBOL(ftrace_ops_list_func);
    ^~~~~~~~~~~~~~~
>> kernel//trace/ftrace.c:6279:1: error: type defaults to 'int' in declaration of 'NOKPROBE_SYMBOL' [-Werror=implicit-int]
>> kernel//trace/ftrace.c:6279:1: warning: parameter names (without types) in function declaration
   kernel//trace/ftrace.c:6312:1: warning: data definition has no type or storage class
    NOKPROBE_SYMBOL(ftrace_ops_assist_func);
    ^~~~~~~~~~~~~~~
   kernel//trace/ftrace.c:6312:1: error: type defaults to 'int' in declaration of 'NOKPROBE_SYMBOL' [-Werror=implicit-int]
   kernel//trace/ftrace.c:6312:1: warning: parameter names (without types) in function declaration
   cc1: some warnings being treated as errors

vim +6277 kernel//trace/ftrace.c

4104d326 Steven Rostedt (Red Hat  2014-01-10  6218) 
0b5a8971 Masami Hiramatsu         2019-01-07 @6219  static nokprobe_inline void
2f5f6ad9 Steven Rostedt           2011-08-08  6220  __ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
a1e2e31d Steven Rostedt           2011-08-09  6221  		       struct ftrace_ops *ignored, struct pt_regs *regs)
b848914c Steven Rostedt           2011-05-04  6222  {
cdbe61bf Steven Rostedt           2011-05-05  6223  	struct ftrace_ops *op;
edc15caf Steven Rostedt           2012-11-02  6224  	int bit;
b848914c Steven Rostedt           2011-05-04  6225  
edc15caf Steven Rostedt           2012-11-02  6226  	bit = trace_test_and_set_recursion(TRACE_LIST_START, TRACE_LIST_MAX);
edc15caf Steven Rostedt           2012-11-02  6227  	if (bit < 0)
b1cff0ad Steven Rostedt           2011-05-25  6228  		return;
b1cff0ad Steven Rostedt           2011-05-25  6229  
cdbe61bf Steven Rostedt           2011-05-05  6230  	/*
cdbe61bf Steven Rostedt           2011-05-05  6231  	 * Some of the ops may be dynamically allocated,
74401729 Paul E. McKenney         2018-11-06  6232  	 * they must be freed after a synchronize_rcu().
cdbe61bf Steven Rostedt           2011-05-05  6233  	 */
cdbe61bf Steven Rostedt           2011-05-05  6234  	preempt_disable_notrace();
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6235) 
0a016409 Steven Rostedt           2012-11-02  6236  	do_for_each_ftrace_op(op, ftrace_ops_list) {
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6237) 		/*
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6238) 		 * Check the following for each ops before calling their func:
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6239) 		 *  if RCU flag is set, then rcu_is_watching() must be true
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6240) 		 *  if PER_CPU is set, then ftrace_function_local_disable()
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6241) 		 *                          must be false
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6242) 		 *  Otherwise test if the ip matches the ops filter
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6243) 		 *
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6244) 		 * If any of the above fails then the op->func() is not executed.
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6245) 		 */
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6246) 		if ((!(op->flags & FTRACE_OPS_FL_RCU) || rcu_is_watching()) &&
ba27f2bc Steven Rostedt (Red Hat  2015-11-30  6247) 		    ftrace_ops_test(op, ip, regs)) {
1d48d596 Steven Rostedt (Red Hat  2014-06-25  6248) 			if (FTRACE_WARN_ON(!op->func)) {
1d48d596 Steven Rostedt (Red Hat  2014-06-25  6249) 				pr_warn("op=%p %pS\n", op, op);
4104d326 Steven Rostedt (Red Hat  2014-01-10  6250) 				goto out;
4104d326 Steven Rostedt (Red Hat  2014-01-10  6251) 			}
a1e2e31d Steven Rostedt           2011-08-09  6252  			op->func(ip, parent_ip, op, regs);
4104d326 Steven Rostedt (Red Hat  2014-01-10  6253) 		}
0a016409 Steven Rostedt           2012-11-02  6254  	} while_for_each_ftrace_op(op);
4104d326 Steven Rostedt (Red Hat  2014-01-10  6255) out:
cdbe61bf Steven Rostedt           2011-05-05  6256  	preempt_enable_notrace();
edc15caf Steven Rostedt           2012-11-02  6257  	trace_clear_recursion(bit);
b848914c Steven Rostedt           2011-05-04  6258  }
b848914c Steven Rostedt           2011-05-04  6259  
2f5f6ad9 Steven Rostedt           2011-08-08  6260  /*
2f5f6ad9 Steven Rostedt           2011-08-08  6261   * Some archs only support passing ip and parent_ip. Even though
2f5f6ad9 Steven Rostedt           2011-08-08  6262   * the list function ignores the op parameter, we do not want any
2f5f6ad9 Steven Rostedt           2011-08-08  6263   * C side effects, where a function is called without the caller
2f5f6ad9 Steven Rostedt           2011-08-08  6264   * sending a third parameter.
a1e2e31d Steven Rostedt           2011-08-09  6265   * Archs are to support both the regs and ftrace_ops at the same time.
a1e2e31d Steven Rostedt           2011-08-09  6266   * If they support ftrace_ops, it is assumed they support regs.
a1e2e31d Steven Rostedt           2011-08-09  6267   * If call backs want to use regs, they must either check for regs
06aeaaea Masami Hiramatsu         2012-09-28  6268   * being NULL, or CONFIG_DYNAMIC_FTRACE_WITH_REGS.
06aeaaea Masami Hiramatsu         2012-09-28  6269   * Note, CONFIG_DYNAMIC_FTRACE_WITH_REGS expects a full regs to be saved.
a1e2e31d Steven Rostedt           2011-08-09  6270   * An architecture can pass partial regs with ftrace_ops and still
b8ec330a Li Bin                   2015-11-30  6271   * set the ARCH_SUPPORTS_FTRACE_OPS.
2f5f6ad9 Steven Rostedt           2011-08-08  6272   */
2f5f6ad9 Steven Rostedt           2011-08-08  6273  #if ARCH_SUPPORTS_FTRACE_OPS
2f5f6ad9 Steven Rostedt           2011-08-08  6274  static void ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
a1e2e31d Steven Rostedt           2011-08-09  6275  				 struct ftrace_ops *op, struct pt_regs *regs)
2f5f6ad9 Steven Rostedt           2011-08-08  6276  {
a1e2e31d Steven Rostedt           2011-08-09 @6277  	__ftrace_ops_list_func(ip, parent_ip, NULL, regs);
2f5f6ad9 Steven Rostedt           2011-08-08  6278  }
0b5a8971 Masami Hiramatsu         2019-01-07 @6279  NOKPROBE_SYMBOL(ftrace_ops_list_func);
2f5f6ad9 Steven Rostedt           2011-08-08  6280  #else
2f5f6ad9 Steven Rostedt           2011-08-08  6281  static void ftrace_ops_no_ops(unsigned long ip, unsigned long parent_ip)
2f5f6ad9 Steven Rostedt           2011-08-08  6282  {
a1e2e31d Steven Rostedt           2011-08-09  6283  	__ftrace_ops_list_func(ip, parent_ip, NULL, NULL);
2f5f6ad9 Steven Rostedt           2011-08-08  6284  }
0b5a8971 Masami Hiramatsu         2019-01-07  6285  NOKPROBE_SYMBOL(ftrace_ops_no_ops);
2f5f6ad9 Steven Rostedt           2011-08-08  6286  #endif
2f5f6ad9 Steven Rostedt           2011-08-08  6287  

:::::: The code at line 6277 was first introduced by commit
:::::: a1e2e31d175a1349274eba3465d17616c6725f8c ftrace: Return pt_regs to function trace callback

:::::: TO: Steven Rostedt <srostedt@redhat.com>
:::::: CC: Steven Rostedt <rostedt@goodmis.org>

---
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: 30841 bytes --]

  parent reply	other threads:[~2019-01-07 17:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-07 13:31 [PATCH 0/2] kprobes: Fix kretprobe incorrect stacking order problem Masami Hiramatsu
2019-01-07 13:32 ` [PATCH 1/2] x86/kprobes: Verify stack frame on kretprobe Masami Hiramatsu
2019-01-07 13:32 ` [PATCH 2/2] kprobes: Mark ftrace mcount handler functions nokprobe Masami Hiramatsu
2019-01-07 14:55   ` Andrea Righi
2019-01-07 17:29     ` Steven Rostedt
2019-01-08  2:41       ` Masami Hiramatsu
2019-01-08  2:40     ` Masami Hiramatsu
2019-01-07 17:23   ` kbuild test robot [this message]
2019-01-07 17:38   ` kbuild test robot
2019-01-07 17:28 ` [PATCH 0/2] kprobes: Fix kretprobe incorrect stacking order problem Andrea Righi
2019-01-07 18:34 ` Andrea Righi
2019-01-07 19:27   ` Steven Rostedt
2019-01-07 19:52     ` Andrea Righi
2019-01-07 19:59       ` Steven Rostedt
2019-01-07 21:19         ` Andrea Righi
2019-01-07 21:28           ` Steven Rostedt
2019-01-07 21:34             ` Andrea Righi
2019-01-08  2:56               ` Masami Hiramatsu

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=201901080132.eegSABp6%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=righi.andrea@gmail.com \
    --cc=rostedt@goodmis.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®