[jolsa-perf:bpf/batch 19/27] include/linux/bpf.h:707:20: error: field 'ops' has incomplete type
From: kernel test robot
Date: Thu Aug 26 2021 - 21:11:05 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/batch
head: b81b17307e02f8e6d4abf87e7ec2d7e5aea1e0b5
commit: 847fb4eb93cf46ad827ba84404d2c9d6998ea67f [19/27] bpf: Attach multi trampoline with ftrace_ops
config: um-x86_64_defconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id=847fb4eb93cf46ad827ba84404d2c9d6998ea67f
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/batch
git checkout 847fb4eb93cf46ad827ba84404d2c9d6998ea67f
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=um SUBARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from include/linux/perf_event.h:49,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:87,
from init/main.c:21:
include/linux/ftrace.h:353:41: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:353:5: warning: no previous prototype for 'register_ftrace_direct_multi' [-Wmissing-prototypes]
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:357:43: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~
include/linux/ftrace.h:357:5: warning: no previous prototype for 'unregister_ftrace_direct_multi' [-Wmissing-prototypes]
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:361:39: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:361:5: warning: no previous prototype for 'modify_ftrace_direct_multi' [-Wmissing-prototypes]
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/perf_event.h:57,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:87,
from init/main.c:21:
>> include/linux/bpf.h:707:20: error: field 'ops' has incomplete type
707 | struct ftrace_ops ops;
| ^~~
init/main.c:757:20: warning: no previous prototype for 'arch_post_acpi_subsys_init' [-Wmissing-prototypes]
757 | void __init __weak arch_post_acpi_subsys_init(void) { }
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
init/main.c:769:20: warning: no previous prototype for 'mem_encrypt_init' [-Wmissing-prototypes]
769 | void __init __weak mem_encrypt_init(void) { }
| ^~~~~~~~~~~~~~~~
init/main.c:771:20: warning: no previous prototype for 'poking_init' [-Wmissing-prototypes]
771 | void __init __weak poking_init(void) { }
| ^~~~~~~~~~~
--
In file included from include/linux/bpf.h:26,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from init/do_mounts.c:7:
include/linux/ftrace.h:353:41: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:353:5: warning: no previous prototype for 'register_ftrace_direct_multi' [-Wmissing-prototypes]
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:357:43: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~
include/linux/ftrace.h:357:5: warning: no previous prototype for 'unregister_ftrace_direct_multi' [-Wmissing-prototypes]
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:361:39: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:361:5: warning: no previous prototype for 'modify_ftrace_direct_multi' [-Wmissing-prototypes]
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from init/do_mounts.c:7:
>> include/linux/bpf.h:707:20: error: field 'ops' has incomplete type
707 | struct ftrace_ops ops;
| ^~~
--
In file included from include/linux/bpf.h:26,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from arch/um/kernel/mem.c:11:
include/linux/ftrace.h:353:41: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:353:5: warning: no previous prototype for 'register_ftrace_direct_multi' [-Wmissing-prototypes]
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:357:43: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~
include/linux/ftrace.h:357:5: warning: no previous prototype for 'unregister_ftrace_direct_multi' [-Wmissing-prototypes]
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:361:39: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:361:5: warning: no previous prototype for 'modify_ftrace_direct_multi' [-Wmissing-prototypes]
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from arch/um/kernel/mem.c:11:
>> include/linux/bpf.h:707:20: error: field 'ops' has incomplete type
707 | struct ftrace_ops ops;
| ^~~
arch/um/kernel/mem.c:184:8: warning: no previous prototype for 'pgd_alloc' [-Wmissing-prototypes]
184 | pgd_t *pgd_alloc(struct mm_struct *mm)
| ^~~~~~~~~
arch/um/kernel/mem.c:197:7: warning: no previous prototype for 'uml_kmalloc' [-Wmissing-prototypes]
197 | void *uml_kmalloc(int size, int flags)
| ^~~~~~~~~~~
--
In file included from include/linux/bpf.h:26,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/tracehook.h:50,
from arch/um/kernel/process.c:26:
include/linux/ftrace.h:353:41: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:353:5: warning: no previous prototype for 'register_ftrace_direct_multi' [-Wmissing-prototypes]
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:357:43: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~
include/linux/ftrace.h:357:5: warning: no previous prototype for 'unregister_ftrace_direct_multi' [-Wmissing-prototypes]
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:361:39: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:361:5: warning: no previous prototype for 'modify_ftrace_direct_multi' [-Wmissing-prototypes]
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/tracehook.h:50,
from arch/um/kernel/process.c:26:
>> include/linux/bpf.h:707:20: error: field 'ops' has incomplete type
707 | struct ftrace_ops ops;
| ^~~
arch/um/kernel/process.c:49:5: warning: no previous prototype for 'pid_to_processor_id' [-Wmissing-prototypes]
49 | int pid_to_processor_id(int pid)
| ^~~~~~~~~~~~~~~~~~~
arch/um/kernel/process.c:85:7: warning: no previous prototype for '__switch_to' [-Wmissing-prototypes]
85 | void *__switch_to(struct task_struct *from, struct task_struct *to)
| ^~~~~~~~~~~
arch/um/kernel/process.c: In function 'new_thread_handler':
arch/um/kernel/process.c:120:21: warning: variable 'n' set but not used [-Wunused-but-set-variable]
120 | int (*fn)(void *), n;
| ^
arch/um/kernel/process.c: At top level:
arch/um/kernel/process.c:138:6: warning: no previous prototype for 'fork_handler' [-Wmissing-prototypes]
138 | void fork_handler(void)
| ^~~~~~~~~~~~
arch/um/kernel/process.c:214:6: warning: no previous prototype for 'arch_cpu_idle' [-Wmissing-prototypes]
214 | void arch_cpu_idle(void)
| ^~~~~~~~~~~~~
arch/um/kernel/process.c:251:5: warning: no previous prototype for 'copy_to_user_proc' [-Wmissing-prototypes]
251 | int copy_to_user_proc(void __user *to, void *from, int size)
| ^~~~~~~~~~~~~~~~~
arch/um/kernel/process.c:261:5: warning: no previous prototype for 'clear_user_proc' [-Wmissing-prototypes]
261 | int clear_user_proc(void __user *buf, int size)
| ^~~~~~~~~~~~~~~
arch/um/kernel/process.c:274:6: warning: no previous prototype for 'set_using_sysemu' [-Wmissing-prototypes]
274 | void set_using_sysemu(int value)
| ^~~~~~~~~~~~~~~~
arch/um/kernel/process.c:281:5: warning: no previous prototype for 'get_using_sysemu' [-Wmissing-prototypes]
281 | int get_using_sysemu(void)
| ^~~~~~~~~~~~~~~~
arch/um/kernel/process.c:319:12: warning: no previous prototype for 'make_proc_sysemu' [-Wmissing-prototypes]
319 | int __init make_proc_sysemu(void)
| ^~~~~~~~~~~~~~~~
arch/um/kernel/process.c:359:15: warning: no previous prototype for 'arch_align_stack' [-Wmissing-prototypes]
359 | unsigned long arch_align_stack(unsigned long sp)
| ^~~~~~~~~~~~~~~~
--
In file included from include/linux/perf_event.h:49,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:87,
from arch/um/kernel/syscall.c:11:
include/linux/ftrace.h:353:41: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:353:5: warning: no previous prototype for 'register_ftrace_direct_multi' [-Wmissing-prototypes]
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:357:43: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~
include/linux/ftrace.h:357:5: warning: no previous prototype for 'unregister_ftrace_direct_multi' [-Wmissing-prototypes]
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:361:39: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:361:5: warning: no previous prototype for 'modify_ftrace_direct_multi' [-Wmissing-prototypes]
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/perf_event.h:57,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:87,
from arch/um/kernel/syscall.c:11:
>> include/linux/bpf.h:707:20: error: field 'ops' has incomplete type
707 | struct ftrace_ops ops;
| ^~~
arch/um/kernel/syscall.c:17:6: warning: no previous prototype for 'old_mmap' [-Wmissing-prototypes]
17 | long old_mmap(unsigned long addr, unsigned long len,
| ^~~~~~~~
--
In file included from include/linux/bpf.h:26,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/um/kernel/um_arch.c:18:
include/linux/ftrace.h:353:41: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:353:5: warning: no previous prototype for 'register_ftrace_direct_multi' [-Wmissing-prototypes]
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:357:43: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~
include/linux/ftrace.h:357:5: warning: no previous prototype for 'unregister_ftrace_direct_multi' [-Wmissing-prototypes]
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:361:39: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:361:5: warning: no previous prototype for 'modify_ftrace_direct_multi' [-Wmissing-prototypes]
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from arch/um/kernel/um_arch.c:18:
>> include/linux/bpf.h:707:20: error: field 'ops' has incomplete type
707 | struct ftrace_ops ops;
| ^~~
arch/um/kernel/um_arch.c:400:19: warning: no previous prototype for 'read_initrd' [-Wmissing-prototypes]
400 | int __init __weak read_initrd(void)
| ^~~~~~~~~~~
arch/um/kernel/um_arch.c:418:13: warning: no previous prototype for 'check_bugs' [-Wmissing-prototypes]
418 | void __init check_bugs(void)
| ^~~~~~~~~~
arch/um/kernel/um_arch.c:428:7: warning: no previous prototype for 'text_poke' [-Wmissing-prototypes]
428 | void *text_poke(void *addr, const void *opcode, size_t len)
| ^~~~~~~~~
arch/um/kernel/um_arch.c:440:6: warning: no previous prototype for 'text_poke_sync' [-Wmissing-prototypes]
440 | void text_poke_sync(void)
| ^~~~~~~~~~~~~~
--
In file included from include/linux/bpf.h:26,
from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/net/netprio_cgroup.h:11,
from include/linux/netdevice.h:41,
from include/uapi/linux/if_arp.h:27,
from include/linux/if_arp.h:23,
from arch/um/drivers/slirp_kern.c:6:
include/linux/ftrace.h:353:41: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:353:5: warning: no previous prototype for 'register_ftrace_direct_multi' [-Wmissing-prototypes]
353 | int register_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:357:43: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~
include/linux/ftrace.h:357:5: warning: no previous prototype for 'unregister_ftrace_direct_multi' [-Wmissing-prototypes]
357 | int unregister_ftrace_direct_multi(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/ftrace.h:361:39: warning: 'struct ftrace_ops' declared inside parameter list will not be visible outside of this definition or declaration
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~
include/linux/ftrace.h:361:5: warning: no previous prototype for 'modify_ftrace_direct_multi' [-Wmissing-prototypes]
361 | int modify_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/net/netprio_cgroup.h:11,
from include/linux/netdevice.h:41,
from include/uapi/linux/if_arp.h:27,
from include/linux/if_arp.h:23,
from arch/um/drivers/slirp_kern.c:6:
>> include/linux/bpf.h:707:20: error: field 'ops' has incomplete type
707 | struct ftrace_ops ops;
| ^~~
arch/um/drivers/slirp_kern.c:18:6: warning: no previous prototype for 'slirp_init' [-Wmissing-prototypes]
18 | void slirp_init(struct net_device *dev, void *data)
| ^~~~~~~~~~
..
vim +/ops +707 include/linux/bpf.h
701
702 struct bpf_trampoline_multi {
703 struct bpf_trampoline main;
704 struct list_head list;
705 u32 *ids;
706 u32 ids_cnt;
> 707 struct ftrace_ops ops;
708 int tr_cnt;
709 struct bpf_trampoline *tr[];
710 };
711
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip