tree:
https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git coresched
head: 0cae4d526e66a8aa5f8b3626045be344860e9b8d
commit: 0cae4d526e66a8aa5f8b3626045be344860e9b8d [12/12] FIXUP: Add a ht_protect= kernel
cmdline option.
config: i386-randconfig-s002-20210115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-208-g46a52ca4-dirty
#
https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git/commit/?i...
git remote add jfern
https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git
git fetch --no-tags jfern coresched
git checkout 0cae4d526e66a8aa5f8b3626045be344860e9b8d
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from kernel/entry/common.c:4:
> include/linux/entry-common.h:452:48: warning: 'enum
ht_protect_ctx' declared inside parameter list will not be visible outside of this
definition or declaration
452 | static inline bool entry_kernel_protected(enum
ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
include/linux/entry-common.h:452:63: error: parameter 1 ('ctx') has incomplete
type
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
include/linux/entry-common.h:452:20: error: function declaration isn't a prototype
[-Werror=strict-prototypes]
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/context_tracking.h:5,
from kernel/entry/common.c:3:
include/linux/entry-common.h: In function 'entry_kernel_protected':
include/linux/sched.h:2099:45: error: expected expression before 'do'
2099 | #define sched_core_kernel_protected(ignore) do { } while (0)
| ^~
include/linux/entry-common.h:456:9: note: in expansion of macro
'sched_core_kernel_protected'
456 | return sched_core_kernel_protected(ctx) && _TIF_UNSAFE_RET != 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c: At top level:
> kernel/entry/common.c:22:13: warning: 'enum
ht_protect_ctx' declared inside parameter list will not be visible outside of this
definition or declaration
22 | enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
kernel/entry/common.c:22:28: error: parameter 2 ('ctx') has incomplete type
22 | enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
kernel/entry/common.c:21:29: error: function declaration isn't a prototype
[-Werror=strict-prototypes]
21 | static __always_inline void enter_from_user_mode(struct pt_regs *regs,
| ^~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c: In function 'syscall_enter_from_user_mode':
kernel/entry/common.c:99:29: error: 'HT_PROTECT_SYSCALL' undeclared (first use
in this function)
99 | enter_from_user_mode(regs, HT_PROTECT_SYSCALL);
| ^~~~~~~~~~~~~~~~~~
kernel/entry/common.c:99:29: note: each undeclared identifier is reported only once for
each function it appears in
kernel/entry/common.c: In function 'syscall_enter_from_user_mode_prepare':
kernel/entry/common.c:111:29: error: 'HT_PROTECT_SYSCALL' undeclared (first use
in this function)
111 | enter_from_user_mode(regs, HT_PROTECT_SYSCALL);
| ^~~~~~~~~~~~~~~~~~
kernel/entry/common.c: At top level:
kernel/entry/common.c:152:49: warning: 'enum ht_protect_ctx' declared inside
parameter list will not be visible outside of this definition or declaration
152 | static unsigned long exit_to_user_get_work(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
kernel/entry/common.c:152:64: error: parameter 1 ('ctx') has incomplete type
152 | static unsigned long exit_to_user_get_work(enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
kernel/entry/common.c:152:22: error: function declaration isn't a prototype
[-Werror=strict-prototypes]
152 | static unsigned long exit_to_user_get_work(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c:174:15: warning: 'enum ht_protect_ctx' declared inside
parameter list will not be visible outside of this definition or declaration
174 | enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
kernel/entry/common.c:174:30: error: parameter 3 ('ctx') has incomplete type
174 | enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
kernel/entry/common.c:172:22: error: function declaration isn't a prototype
[-Werror=strict-prototypes]
172 | static unsigned long exit_to_user_mode_loop(struct pt_regs *regs,
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c:217:66: warning: 'enum ht_protect_ctx' declared inside
parameter list will not be visible outside of this definition or declaration
217 | static void exit_to_user_mode_prepare(struct pt_regs *regs, enum ht_protect_ctx
ctx)
|
^~~~~~~~~~~~~~
kernel/entry/common.c:217:81: error: parameter 2 ('ctx') has incomplete type
217 | static void exit_to_user_mode_prepare(struct pt_regs *regs, enum ht_protect_ctx
ctx)
|
~~~~~~~~~~~~~~~~~~~~^~~
kernel/entry/common.c:217:13: error: function declaration isn't a prototype
[-Werror=strict-prototypes]
217 | static void exit_to_user_mode_prepare(struct pt_regs *regs, enum ht_protect_ctx
ctx)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/entry/common.c: In function 'syscall_exit_to_user_mode':
kernel/entry/common.c:300:34: error: 'HT_PROTECT_SYSCALL' undeclared (first use
in this function)
300 | exit_to_user_mode_prepare(regs, HT_PROTECT_SYSCALL);
| ^~~~~~~~~~~~~~~~~~
kernel/entry/common.c: In function 'irqentry_enter_from_user_mode':
kernel/entry/common.c:307:29: error: 'HT_PROTECT_IRQ' undeclared (first use in
this function)
307 | enter_from_user_mode(regs, HT_PROTECT_IRQ);
| ^~~~~~~~~~~~~~
kernel/entry/common.c: In function 'irqentry_exit_to_user_mode':
kernel/entry/common.c:313:34: error: 'HT_PROTECT_IRQ' undeclared (first use in
this function)
313 | exit_to_user_mode_prepare(regs, HT_PROTECT_IRQ);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from kernel/sched/idle.c:9:
kernel/sched/sched.h:1287:17: warning: 'struct sched_group' declared inside
parameter list will not be visible outside of this definition or declaration
1287 | struct sched_group *group)
| ^~~~~~~~~~~
In file included from kernel/sched/idle.c:11:
> include/linux/entry-common.h:452:48: warning: 'enum
ht_protect_ctx' declared inside parameter list will not be visible outside of this
definition or declaration
452 | static inline bool entry_kernel_protected(enum
ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~
include/linux/entry-common.h:452:63: error: parameter 1 ('ctx') has incomplete
type
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ~~~~~~~~~~~~~~~~~~~~^~~
include/linux/entry-common.h:452:20: error: function declaration isn't a prototype
[-Werror=strict-prototypes]
452 | static inline bool entry_kernel_protected(enum ht_protect_ctx ctx)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from kernel/sched/sched.h:5,
from kernel/sched/idle.c:9:
include/linux/entry-common.h: In function 'entry_kernel_protected':
include/linux/sched.h:2099:45: error: expected expression before 'do'
2099 | #define sched_core_kernel_protected(ignore) do { } while (0)
| ^~
include/linux/entry-common.h:456:9: note: in expansion of macro
'sched_core_kernel_protected'
456 | return sched_core_kernel_protected(ctx) && _TIF_UNSAFE_RET != 0;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +452 include/linux/entry-common.h
450
451 /* entry_kernel_protected - Is kernel protection on entry/exit into kernel
supported? */
452 static inline bool entry_kernel_protected(enum ht_protect_ctx
ctx)
453 {
454 if (!IS_ENABLED(CONFIG_SCHED_CORE))
455 return false;
456 return sched_core_kernel_protected(ctx) && _TIF_UNSAFE_RET != 0;
457 }
458
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org