sched: fix build with GCC_PLUGIN_RANDSTRUCT
PATCH v2 1/1 sched: fix build with GCC_PLUGIN_RANDSTRUCT
From: Mike Rapoport <[email protected]>
Since the commit a148866489fb ("sched: Replace rq::wake_list") task_struct and CSD_TYPE_TTWU objects can be on the same queue and this requires that have layout similar enough.
This assumption is broken when CONFIG_GCC_PLUGIN_RANDSTRUCT is enabled:
CHK include/generated/compile.h
CC kernel/smp.o
In file included from arch/x86/include/asm/atomic.h:5,
from include/linux/atomic.h:7,
from include/linux/llist.h:51,
from include/linux/irq_work.h:5,
from kernel/smp.c:10:kernel/smp.c: In function ‘smp_init’:include/linux/compiler.h:392:38: error: call to ‘__compiletime_assert_157’ declared with attribute error: BUILD_BUG_ON failed: offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) != offsetof(struct __call_single_data, flags) - offsetof(struct __call_single_data, llist)
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^include/linux/compiler.h:373:4: note: in definition of macro ‘__compiletime_assert’
373 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler.h:392:2: note: in expansion of macro ‘_compiletime_assert’
392 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro ‘compiletime_assert’
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:2: note: in expansion of macro ‘BUILD_BUG_ON_MSG’
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
kernel/smp.c:687:2: note: in expansion of macro ‘BUILD_BUG_ON’
687 | BUILD_BUG_ON(offsetof(struct task_struct, wake_entry_type) - offsetof(struct task_struct, wake_entry) !=
| ^~~~~~~~~~~~Wrap 'wake_entry' and 'wake_entry_type' fiels of task_struct in an anonymous struct to keep their relative layout intact during randomization.
---
v2: use anonymous struct as Steven suggested.
include/linux/sched.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
include/linux/sched.h +9 -2
@@ -654,8 +654,15 @@ struct task_struct {unsigned int ptrace;#ifdef CONFIG_SMP -struct llist_node wake_entry; -unsigned int wake_entry_type; +/* +* The layout of these fields must match the layout of CSD_TYPE_TTWU +* so they can be on the same @call_single_queue +*/ +struct { +struct llist_node wake_entry; +unsigned int wake_entry_type; + }; +int on_cpu;#ifdef CONFIG_THREAD_INFO_IN_TASK /* Current CPU: */
Signature · 1 line
2.25.4
Peter Zijlstra
maintainerThere's patches in tip/sched/urgent for this...
kernel test robot
build botI love your patch! Perhaps something to improve:
Hi Mike,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tip/sched/core]
[also build test WARNING on kees/for-next/pstore]
[cannot apply to tip/auto-latest v5.8-rc3 next-20200629]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Mike-Rapoport/sched-fix-build-with-GCC_PLUGIN_RANDSTRUCT/20200628-152914 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 01e377c539ca52a6c753d0fdbe93b3b8fcd66a1c config: s390-randconfig-r023-20200630 (attached as .config) compiler: s390-linux-gcc (GCC) 9.3.0
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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
All warnings (new ones prefixed by >>):
1101 | this_cpu_add(sch->cpu_qstats->backlog, pkt_len);
| ^~~~~~~~~~~~
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) | ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/net/sch_generic.h:1101:3: note: in expansion of macro 'this_cpu_add'
1101 | this_cpu_add(sch->cpu_qstats->backlog, pkt_len);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'mini_qdisc_qstats_cpu_drop':
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) (cond) : __trace_if_value(cond))
| ^~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:28: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:1270:2: note: in expansion of macro 'this_cpu_inc'
1270 | this_cpu_inc(miniq->cpu_qstats->drops);
| ^~~~~~~~~~~~
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) (cond) : __trace_if_value(cond))
| ^~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:28: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:1270:2: note: in expansion of macro 'this_cpu_inc'
1270 | this_cpu_inc(miniq->cpu_qstats->drops);
| ^~~~~~~~~~~~
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) | ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:28: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:1270:2: note: in expansion of macro 'this_cpu_inc'
1270 | this_cpu_inc(miniq->cpu_qstats->drops);
| ^~~~~~~~~~~~
In file included from include/linux/bpf_verifier.h:8,
from kernel/bpf/verifier.c:12:
kernel/bpf/verifier.c: In function 'jit_subprogs':
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'unsigned int void const struct bpf_insn to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} 344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:9897:16: note: in expansion of macro 'BPF_CAST_CALL'
9897 | insn->imm = -
| ^~~~~~~~~~~~~
security/apparmor/capability.c:45: warning: Function parameter or member 'ab' not described in 'audit_cb'
security/apparmor/capability.c:45: warning: Function parameter or member 'va' not described in 'audit_cb'
kernel/bpf/verifier.c: In function 'fixup_bpf_calls':
>> include/linux/filter.h:344:4: warning: cast between incompatible function types from 'void Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux.o vmlinux.symvers const)(struct bpf_map void to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} 344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10272:17: note: in expansion of macro 'BPF_CAST_CALL'
10272 | insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void void u64)' {aka 'int const)(struct bpf_map void void long long unsigned int)'} to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} 344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10276:17: note: in expansion of macro 'BPF_CAST_CALL'
10276 | insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'}
344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10280:17: note: in expansion of macro 'BPF_CAST_CALL'
10280 | insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void u64)' {aka 'int const)(struct bpf_map void long long unsigned int)'} to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} 344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10284:17: note: in expansion of macro 'BPF_CAST_CALL'
10284 | insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'}
344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10288:17: note: in expansion of macro 'BPF_CAST_CALL'
10288 | insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'}
344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10292:17: note: in expansion of macro 'BPF_CAST_CALL'
10292 | insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
| ^~~~~~~~~~~~~
kernel/events/core.c: At top level:
kernel/events/core.c:6490:6: warning: no previous prototype for 'perf_pmu_snapshot_aux'
6490 | long perf_pmu_snapshot_aux(struct perf_buffer
| ^~~~~~~~~~~~~~~~~~~~~
security/apparmor/resource.c:55: warning: Function parameter or member 'peer' not described in 'audit_resource'
security/apparmor/resource.c:55: warning: Function parameter or member 'info' not described in 'audit_resource'
security/apparmor/resource.c:106: warning: Function parameter or member 'label' not described in 'aa_task_setrlimit'
security/apparmor/resource.c:106: warning: Function parameter or member 'task' not described in 'aa_task_setrlimit'
security/apparmor/resource.c:106: warning: Function parameter or member 'resource' not described in 'aa_task_setrlimit'
security/apparmor/resource.c:106: warning: Function parameter or member 'new_rlim' not described in 'aa_task_setrlimit'
kernel/cgroup/cgroup.c:6053: warning: Function parameter or member 'kargs' not described in 'cgroup_can_fork'
kernel/cgroup/cgroup.c:6114: warning: Function parameter or member 'kargs' not described in 'cgroup_post_fork'
drivers/phy/phy-core.c:1078: warning: Function parameter or member 'children' not described in '__devm_of_phy_provider_register'
drivers/phy/phy-core.c:1125: warning: Function parameter or member 'phy_provider' not described in 'devm_of_phy_provider_unregister'
kernel/time/alarmtimer.c:535: warning: Function parameter or member 'now' not described in 'alarm_handle_timer'
kernel/time/alarmtimer.c:723: warning: Function parameter or member 'now' not described in 'alarmtimer_nsleep_wakeup'
kernel/time/alarmtimer.c:741: warning: Function parameter or member 'type' not described in 'alarmtimer_do_nsleep'
kernel/time/alarmtimer.c:815: warning: Excess function parameter 'rmtp' description in 'alarm_timer_nsleep'
In file included from include/linux/build_bug.h:5,
from include/linux/bits.h:23,
from arch/s390/include/asm/ptrace.h:10,
from arch/s390/include/asm/lowcore.h:13,
from arch/s390/include/asm/current.h:13,
from include/linux/sched.h:12,
from include/linux/audit.h:12,
from security/apparmor/include/audit.h:14,
from security/apparmor/net.c:12:
include/net/sch_generic.h: In function 'qdisc_qstats_cpu_backlog_dec':
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) (cond) : __trace_if_value(cond))
| ^~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:519:33: note: in expansion of macro 'this_cpu_add'
519 | #define this_cpu_sub(pcp, val) this_cpu_add(pcp, -(typeof(pcp))(val))
| ^~~~~~~~~~~~
include/net/sch_generic.h:850:2: note: in expansion of macro 'this_cpu_sub'
850 | this_cpu_sub(sch->cpu_qstats->backlog, qdisc_pkt_len(skb));
| ^~~~~~~~~~~~
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) (cond) : __trace_if_value(cond))
| ^~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:519:33: note: in expansion of macro 'this_cpu_add'
--
| ^~~~~~~~~~~~~~~~
include/net/sch_generic.h:1101:3: note: in expansion of macro 'this_cpu_add'
1101 | this_cpu_add(sch->cpu_qstats->backlog, pkt_len);
| ^~~~~~~~~~~~
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) | ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/net/sch_generic.h:1101:3: note: in expansion of macro 'this_cpu_add'
1101 | this_cpu_add(sch->cpu_qstats->backlog, pkt_len);
| ^~~~~~~~~~~~
include/net/sch_generic.h: In function 'mini_qdisc_qstats_cpu_drop':
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) (cond) : __trace_if_value(cond))
| ^~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:28: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:1270:2: note: in expansion of macro 'this_cpu_inc'
1270 | this_cpu_inc(miniq->cpu_qstats->drops);
| ^~~~~~~~~~~~
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var'
58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) (cond) : __trace_if_value(cond))
| ^~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:28: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:1270:2: note: in expansion of macro 'this_cpu_inc'
1270 | this_cpu_inc(miniq->cpu_qstats->drops);
| ^~~~~~~~~~~~
arch/s390/include/asm/percpu.h:74:21: warning: comparison is always true due to limited range of data type
74 | ((szcast)val__ > -129) && ((szcast)val__ < 128)) { | ^
include/linux/compiler.h:69:3: note: in definition of macro '__trace_if_value'
69 | (cond) | ^~~~
include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var'
56 | #define if(cond, ...) if ( __trace_if_var( , ## __VA_ARGS__) ) )
| ^~~~~~~~~~~~~~
arch/s390/include/asm/percpu.h:73:2: note: in expansion of macro 'if'
73 | if (__builtin_constant_p(val__) && | ^~
arch/s390/include/asm/percpu.h:91:34: note: in expansion of macro 'arch_this_cpu_add'
91 | #define this_cpu_add_8(pcp, val) arch_this_cpu_add(pcp, val, "laag", "agsi", long)
| ^~~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:380:11: note: in expansion of macro 'this_cpu_add_8'
380 | case 8: stem##8(variable, __VA_ARGS__);break; | ^~~~
include/linux/percpu-defs.h:509:33: note: in expansion of macro '__pcpu_size_call'
509 | #define this_cpu_add(pcp, val) __pcpu_size_call(this_cpu_add_, pcp, val)
| ^~~~~~~~~~~~~~~~
include/linux/percpu-defs.h:520:28: note: in expansion of macro 'this_cpu_add'
520 | #define this_cpu_inc(pcp) this_cpu_add(pcp, 1)
| ^~~~~~~~~~~~
include/net/sch_generic.h:1270:2: note: in expansion of macro 'this_cpu_inc'
1270 | this_cpu_inc(miniq->cpu_qstats->drops);
| ^~~~~~~~~~~~
In file included from include/linux/bpf_verifier.h:8,
from kernel/bpf/verifier.c:12:
kernel/bpf/verifier.c: In function 'jit_subprogs':
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'unsigned int void const struct bpf_insn to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'}
344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:9897:16: note: in expansion of macro 'BPF_CAST_CALL'
9897 | insn->imm = -
| ^~~~~~~~~~~~~
kernel/bpf/verifier.c: In function 'fixup_bpf_calls':
>> include/linux/filter.h:344:4: warning: cast between incompatible function types from 'void Makefile Module.symvers System.map arch block certs crypto drivers fs include init ipc kernel lib mm modules.builtin modules.builtin.modinfo modules.order net scripts security sound source usr virt vmlinux vmlinux.o vmlinux.symvers const)(struct bpf_map void to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} 344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10272:17: note: in expansion of macro 'BPF_CAST_CALL'
10272 | insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void void u64)' {aka 'int const)(struct bpf_map void void long long unsigned int)'} to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} 344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10276:17: note: in expansion of macro 'BPF_CAST_CALL'
10276 | insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'}
344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10280:17: note: in expansion of macro 'BPF_CAST_CALL'
10280 | insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void u64)' {aka 'int const)(struct bpf_map void long long unsigned int)'} to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} 344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10284:17: note: in expansion of macro 'BPF_CAST_CALL'
10284 | insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'}
344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10288:17: note: in expansion of macro 'BPF_CAST_CALL'
10288 | insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:344:4: warning: cast between incompatible function types from 'int const)(struct bpf_map void to 'u64 u64, u64, u64, u64)' {aka 'long long unsigned int long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'}
344 | ((u64 u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10292:17: note: in expansion of macro 'BPF_CAST_CALL'
10292 | insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
| ^~~~~~~~~~~~~
kernel/events/core.c: At top level:
kernel/events/core.c:6490:6: warning: no previous prototype for 'perf_pmu_snapshot_aux'
6490 | long perf_pmu_snapshot_aux(struct perf_buffer
| ^~~~~~~~~~~~~~~~~~~~~
kernel/cgroup/cgroup.c:6053: warning: Function parameter or member 'kargs' not described in 'cgroup_can_fork'
kernel/cgroup/cgroup.c:6114: warning: Function parameter or member 'kargs' not described in 'cgroup_post_fork'
kernel/time/alarmtimer.c:535: warning: Function parameter or member 'now' not described in 'alarm_handle_timer'
kernel/time/alarmtimer.c:723: warning: Function parameter or member 'now' not described in 'alarmtimer_nsleep_wakeup'
kernel/time/alarmtimer.c:741: warning: Function parameter or member 'type' not described in 'alarmtimer_do_nsleep'
kernel/time/alarmtimer.c:815: warning: Excess function parameter 'rmtp' description in 'alarm_timer_nsleep'
kernel/fork.c:760:20: warning: no previous prototype for 'arch_task_cache_init'
760 | void __init __weak arch_task_cache_init(void) { }
| ^~~~~~~~~~~~~~~~~~~~
kernel/time/tick-oneshot.c:24: warning: Function parameter or member 'expires' not described in 'tick_program_event'
kernel/time/tick-oneshot.c:24: warning: Function parameter or member 'force' not described in 'tick_program_event'
kernel/time/tick-oneshot.c:64: warning: Function parameter or member 'newdev' not described in 'tick_setup_oneshot'
kernel/time/tick-oneshot.c:64: warning: Function parameter or member 'handler' not described in 'tick_setup_oneshot'
kernel/time/tick-oneshot.c:64: warning: Function parameter or member 'next_event' not described in 'tick_setup_oneshot'
kernel/time/tick-oneshot.c:74: warning: Function parameter or member 'handler' not described in 'tick_switch_to_oneshot'
kernel/time/clockevents.c:634: warning: Function parameter or member 'cpu' not described in 'tick_cleanup_dead_cpu'
kernel/panic.c:85:13: warning: no previous prototype for 'panic_smp_self_stop'
85 | void __weak panic_smp_self_stop(void)
| ^~~~~~~~~~~~~~~~~~~
kernel/panic.c:95:13: warning: no previous prototype for 'nmi_panic_self_stop'
95 | void __weak nmi_panic_self_stop(struct pt_regs
| ^~~~~~~~~~~~~~~~~~~
kernel/panic.c:106:13: warning: no previous prototype for 'crash_smp_send_stop'
106 | void __weak crash_smp_send_stop(void)
| ^~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:5306: warning: Function parameter or member 'ops' not described in 'ftrace_set_filter_ip'
kernel/trace/ftrace.c:5306: warning: Function parameter or member 'ip' not described in 'ftrace_set_filter_ip'
kernel/trace/ftrace.c:5306: warning: Function parameter or member 'remove' not described in 'ftrace_set_filter_ip'
kernel/trace/ftrace.c:5306: warning: Function parameter or member 'reset' not described in 'ftrace_set_filter_ip'
kernel/trace/ftrace.c:5320: warning: Function parameter or member 'ops' not described in 'ftrace_ops_set_global_filter'
kernel/trace/ftrace.c:5348: warning: Function parameter or member 'ops' not described in 'ftrace_set_filter'
kernel/trace/ftrace.c:5348: warning: Function parameter or member 'buf' not described in 'ftrace_set_filter'
kernel/trace/ftrace.c:5348: warning: Function parameter or member 'len' not described in 'ftrace_set_filter'
kernel/trace/ftrace.c:5348: warning: Function parameter or member 'reset' not described in 'ftrace_set_filter'
kernel/trace/ftrace.c:5367: warning: Function parameter or member 'ops' not described in 'ftrace_set_notrace'
kernel/trace/ftrace.c:5367: warning: Function parameter or member 'buf' not described in 'ftrace_set_notrace'
kernel/trace/ftrace.c:5367: warning: Function parameter or member 'len' not described in 'ftrace_set_notrace'
kernel/trace/ftrace.c:5367: warning: Function parameter or member 'reset' not described in 'ftrace_set_notrace'
kernel/trace/ftrace.c:5382: warning: Function parameter or member 'buf' not described in 'ftrace_set_global_filter'
kernel/trace/ftrace.c:5382: warning: Function parameter or member 'len' not described in 'ftrace_set_global_filter'
kernel/trace/ftrace.c:5382: warning: Function parameter or member 'reset' not described in 'ftrace_set_global_filter'
kernel/trace/ftrace.c:5398: warning: Function parameter or member 'buf' not described in 'ftrace_set_global_notrace'
kernel/trace/ftrace.c:5398: warning: Function parameter or member 'len' not described in 'ftrace_set_global_notrace'
kernel/trace/ftrace.c:5398: warning: Function parameter or member 'reset' not described in 'ftrace_set_global_notrace'
kernel/panic.c: In function '__warn':
kernel/panic.c:590:3: warning: function '__warn' might be a candidate for 'gnu_printf' format attribute
590 | vprintk(args->fmt, args->args);
| ^~~~~~~
kernel/trace/ftrace.c:7366: warning: Function parameter or member 'ops' not described in 'register_ftrace_function'
kernel/trace/ftrace.c:7388: warning: Function parameter or member 'ops' not described in 'unregister_ftrace_function'
kernel/time/tick-sched.c:520: warning: Function parameter or member 'now' not described in 'tick_nohz_update_jiffies'
kernel/time/tick-sched.c:1120: warning: Function parameter or member 'cpu' not described in 'tick_nohz_get_idle_calls_cpu'
kernel/time/tick-sched.c:1418: warning: Function parameter or member 'allow_nohz' not described in 'tick_check_oneshot_change'
kernel/fork.c:1148: warning: Function parameter or member 'mm' not described in 'set_mm_exe_file'
kernel/fork.c:1148: warning: Function parameter or member 'new_exe_file' not described in 'set_mm_exe_file'
kernel/fork.c:1172: warning: Function parameter or member 'mm' not described in 'get_mm_exe_file'
kernel/fork.c:1192: warning: Function parameter or member 'task' not described in 'get_task_exe_file'
kernel/fork.c:1217: warning: Function parameter or member 'task' not described in 'get_task_mm'
kernel/trace/ring_buffer.c:1141: warning: Function parameter or member 'cpu_buffer' not described in 'rb_check_list'
kernel/trace/ring_buffer.c:1141: warning: Function parameter or member 'list' not described in 'rb_check_list'
In file included from include/linux/kernel.h:11,
vim +344 include/linux/filter.h
f8f6d679aaa78b Daniel Borkmann 2014-05-29 34209772d92cd5ad9 Daniel Borkmann 2018-06-02 343 #define BPF_CAST_CALL(x) \09772d92cd5ad9 Daniel Borkmann 2018-06-02 @344 ((u64 (*)(u64, u64, u64, u64, u64))(x))09772d92cd5ad9 Daniel Borkmann 2018-06-02 345
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org