Re: [PATCH v3 10/13] powerpc/ptrace: split out ADV_DEBUG_REGS related functions.

From: kbuild test robot
Date: Wed Feb 26 2020 - 14:12:27 EST


Hi Christophe,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.6-rc3 next-20200226]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Christophe-Leroy/Reduce-ifdef-mess-in-ptrace/20200227-011143
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=powerpc

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

Note: the linux-review/Christophe-Leroy/Reduce-ifdef-mess-in-ptrace/20200227-011143 HEAD 14a582f53275332199397e25fe49bd2597d4cb19 builds fine.
It only hurts bisectibility.

All errors (new ones prefixed by >>):

arch/powerpc/kernel/ptrace/ptrace.c: In function 'ptrace_triggered':
>> arch/powerpc/kernel/ptrace/ptrace.c:46:2: error: implicit declaration of function 'modify_user_hw_breakpoint'; did you mean '__set_breakpoint'? [-Werror=implicit-function-declaration]
modify_user_hw_breakpoint(bp, &attr);
^~~~~~~~~~~~~~~~~~~~~~~~~
__set_breakpoint
cc1: all warnings being treated as errors

vim +46 arch/powerpc/kernel/ptrace/ptrace.c

57d28fcb6dde29 arch/powerpc/kernel/ptrace/ptrace.c Christophe Leroy 2020-02-26 31
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 32 #ifdef CONFIG_HAVE_HW_BREAKPOINT
a8b0ca17b80e92 arch/powerpc/kernel/ptrace.c Peter Zijlstra 2011-06-27 33 void ptrace_triggered(struct perf_event *bp,
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 34 struct perf_sample_data *data, struct pt_regs *regs)
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 35 {
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 36 struct perf_event_attr attr;
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 37
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 38 /*
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 39 * Disable the breakpoint request here since ptrace has defined a
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 40 * one-shot behaviour for breakpoint exceptions in PPC64.
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 41 * The SIGTRAP signal is generated automatically for us in do_dabr().
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 42 * We don't have to do anything about that here
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 43 */
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 44 attr = bp->attr;
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 45 attr.disabled = true;
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 @46 modify_user_hw_breakpoint(bp, &attr);
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 47 }
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 48 #endif /* CONFIG_HAVE_HW_BREAKPOINT */
5aae8a53708025 arch/powerpc/kernel/ptrace.c K.Prasad 2010-06-15 49

:::::: The code at line 46 was first introduced by commit
:::::: 5aae8a53708025d4e718f0d2e7c2f766779ddc71 powerpc, hw_breakpoints: Implement hw_breakpoints for 64-bit server processors

:::::: TO: K.Prasad <prasad@xxxxxxxxxxxxxxxxxx>
:::::: CC: Paul Mackerras <paulus@xxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip