[tip:WIP.x86/stackguards 19/29] arch/x86//kernel/nmi.c:493:52: error: 'cea_exception_stacks' undeclared

From: kbuild test robot
Date: Thu Apr 04 2019 - 18:58:39 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.x86/stackguards
head: f06282dacdf39de480ede989a689743402e1110c
commit: 2e2333a2ed97c5df6bac64f689a1d4695e8e9ec9 [19/29] x86/exceptions: Split debug IST stack
config: x86_64-randconfig-x003-201913 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 2e2333a2ed97c5df6bac64f689a1d4695e8e9ec9
# save the attached .config to linux build tree
make ARCH=x86_64

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

In file included from include/asm-generic/percpu.h:7:0,
from arch/x86/include/asm/percpu.h:544,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from arch/x86//kernel/nmi.c:13:
arch/x86//kernel/nmi.c: In function 'is_debug_stack':
>> arch/x86//kernel/nmi.c:493:52: error: 'cea_exception_stacks' undeclared (first use in this function)
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^
include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
typeof(variable) pscr_ret__; \
^~~~~~~~
>> include/linux/percpu-defs.h:446:2: note: in expansion of macro 'raw_cpu_read'
raw_cpu_read(pcp); \
^~~~~~~~~~~~
>> arch/x86//kernel/nmi.c:493:36: note: in expansion of macro '__this_cpu_read'
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^~~~~~~~~~~~~~~
arch/x86//kernel/nmi.c:493:52: note: each undeclared identifier is reported only once for each function it appears in
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^
include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
typeof(variable) pscr_ret__; \
^~~~~~~~
>> include/linux/percpu-defs.h:446:2: note: in expansion of macro 'raw_cpu_read'
raw_cpu_read(pcp); \
^~~~~~~~~~~~
>> arch/x86//kernel/nmi.c:493:36: note: in expansion of macro '__this_cpu_read'
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^~~~~~~~~~~~~~~
>> include/linux/percpu-defs.h:444:1: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
({ \
^
>> arch/x86//kernel/nmi.c:493:36: note: in expansion of macro '__this_cpu_read'
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^~~~~~~~~~~~~~~
>> arch/x86//kernel/nmi.c:494:22: error: implicit declaration of function 'CEA_ESTACK_TOP'; did you mean 'STACK_TOP'? [-Werror=implicit-function-declaration]
unsigned long top = CEA_ESTACK_TOP(cs, DB);
^~~~~~~~~~~~~~
STACK_TOP
>> arch/x86//kernel/nmi.c:494:41: error: 'DB' undeclared (first use in this function)
unsigned long top = CEA_ESTACK_TOP(cs, DB);
^~
>> arch/x86//kernel/nmi.c:495:22: error: implicit declaration of function 'CEA_ESTACK_BOT'; did you mean 'STACK_TOP'? [-Werror=implicit-function-declaration]
unsigned long bot = CEA_ESTACK_BOT(cs, DB1);
^~~~~~~~~~~~~~
STACK_TOP
>> arch/x86//kernel/nmi.c:495:41: error: 'DB1' undeclared (first use in this function); did you mean 'DB'?
unsigned long bot = CEA_ESTACK_BOT(cs, DB1);
^~~
DB
cc1: some warnings being treated as errors
--
In file included from include/asm-generic/percpu.h:7:0,
from arch/x86/include/asm/percpu.h:544,
from arch/x86/include/asm/preempt.h:6,
from include/linux/preempt.h:78,
from include/linux/spinlock.h:51,
from arch/x86/kernel/nmi.c:13:
arch/x86/kernel/nmi.c: In function 'is_debug_stack':
arch/x86/kernel/nmi.c:493:52: error: 'cea_exception_stacks' undeclared (first use in this function)
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^
include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
typeof(variable) pscr_ret__; \
^~~~~~~~
>> include/linux/percpu-defs.h:446:2: note: in expansion of macro 'raw_cpu_read'
raw_cpu_read(pcp); \
^~~~~~~~~~~~
arch/x86/kernel/nmi.c:493:36: note: in expansion of macro '__this_cpu_read'
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^~~~~~~~~~~~~~~
arch/x86/kernel/nmi.c:493:52: note: each undeclared identifier is reported only once for each function it appears in
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^
include/linux/percpu-defs.h:318:9: note: in definition of macro '__pcpu_size_call_return'
typeof(variable) pscr_ret__; \
^~~~~~~~
>> include/linux/percpu-defs.h:446:2: note: in expansion of macro 'raw_cpu_read'
raw_cpu_read(pcp); \
^~~~~~~~~~~~
arch/x86/kernel/nmi.c:493:36: note: in expansion of macro '__this_cpu_read'
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^~~~~~~~~~~~~~~
>> include/linux/percpu-defs.h:444:1: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
({ \
^
arch/x86/kernel/nmi.c:493:36: note: in expansion of macro '__this_cpu_read'
struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
^~~~~~~~~~~~~~~
arch/x86/kernel/nmi.c:494:22: error: implicit declaration of function 'CEA_ESTACK_TOP'; did you mean 'STACK_TOP'? [-Werror=implicit-function-declaration]
unsigned long top = CEA_ESTACK_TOP(cs, DB);
^~~~~~~~~~~~~~
STACK_TOP
arch/x86/kernel/nmi.c:494:41: error: 'DB' undeclared (first use in this function)
unsigned long top = CEA_ESTACK_TOP(cs, DB);
^~
arch/x86/kernel/nmi.c:495:22: error: implicit declaration of function 'CEA_ESTACK_BOT'; did you mean 'STACK_TOP'? [-Werror=implicit-function-declaration]
unsigned long bot = CEA_ESTACK_BOT(cs, DB1);
^~~~~~~~~~~~~~
STACK_TOP
arch/x86/kernel/nmi.c:495:41: error: 'DB1' undeclared (first use in this function); did you mean 'DB'?
unsigned long bot = CEA_ESTACK_BOT(cs, DB1);
^~~
DB
cc1: some warnings being treated as errors

vim +/cea_exception_stacks +493 arch/x86//kernel/nmi.c

490
491 static bool notrace is_debug_stack(unsigned long addr)
492 {
> 493 struct cea_exception_stacks *cs = __this_cpu_read(cea_exception_stacks);
> 494 unsigned long top = CEA_ESTACK_TOP(cs, DB);
> 495 unsigned long bot = CEA_ESTACK_BOT(cs, DB1);
496
497 if (__this_cpu_read(debug_stack_usage))
498 return true;
499 /*
500 * Note, this covers the guard page between DB and DB1 as well to
501 * avoid two checks. But by all means @addr can never point into
502 * the guard page.
503 */
504 return addr > bot && addr < top;
505 }
506 NOKPROBE_SYMBOL(is_debug_stack);
507 #endif
508

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip