* [hnaz-mm:master 29/122] arch/arm64/kernel/stacktrace.c:289:13: error: implicit declaration of function 'task_scs' is invalid in C99
@ 2022-03-31 12:59 kernel test robot
2022-03-31 23:10 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-03-31 12:59 UTC (permalink / raw)
To: Andrey Konovalov
Cc: llvm, kbuild-all, linux-kernel, Johannes Weiner, Andrew Morton,
Linux Memory Management List
tree: https://github.com/hnaz/linux-mm master
head: 074b4ea9811e2c47ae1ecada177629c19fa56d59
commit: 8cdc580c5ca2ffecb0db4f84a99167ef763a21cc [29/122] arm64: implement stack_trace_save_shadow
config: arm64-randconfig-r012-20220331 (https://download.01.org/0day-ci/archive/20220331/202203312049.zLjHyetm-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 881350a92d821d4f8e4fa648443ed1d17e251188)
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
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/hnaz/linux-mm/commit/8cdc580c5ca2ffecb0db4f84a99167ef763a21cc
git remote add hnaz-mm https://github.com/hnaz/linux-mm
git fetch --no-tags hnaz-mm master
git checkout 8cdc580c5ca2ffecb0db4f84a99167ef763a21cc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
>> arch/arm64/kernel/stacktrace.c:289:13: error: implicit declaration of function 'task_scs' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
scs_base = task_scs(current);
^
>> arch/arm64/kernel/stacktrace.c:289:11: warning: incompatible integer to pointer conversion assigning to 'unsigned long *' from 'int' [-Wint-conversion]
scs_base = task_scs(current);
^ ~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
vim +/task_scs +289 arch/arm64/kernel/stacktrace.c
260
261 noinline notrace int arch_stack_walk_shadow(unsigned long *store,
262 unsigned int size,
263 unsigned int skipnr)
264 {
265 unsigned long *scs_top, *scs_base, *scs_next;
266 unsigned int len = 0, part;
267
268 preempt_disable();
269
270 /* Get the SCS pointer. */
271 asm volatile("mov %0, x18" : "=&r" (scs_top));
272
273 /* The top SCS slot is empty. */
274 scs_top -= 1;
275
276 /* Handle SDEI and hardirq frames. */
277 for (part = 0; part < ARRAY_SIZE(scs_parts); part++) {
278 scs_next = *this_cpu_ptr(scs_parts[part].saved);
279 if (scs_next) {
280 scs_base = *this_cpu_ptr(scs_parts[part].base);
281 if (walk_shadow_stack_part(scs_top, scs_base, store,
282 size, &skipnr, &len))
283 goto out;
284 scs_top = scs_next;
285 }
286 }
287
288 /* Handle task and softirq frames. */
> 289 scs_base = task_scs(current);
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [hnaz-mm:master 29/122] arch/arm64/kernel/stacktrace.c:289:13: error: implicit declaration of function 'task_scs' is invalid in C99
2022-03-31 12:59 [hnaz-mm:master 29/122] arch/arm64/kernel/stacktrace.c:289:13: error: implicit declaration of function 'task_scs' is invalid in C99 kernel test robot
@ 2022-03-31 23:10 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2022-03-31 23:10 UTC (permalink / raw)
To: kernel test robot
Cc: Andrey Konovalov, llvm, kbuild-all, linux-kernel,
Johannes Weiner, Linux Memory Management List
On Thu, 31 Mar 2022 20:59:49 +0800 kernel test robot <lkp@intel.com> wrote:
> >> arch/arm64/kernel/stacktrace.c:289:13: error: implicit declaration of function 'task_scs' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
> scs_base = task_scs(current);
> ^
Thanks. Presumably this:
--- a/arch/arm64/kernel/stacktrace.c~arm64-implement-stack_trace_save_shadow-fix
+++ a/arch/arm64/kernel/stacktrace.c
@@ -213,6 +213,7 @@ noinline notrace void arch_stack_walk(st
walk_stackframe(task, &frame, consume_entry, cookie);
}
+#ifdef CONFIG_SHADOW_CALL_STACK
static const struct {
unsigned long ** __percpu saved;
unsigned long ** __percpu base;
@@ -293,3 +294,4 @@ out:
preempt_enable();
return len;
}
+#endif /* CONFIG_SHADOW_CALL_STACK */
_
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-03-31 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-31 12:59 [hnaz-mm:master 29/122] arch/arm64/kernel/stacktrace.c:289:13: error: implicit declaration of function 'task_scs' is invalid in C99 kernel test robot
2022-03-31 23:10 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).