linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Huang Pei <huangpei@loongson.cn>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	ambrosehua@gmail.com
Cc: kbuild-all@lists.01.org, Bibo Mao <maobibo@loongson.cn>,
	linux-mips@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-mm@kvack.org, Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Paul Burton <paulburton@kernel.org>,
	Li Xuefeng <lixuefeng@loongson.cn>,
	Yang Tiezhu <yangtiezhu@loongson.cn>
Subject: Re: [PATCH 6/6] MIPS: add DYNAMIC_FTRACE_WITH_REGS and KPROBES_ON_FTACE
Date: Sun, 14 Mar 2021 05:37:01 +0800	[thread overview]
Message-ID: <202103140519.gbk4jc9S-lkp@intel.com> (raw)
In-Reply-To: <20210313064149.29276-7-huangpei@loongson.cn>

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

Hi Huang,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on tip/perf/core]
[also build test ERROR on trace/for-next linus/master v5.12-rc2 next-20210312]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Huang-Pei/MIPS-replace-pg-with-CC_FLAGS_FTRACE/20210313-154234
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 8bcfdd7cad3dffdd340f9a79098cbf331eb2cd53
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/c81a1cbcfd0d4b65f668fd824466b9bce02cee74
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Huang-Pei/MIPS-replace-pg-with-CC_FLAGS_FTRACE/20210313-154234
        git checkout c81a1cbcfd0d4b65f668fd824466b9bce02cee74
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> arch/mips/kernel/ftrace.c:170:6: error: conflicting types for 'kprobe_ftrace_handler'
     170 | void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
         |      ^~~~~~~~~~~~~~~~~~~~~
   In file included from arch/mips/kernel/ftrace.c:10:
   include/linux/kprobes.h:362:13: note: previous declaration of 'kprobe_ftrace_handler' was here
     362 | extern void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
         |             ^~~~~~~~~~~~~~~~~~~~~
   arch/mips/kernel/ftrace.c:226:15: warning: no previous prototype for 'prepare_ftrace_return' [-Wmissing-prototypes]
     226 | unsigned long prepare_ftrace_return(unsigned long parent, unsigned long self_ra,
         |               ^~~~~~~~~~~~~~~~~~~~~


vim +/kprobe_ftrace_handler +170 arch/mips/kernel/ftrace.c

   169	
 > 170	void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
   171				   struct ftrace_ops *ops, struct pt_regs *regs)
   172	{
   173		struct kprobe *p;
   174		struct kprobe_ctlblk *kcb;
   175		unsigned long orig_ip;
   176	
   177		p = get_kprobe((kprobe_opcode_t *)ip);
   178		if (unlikely(!p) || kprobe_disabled(p))
   179			return;
   180	
   181		kcb = get_kprobe_ctlblk();
   182		if (kprobe_running()) {
   183			kprobes_inc_nmissed_count(p);
   184		} else {
   185			/*
   186			 * pre_handler need epc point to the kprobe
   187			 *
   188			 */
   189			orig_ip = instruction_pointer(regs);
   190			instruction_pointer_set(regs, (unsigned long)p->addr);
   191			__this_cpu_write(current_kprobe, p);
   192			kcb->kprobe_status = KPROBE_HIT_ACTIVE;
   193			if (!p->pre_handler || !p->pre_handler(p, regs)) {
   194				/*
   195				 * Emulate singlestep (and also recover regs->nip)
   196				 * as if there is a nop
   197				 */
   198				if (unlikely(p->post_handler)) {
   199					kcb->kprobe_status = KPROBE_HIT_SSDONE;
   200					if ((unsigned long)p->addr == (ip + 4))
   201	
   202						ip = (unsigned long)p->addr + 8;
   203					else
   204						ip = (unsigned long)p->addr + 4;
   205					instruction_pointer_set(regs, ip);
   206					p->post_handler(p, regs, 0);
   207				}
   208			}
   209			instruction_pointer_set(regs, orig_ip);
   210			/*
   211			 * If pre_handler returns !0, we have to
   212			 * skip emulating post_handler.
   213			 */
   214			__this_cpu_write(current_kprobe, NULL);
   215		}
   216	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

      reply	other threads:[~2021-03-13 21:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-13  6:41 [RFC PATCH V2]: add DYNAMC_FTRACE_WITH_REGS and Huang Pei
2021-03-13  6:41 ` [PATCH 1/6] MIPS: replace -pg with CC_FLAGS_FTRACE Huang Pei
2021-03-25 19:38   ` Steven Rostedt
2021-03-26  1:48     ` Huang Pei
2021-03-13  6:41 ` [PATCH 2/6] MIPS: move FTRACE_SYSCALLS from ftrace.c into syscall.c Huang Pei
2021-03-25 19:38   ` Steven Rostedt
2021-03-26 14:01     ` Huang Pei
2021-03-13  6:41 ` [PATCH 3/6] MIPS: prepare for new ftrace implementation Huang Pei
2021-03-25 19:39   ` Steven Rostedt
2021-03-13  6:41 ` [PATCH 4/6] kprobes/ftrace: Use ftrace_location() when [dis]arming probes Huang Pei
2021-03-25 19:44   ` Steven Rostedt
2021-03-26 14:12     ` Huang Pei
2021-03-26 14:23       ` Steven Rostedt
2021-03-13  6:41 ` [PATCH 5/6] ftrace: introduce FTRACE_IP_EXTENSION Huang Pei
2021-03-13  9:26   ` Sergei Shtylyov
2021-03-13  6:41 ` [PATCH 6/6] MIPS: add DYNAMIC_FTRACE_WITH_REGS and KPROBES_ON_FTACE Huang Pei
2021-03-13 21:37   ` kernel 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=202103140519.gbk4jc9S-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ambrosehua@gmail.com \
    --cc=huangpei@loongson.cn \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lixuefeng@loongson.cn \
    --cc=maobibo@loongson.cn \
    --cc=paulburton@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangtiezhu@loongson.cn \
    /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