Re: [PATCH] arm: Add KPROBES_ON_FTRACE supported

From: kernel test robot
Date: Sat Jun 15 2024 - 18:57:55 EST


Hi Jinjie,

kernel test robot noticed the following build errors:

[auto build test ERROR on soc/for-next]
[also build test ERROR on linus/master v6.10-rc3 next-20240613]
[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#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Jinjie-Ruan/arm-Add-KPROBES_ON_FTRACE-supported/20240614-102440
base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
patch link: https://lore.kernel.org/r/20240614022318.2600814-1-ruanjinjie%40huawei.com
patch subject: [PATCH] arm: Add KPROBES_ON_FTRACE supported
config: arm-allmodconfig (https://download.01.org/0day-ci/archive/20240616/202406160646.J89U1UKK-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240616/202406160646.J89U1UKK-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406160646.J89U1UKK-lkp@xxxxxxxxx/

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

>> drivers/gpu/drm/xe/xe_lrc.c:92: warning: "NOP" redefined
92 | #define NOP(x) (BIT(7) | (x))
|
In file included from include/linux/ftrace.h:23,
from include/linux/kprobes.h:28,
from include/linux/kgdb.h:19,
from include/drm/drm_util.h:36,
from include/drm/drm_connector.h:32,
from drivers/gpu/drm/i915/display/intel_display_core.h:16,
from drivers/gpu/drm/xe/xe_device_types.h:27,
from drivers/gpu/drm/xe/xe_vm_types.h:16,
from drivers/gpu/drm/xe/xe_bo.h:13,
from drivers/gpu/drm/xe/xe_lrc.c:14:
arch/arm/include/asm/ftrace.h:39: note: this is the location of the previous definition
39 | #define NOP 0xe28dd004 /* add sp, sp, #4 */
|
--
>> drivers/gpu/drm/xe/xe_pci.c:80: warning: "NOP" redefined
80 | #define NOP(x) x
|
In file included from include/linux/ftrace.h:23,
from include/linux/kprobes.h:28,
from include/linux/kgdb.h:19,
from include/drm/drm_util.h:36,
from drivers/gpu/drm/xe/xe_device.h:12,
from drivers/gpu/drm/xe/display/xe_display.h:9,
from drivers/gpu/drm/xe/xe_pci.c:18:
arch/arm/include/asm/ftrace.h:39: note: this is the location of the previous definition
39 | #define NOP 0xe28dd004 /* add sp, sp, #4 */
|
--
In file included from include/linux/ftrace.h:23,
from include/linux/perf_event.h:52,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:93,
from drivers/scsi/aacraid/linit.c:32:
>> arch/arm/include/asm/ftrace.h:39:25: error: expected identifier before numeric constant
39 | #define NOP 0xe28dd004 /* add sp, sp, #4 */
| ^~~~~~~~~~
include/scsi/scsi_status.h:19:9: note: in expansion of macro 'NOP'
19 | NOP = 0x08,
| ^~~
In file included from drivers/scsi/aacraid/linit.c:38:
include/scsi/scsi_cmnd.h: In function 'scsi_msg_to_host_byte':
>> include/scsi/scsi_cmnd.h:372:14: error: 'TARGET_RESET' undeclared (first use in this function)
372 | case TARGET_RESET:
| ^~~~~~~~~~~~
include/scsi/scsi_cmnd.h:372:14: note: each undeclared identifier is reported only once for each function it appears in


vim +39 arch/arm/include/asm/ftrace.h

24
25 /*
26 * The compiler emitted profiling hook consists of
27 *
28 * PUSH {LR}
29 * BL __gnu_mcount_nc
30 *
31 * To turn this combined sequence into a NOP, we need to restore the value of
32 * SP before the PUSH. Let's use an ADD rather than a POP into LR, as LR is not
33 * modified anyway, and reloading LR from memory is highly likely to be less
34 * efficient.
35 */
36 #ifdef CONFIG_THUMB2_KERNEL
37 #define NOP 0xf10d0d04 /* add.w sp, sp, #4 */
38 #else
> 39 #define NOP 0xe28dd004 /* add sp, sp, #4 */
40 #endif
41

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki