-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile error, kernel version 4.19 #220
Comments
Hello @lianjiezhang , Please, can you give us the distribution that you are running? Best regards! |
1. Kernel version information 2. I used the following method to solve this problem @thiagoftsm Thank you. |
Great, we fixed the first step. Lets go for the next problem, because it looks like your kernel is not having the expected syscall name, please, can you check the name given for bash-5.1$ grep sys_sync /proc/kallsyms
0000000000000000 T ksys_sync_helper
0000000000000000 T __ia32_sys_syncfs
0000000000000000 T __x64_sys_syncfs
0000000000000000 T ksys_sync
0000000000000000 t __do_sys_sync
0000000000000000 T __ia32_sys_sync
0000000000000000 T __x64_sys_sync
0000000000000000 T __x64_sys_sync_file_range
0000000000000000 T __x64_sys_sync_file_range2
0000000000000000 T __ia32_sys_sync_file_range
0000000000000000 T __ia32_sys_sync_file_range2
0000000000000000 T ksys_sync_file_range
0000000000000000 r __ksymtab_ksys_sync_helper
0000000000000000 r __kstrtab_ksys_sync_helper
0000000000000000 r __kstrtabns_ksys_sync_helper
0000000000000000 d _eil_addr___ia32_sys_sync_file_range2
0000000000000000 d _eil_addr___x64_sys_sync_file_range2
0000000000000000 d _eil_addr___ia32_sys_sync_file_range
0000000000000000 d _eil_addr___x64_sys_sync_file_range
0000000000000000 d _eil_addr___ia32_sys_syncfs
0000000000000000 d _eil_addr___x64_sys_syncfs
0000000000000000 d _eil_addr___ia32_sys_sync
0000000000000000 d _eil_addr___x64_sys_sync |
The following is the kernel traceable function and kernel bpf related configuration. tracepoint: zkf@zkf-PC:~/workspace$ grep -E '__x64_sys_sync$|do_sys_open|inet_csk_accept' /proc/kallsyms
0000000000000000 T do_sys_open
0000000000000000 T __x64_sys_sync
0000000000000000 T inet_csk_accept
0000000000000000 r __ksymtab_inet_csk_accept
0000000000000000 r __kstrtab_inet_csk_accept
0000000000000000 t _eil_addr___x64_sys_sync
zkf@zkf-PC:~/workspace$ sudo bpftrace -l | grep -E '__x64_sys_sync$|do_sys_open|inet_csk_accept'
kprobe:do_sys_open
kprobe:inet_csk_accept kernel configuration: zkf@zkf-PC:~/workspace$ cat /boot/config-4.19.0-desktop-amd64 | grep -i bpf
CONFIG_CGROUP_BPF=y
CONFIG_BPF=y
CONFIG_BPF_SYSCALL=y
# CONFIG_BPF_JIT_ALWAYS_ON is not set
CONFIG_IPV6_SEG6_BPF=y
CONFIG_NETFILTER_XT_MATCH_BPF=m
# CONFIG_BPFILTER is not set
CONFIG_NET_CLS_BPF=m
CONFIG_NET_ACT_BPF=m
CONFIG_BPF_JIT=y
CONFIG_BPF_STREAM_PARSER=y
CONFIG_LWTUNNEL_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_BPF_EVENTS=y
# CONFIG_BPF_KPROBE_OVERRIDE is not set
CONFIG_TEST_BPF=m
zkf@zkf-PC:~/workspace$ cat /boot/config-4.19.0-desktop-amd64 | grep -i kprobe
CONFIG_KPROBES=y
CONFIG_KPROBES_ON_FTRACE=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KPROBES_ON_FTRACE=y
CONFIG_KPROBE_EVENTS=y
# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set
# CONFIG_BPF_KPROBE_OVERRIDE is not set
# CONFIG_KPROBES_SANITY_TEST is not set I guess it is caused by kernel configuration items or llvm compilation . @thiagoftsm Thanks |
Hello @lianjiezhang , Firstly sorry for the delay, I was busy with a conference this week and I am also working to bring more features for I have a Debian 10.9 running and I do not remember to have any error like this on it, I will take a look again in few hours, to be sure I did not miss nothing. Now is too late for me and I will stop to avoid identify problems that do not exist. Have a nice day! |
It doesn't matter, I have two systems based on the Debian 10 version, one of which is normal, and there is no difference between the two versions of BPF-related kernel configuration. |
What is the version of clang required? My clang version is clang-7 .
/home/zkf/workspace/x86-kernel/arch/x86/include/asm/atomic.h:125:2: error: 'asm goto' constructs are not supported yet GEN_UNARY_RMWcc(LOCK_PREFIX "decl", v->counter, "%0", e); ^ /home/zkf/workspace/x86-kernel/arch/x86/include/asm/rmwcc.h:42:2: note: expanded from macro 'GEN_UNARY_RMWcc' __GEN_RMWcc(op " " arg0, var, cc, __CLOBBERS_MEM()) ^ /home/zkf/workspace/x86-kernel/arch/x86/include/asm/rmwcc.h:13:2: note: expanded from macro '__GEN_RMWcc' asm_volatile_goto (fullop "; j" #cc " %l[cc_label]" \ ^ /home/zkf/workspace/x86-kernel/include/linux/compiler_types.h:155:37: note: expanded from macro 'asm_volatile_goto' #define asm_volatile_goto(x...) asm goto(x) ^ In file included from cachestat_kern.c:2: In file included from /home/zkf/workspace/x86-kernel/include/linux/bpf.h:12: In file included from /home/zkf/workspace/x86-kernel/include/linux/workqueue.h:9: In file included from /home/zkf/workspace/x86-kernel/include/linux/timer.h:6: In file included from /home/zkf/workspace/x86-kernel/include/linux/ktime.h:24: In file included from /home/zkf/workspace/x86-kernel/include/linux/time.h:6: In file included from /home/zkf/workspace/x86-kernel/include/linux/seqlock.h:36: In file included from /home/zkf/workspace/x86-kernel/include/linux/spinlock.h:51: In file included from /home/zkf/workspace/x86-kernel/include/linux/preempt.h:81: In file included from /home/zkf/workspace/x86-kernel/arch/x86/include/asm/preempt.h:7: In file included from /home/zkf/workspace/x86-kernel/include/linux/thread_info.h:38: In file included from /home/zkf/workspace/x86-kernel/arch/x86/include/asm/thread_info.h:53: In file included from /home/zkf/workspace/x86-kernel/arch/x86/include/asm/cpufeature.h:5: In file included from /home/zkf/workspace/x86-kernel/arch/x86/include/asm/processor.h:21: In file included from /home/zkf/workspace/x86-kernel/arch/x86/include/asm/msr.h:67: /home/zkf/workspace/x86-kernel/arch/x86/include/asm/atomic.h:139:2: error: 'asm goto' constructs are not supported yet GEN_UNARY_RMWcc(LOCK_PREFIX "incl", v->counter, "%0", e); ^ /home/zkf/workspace/x86-kernel/arch/x86/include/asm/rmwcc.h:42:2: note: expanded from macro 'GEN_UNARY_RMWcc' __GEN_RMWcc(op " " arg0, var, cc, __CLOBBERS_MEM()) ^ /home/zkf/workspace/x86-kernel/arch/x86/include/asm/rmwcc.h:13:2: note: expanded from macro '__GEN_RMWcc' asm_volatile_goto (fullop "; j" #cc " %l[cc_label]" \ ^ /home/zkf/workspace/x86-kernel/include/linux/compiler_types.h:155:37: note: expanded from macro 'asm_volatile_goto' #define asm_volatile_goto(x...) asm goto(x)
The text was updated successfully, but these errors were encountered: