From: kbuild test robot <lkp@intel•com>
To: Sam Tebbs <sam.tebbs@arm•com>
Cc: Catalin Marinas <catalin.marinas@arm•com>,
kbuild-all@lists•01.org, Robin Murphy <robin.murphy@arm•com>,
linux-arm-kernel@lists•infradead.org
Subject: [arm64:for-next/cortex-strings 1/8] arch/arm64/kernel/probes/kprobes.c:342:7: error: too few arguments to function 'fixup_exception'
Date: Thu, 17 Oct 2019 20:48:21 +0800 [thread overview]
Message-ID: <201910172018.WxclU6OH%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6358 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/cortex-strings
head: 99aa2abe95ef6b015a1336aa4f61a2663fb900b5
commit: 0016aab2d6f19b53d6adcc14933a9c1a8e48c992 [1/8] arm64: Allow passing fault address to fixup handlers
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 0016aab2d6f19b53d6adcc14933a9c1a8e48c992
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel•com>
All errors (new ones prefixed by >>):
arch/arm64/kernel/probes/kprobes.c: In function 'kprobe_fault_handler':
>> arch/arm64/kernel/probes/kprobes.c:342:7: error: too few arguments to function 'fixup_exception'
if (fixup_exception(regs))
^~~~~~~~~~~~~~~
In file included from arch/arm64/include/asm/uaccess.h:24:0,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/ptrace.h:7,
from include/linux/ftrace.h:14,
from include/linux/kprobes.h:29,
from arch/arm64/kernel/probes/kprobes.c:12:
arch/arm64/include/asm/extable.h:31:12: note: declared here
extern int fixup_exception(struct pt_regs *regs, unsigned long addr);
^~~~~~~~~~~~~~~
vim +/fixup_exception +342 arch/arm64/kernel/probes/kprobes.c
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 291
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 292 int __kprobes kprobe_fault_handler(struct pt_regs *regs, unsigned int fsr)
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 293 {
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 294 struct kprobe *cur = kprobe_running();
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 295 struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 296
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 297 switch (kcb->kprobe_status) {
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 298 case KPROBE_HIT_SS:
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 299 case KPROBE_REENTER:
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 300 /*
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 301 * We are here because the instruction being single
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 302 * stepped caused a page fault. We reset the current
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 303 * kprobe and the ip points back to the probe address
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 304 * and allow the page fault handler to continue as a
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 305 * normal page fault.
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 306 */
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 307 instruction_pointer_set(regs, (unsigned long) cur->addr);
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 308 if (!instruction_pointer(regs))
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 309 BUG();
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 310
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 311 kernel_disable_single_step();
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 312
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 313 if (kcb->kprobe_status == KPROBE_REENTER)
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 314 restore_previous_kprobe(kcb);
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 315 else
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 316 reset_current_kprobe();
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 317
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 318 break;
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 319 case KPROBE_HIT_ACTIVE:
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 320 case KPROBE_HIT_SSDONE:
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 321 /*
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 322 * We increment the nmissed count for accounting,
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 323 * we can also use npre/npostfault count for accounting
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 324 * these specific fault cases.
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 325 */
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 326 kprobes_inc_nmissed_count(cur);
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 327
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 328 /*
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 329 * We come here because instructions in the pre/post
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 330 * handler caused the page_fault, this could happen
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 331 * if handler tries to access user space by
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 332 * copy_from_user(), get_user() etc. Let the
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 333 * user-specified handler try to fix it first.
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 334 */
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 335 if (cur->fault_handler && cur->fault_handler(cur, regs, fsr))
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 336 return 1;
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 337
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 338 /*
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 339 * In case the user-specified fault handler returned
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 340 * zero, try to fix up.
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 341 */
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 @342 if (fixup_exception(regs))
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 343 return 1;
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 344 }
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 345 return 0;
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 346 }
2dd0e8d2d2a157 Sandeepa Prabhu 2016-07-08 347
:::::: The code at line 342 was first introduced by commit
:::::: 2dd0e8d2d2a157dbc83295a78336c2217110f2f8 arm64: Kprobes with single stepping support
:::::: TO: Sandeepa Prabhu <sandeepa.s.prabhu@gmail•com>
:::::: CC: Catalin Marinas <catalin.marinas@arm•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: 67222 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
reply other threads:[~2019-10-17 12:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201910172018.WxclU6OH%lkp@intel.com \
--to=lkp@intel$(echo .)com \
--cc=catalin.marinas@arm$(echo .)com \
--cc=kbuild-all@lists$(echo .)01.org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=robin.murphy@arm$(echo .)com \
--cc=sam.tebbs@arm$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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