[tglx-devel:depthtracking 35/38] arch/x86/kernel/callthunks.c:501:9: error: implicit declaration of function 'kprobe_add_area_blacklist'

From: kernel test robot
Date: Thu Jul 14 2022 - 09:25:40 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git depthtracking
head: 81d2c1b17a61bfeca4b92a5d6e1fb6f5ff464826
commit: 57b6f2ca7edda679f0a9fe58087ecc9dd9f8dafb [35/38] kprobes: Add callthunk blacklisting
config: x86_64-randconfig-a004 (https://download.01.org/0day-ci/archive/20220714/202207142151.EbbJvHp7-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git/commit/?id=57b6f2ca7edda679f0a9fe58087ecc9dd9f8dafb
git remote add tglx-devel https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git
git fetch --no-tags tglx-devel depthtracking
git checkout 57b6f2ca7edda679f0a9fe58087ecc9dd9f8dafb
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

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

All errors (new ones prefixed by >>):

arch/x86/kernel/callthunks.c: In function 'callthunks_init':
>> arch/x86/kernel/callthunks.c:501:9: error: implicit declaration of function 'kprobe_add_area_blacklist' [-Werror=implicit-function-declaration]
501 | kprobe_add_area_blacklist(base, base + size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +/kprobe_add_area_blacklist +501 arch/x86/kernel/callthunks.c

477
478 static __init noinline void callthunks_init(struct callthunk_sites *cs)
479 {
480 unsigned long base, size;
481 int ret;
482
483 if (cpu_feature_enabled(X86_FEATURE_CALL_DEPTH)) {
484 callthunk_desc.template = skl_call_thunk_template;
485 callthunk_desc.template_size = SKL_TMPL_SIZE;
486 callthunk_desc.thunk_size = SKL_CALLTHUNK_SIZE;
487 }
488
489 if (!callthunk_desc.template)
490 return;
491
492 if (WARN_ON_ONCE(btree_init64(&call_thunks)))
493 return;
494
495 ret = callthunks_setup(cs, &builtin_layout);
496 if (WARN_ON_ONCE(ret))
497 return;
498
499 base = (unsigned long)builtin_layout.base;
500 size = builtin_layout.size;
> 501 kprobe_add_area_blacklist(base, base + size);
502 static_call_force_reinit();
503 thunks_initialized = true;
504 }
505

--
0-DAY CI Kernel Test Service
https://01.org/lkp