tree:
https://github.com/congwang/linux.git bpf-timer
head: 78245045626bf039d5e1ccc3a2f2f8b3a7079e8e
commit: 78245045626bf039d5e1ccc3a2f2f8b3a7079e8e [1/1] bpf: introduce bpf timer
config: x86_64-randconfig-m001-20210317 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/congwang/linux/commit/78245045626bf039d5e1ccc3a2f2f8b3...
git remote add congwang
https://github.com/congwang/linux.git
git fetch --no-tags congwang bpf-timer
git checkout 78245045626bf039d5e1ccc3a2f2f8b3a7079e8e
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>):
include/linux/filter.h:456:47: error: unknown type name '__BPF_MAP_1'
456 | #define __BPF_MAP_2(m, v, t, a, ...) m(t, a), __BPF_MAP_1(m, v, __VA_ARGS__)
| ^~~~~~~~~~~
include/linux/filter.h:457:47: note: in expansion of macro '__BPF_MAP_2'
457 | #define __BPF_MAP_3(m, v, t, a, ...) m(t, a), __BPF_MAP_2(m, v, __VA_ARGS__)
| ^~~~~~~~~~~
include/linux/filter.h:458:47: note: in expansion of macro '__BPF_MAP_3'
458 | #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__)
| ^~~~~~~~~~~
include/linux/filter.h:468:27: note: in expansion of macro '__BPF_MAP_4'
468 | #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__)
| ^~~~~~~~~~
include/linux/filter.h:465:26: note: in expansion of macro '__BPF_MAP'
465 | #define __BPF_REG_4(...) __BPF_MAP(4, __VA_ARGS__), __BPF_PAD(1)
| ^~~~~~~~~
include/linux/filter.h:469:27: note: in expansion of macro '__BPF_REG_4'
469 | #define __BPF_REG(n, ...) __BPF_REG_##n(__VA_ARGS__)
| ^~~~~~~~~~
include/linux/filter.h:490:11: note: in expansion of macro '__BPF_REG'
490 | u64 name(__BPF_REG(x, __BPF_DECL_REGS, __BPF_N, __VA_ARGS__)); \
| ^~~~~~~~~
include/linux/filter.h:502:31: note: in expansion of macro 'BPF_CALL_x'
502 | #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__)
| ^~~~~~~~~~
kernel/bpf/helpers.c:684:9: note: in expansion of macro 'BPF_CALL_4'
684 | notrace BPF_CALL_4(bpf_timer_create, void *, callback_fn, void *,
callback_arg,
| ^~~~~~~~~~
kernel/bpf/helpers.c:685:1: error: macro "__BPF_MAP_1" requires 5 arguments,
but only 3 given
685 | u32, flags)
| ^ ~~~~~~
In file included from kernel/bpf/helpers.c:12:
include/linux/filter.h:455: note: macro "__BPF_MAP_1" defined here
455 | #define __BPF_MAP_1(m, v, t, a, ...) m(t, a)
|
include/linux/filter.h:456:47: error: unknown type name '__BPF_MAP_1'
456 | #define __BPF_MAP_2(m, v, t, a, ...) m(t, a), __BPF_MAP_1(m, v, __VA_ARGS__)
| ^~~~~~~~~~~
include/linux/filter.h:457:47: note: in expansion of macro '__BPF_MAP_2'
457 | #define __BPF_MAP_3(m, v, t, a, ...) m(t, a), __BPF_MAP_2(m, v, __VA_ARGS__)
| ^~~~~~~~~~~
include/linux/filter.h:458:47: note: in expansion of macro '__BPF_MAP_3'
458 | #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__)
| ^~~~~~~~~~~
include/linux/filter.h:468:27: note: in expansion of macro '__BPF_MAP_4'
468 | #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__)
| ^~~~~~~~~~
include/linux/filter.h:465:26: note: in expansion of macro '__BPF_MAP'
465 | #define __BPF_REG_4(...) __BPF_MAP(4, __VA_ARGS__), __BPF_PAD(1)
| ^~~~~~~~~
include/linux/filter.h:469:27: note: in expansion of macro '__BPF_REG_4'
469 | #define __BPF_REG(n, ...) __BPF_REG_##n(__VA_ARGS__)
| ^~~~~~~~~~
include/linux/filter.h:491:11: note: in expansion of macro '__BPF_REG'
491 | u64 name(__BPF_REG(x, __BPF_DECL_REGS, __BPF_N, __VA_ARGS__)) \
| ^~~~~~~~~
include/linux/filter.h:502:31: note: in expansion of macro 'BPF_CALL_x'
502 | #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__)
| ^~~~~~~~~~
kernel/bpf/helpers.c:684:9: note: in expansion of macro 'BPF_CALL_4'
684 | notrace BPF_CALL_4(bpf_timer_create, void *, callback_fn, void *,
callback_arg,
| ^~~~~~~~~~
kernel/bpf/helpers.c:685:1: error: macro "__BPF_MAP_1" requires 5 arguments,
but only 3 given
685 | u32, flags)
| ^ ~~~~~~
In file included from kernel/bpf/helpers.c:12:
include/linux/filter.h:455: note: macro "__BPF_MAP_1" defined here
455 | #define __BPF_MAP_1(m, v, t, a, ...) m(t, a)
|
kernel/bpf/helpers.c:685:1: error: macro "__BPF_MAP_1" requires 5 arguments,
but only 3 given
685 | u32, flags)
| ^ ~~~~~~
In file included from kernel/bpf/helpers.c:12:
include/linux/filter.h:455: note: macro "__BPF_MAP_1" defined here
455 | #define __BPF_MAP_1(m, v, t, a, ...) m(t, a)
|
include/linux/filter.h:456:47: error: unknown type name '__BPF_MAP_1'
456 | #define __BPF_MAP_2(m, v, t, a, ...) m(t, a), __BPF_MAP_1(m, v, __VA_ARGS__)
| ^~~~~~~~~~~
include/linux/filter.h:457:47: note: in expansion of macro '__BPF_MAP_2'
457 | #define __BPF_MAP_3(m, v, t, a, ...) m(t, a), __BPF_MAP_2(m, v, __VA_ARGS__)
| ^~~~~~~~~~~
include/linux/filter.h:458:47: note: in expansion of macro '__BPF_MAP_3'
458 | #define __BPF_MAP_4(m, v, t, a, ...) m(t, a), __BPF_MAP_3(m, v, __VA_ARGS__)
| ^~~~~~~~~~~
include/linux/filter.h:468:27: note: in expansion of macro '__BPF_MAP_4'
468 | #define __BPF_MAP(n, ...) __BPF_MAP_##n(__VA_ARGS__)
| ^~~~~~~~~~
include/linux/filter.h:496:17: note: in expansion of macro '__BPF_MAP'
496 | u64 ____##name(__BPF_MAP(x, __BPF_DECL_ARGS, __BPF_V, __VA_ARGS__))
| ^~~~~~~~~
include/linux/filter.h:502:31: note: in expansion of macro 'BPF_CALL_x'
502 | #define BPF_CALL_4(name, ...) BPF_CALL_x(4, name, __VA_ARGS__)
| ^~~~~~~~~~
kernel/bpf/helpers.c:684:9: note: in expansion of macro 'BPF_CALL_4'
684 | notrace BPF_CALL_4(bpf_timer_create, void *, callback_fn, void *,
callback_arg,
| ^~~~~~~~~~
kernel/bpf/helpers.c:707:11: error: 'bpf_timer_create' undeclared here (not in
a function); did you mean 'bpf_timer_list'?
707 | .func = bpf_timer_create,
| ^~~~~~~~~~~~~~~~
| bpf_timer_list
> kernel/bpf/helpers.c:735:15: warning: initialized field
overwritten [-Woverride-init]
735 | .arg1_type = ARG_PTR_TO_LONG,
| ^~~~~~~~~~~~~~~
kernel/bpf/helpers.c:735:15: note: (near initialization for
'bpf_timer_gettime_proto.<anonymous>.<anonymous>.arg1_type')
In file included from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from include/linux/workqueue.h:9,
from include/linux/bpf.h:9,
from kernel/bpf/helpers.c:4:
kernel/bpf/helpers.c: In function '____bpf_timer_delete':
kernel/bpf/helpers.c:764:31: error: 'irq_flags' undeclared (first use in this
function); did you mean 'ifr_flags'?
764 | spin_lock_irqsave(&idr_lock, irq_flags);
| ^~~~~~~~~
include/linux/typecheck.h:11:9: note: in definition of macro 'typecheck'
11 | typeof(x) __dummy2; \
| ^
include/linux/spinlock.h:384:2: note: in expansion of macro
'raw_spin_lock_irqsave'
384 | raw_spin_lock_irqsave(spinlock_check(lock), flags); \
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/helpers.c:764:2: note: in expansion of macro 'spin_lock_irqsave'
764 | spin_lock_irqsave(&idr_lock, irq_flags);
| ^~~~~~~~~~~~~~~~~
kernel/bpf/helpers.c:764:31: note: each undeclared identifier is reported only once for
each function it appears in
764 | spin_lock_irqsave(&idr_lock, irq_flags);
| ^~~~~~~~~
include/linux/typecheck.h:11:9: note: in definition of macro 'typecheck'
11 | typeof(x) __dummy2; \
| ^
include/linux/spinlock.h:384:2: note: in expansion of macro
'raw_spin_lock_irqsave'
384 | raw_spin_lock_irqsave(spinlock_check(lock), flags); \
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/helpers.c:764:2: note: in expansion of macro 'spin_lock_irqsave'
764 | spin_lock_irqsave(&idr_lock, irq_flags);
| ^~~~~~~~~~~~~~~~~
include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a
cast
12 | (void)(&__dummy == &__dummy2); \
| ^~
include/linux/spinlock.h:251:3: note: in expansion of macro 'typecheck'
251 | typecheck(unsigned long, flags); \
| ^~~~~~~~~
include/linux/spinlock.h:384:2: note: in expansion of macro
'raw_spin_lock_irqsave'
384 | raw_spin_lock_irqsave(spinlock_check(lock), flags); \
| ^~~~~~~~~~~~~~~~~~~~~
kernel/bpf/helpers.c:764:2: note: in expansion of macro 'spin_lock_irqsave'
764 | spin_lock_irqsave(&idr_lock, irq_flags);
| ^~~~~~~~~~~~~~~~~
At top level:
kernel/bpf/helpers.c:675:13: warning: 'bpf_timer_callback' defined but not used
[-Wunused-function]
675 | static void bpf_timer_callback(struct timer_list *t)
| ^~~~~~~~~~~~~~~~~~
vim +735 kernel/bpf/helpers.c
729
730 const struct bpf_func_proto bpf_timer_gettime_proto = {
731 .func = bpf_timer_gettime,
732 .gpl_only = false,
733 .ret_type = RET_INTEGER,
734 .arg1_type = ARG_ANYTHING,
735 .arg1_type = ARG_PTR_TO_LONG,
736 };
737
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org