Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Problem in make test_verifier #13

Open
linkeLi0421 opened this issue Nov 29, 2021 · 1 comment
Open

Problem in make test_verifier #13

linkeLi0421 opened this issue Nov 29, 2021 · 1 comment

Comments

@linkeLi0421
Copy link

/usr/bin/ld: /tmp/verifier-2b3137.o: in function `bpf_check':
/llvm/bpf-fuzzer/bld/kernel/bpf/verifier.c:2286: undefined reference to `capable'
/usr/bin/ld: /tmp/verifier-2b3137.o: in function `kmalloc':
/llvm/bpf-fuzzer/bld/include/linux/slab.h:478: undefined reference to `kmalloc_caches'
/usr/bin/ld: /llvm/bpf-fuzzer/bld/include/linux/slab.h:478: undefined reference to `kmem_cache_alloc_trace'
/usr/bin/ld: /tmp/verifier-2b3137.o: in function `replace_map_fd_with_map_ptr':
/llvm/bpf-fuzzer/bld/kernel/bpf/verifier.c:2044: undefined reference to `__bpf_map_get'
/usr/bin/ld: /llvm/bpf-fuzzer/bld/kernel/bpf/verifier.c:2072: undefined reference to `bpf_map_inc'
/usr/bin/ld: /tmp/verifier-2b3137.o: in function `kmalloc':
/llvm/bpf-fuzzer/bld/include/linux/slab.h:478: undefined reference to `kmalloc_caches'
/usr/bin/ld: /llvm/bpf-fuzzer/bld/include/linux/slab.h:478: undefined reference to `kmem_cache_alloc_trace'
/usr/bin/ld: /llvm/bpf-fuzzer/bld/include/linux/slab.h:478: undefined reference to `kmalloc_caches'
/usr/bin/ld: /llvm/bpf-fuzzer/bld/include/linux/slab.h:478: undefined reference to `kmem_cache_alloc_trace'
/usr/bin/ld: /tmp/linux_hook-8fd561.o: in function `kmalloc':
/llvm/bpf-fuzzer/bld/include/linux/slab.h:478: undefined reference to `kmalloc_caches'
/usr/bin/ld: /llvm/bpf-fuzzer/bld/include/linux/slab.h:478: undefined reference to `kmem_cache_alloc_trace'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:44: test_verifier] Error 1

I try to make all the project and I use linux4.6 as linux source tree. I get this error message and can't solve it, do you have some suggestions for me? Thank you very much.

@yonghong-song
Copy link
Collaborator

I haven't touched it for a long time. You probably need to implement a bunch of dummy kernel functions like kmem_cache_alloc_trace etc to make it work. In the long run, if we could share verifier code in the user space as well, that will make fuzzing easier. But it may be difficult to do that as verifier is too tired to kernel internals.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants