iovisor / iovisor/bcc

kernerl make fail when enable CONFIG_BPF_SYSCALL=y/CONFIG_NET_ACT_BPF=y

Open
#4,428 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

OS: CentOS7.6 4.14.0-115.el7a.0.1.aarch64
issue:
when I enable CONFIG_BPF_SYSCALL=y/CONFIG_NET_ACT_BPF=y through make menuconfig,
and kernel make fails:
CC arch/arm64/kernel/crash_dump.o
CC [M] fs/cifs/smb2file.o
CC [M] fs/cifs/xattr.o
CC [M] fs/cifs/cifsacl.o
CC kernel/bpf/tnum.o
CC mm/list_lru.o
CC mm/workingset.o
kernel/bpf/verifier.c: In function ‘check_call’:
kernel/bpf/verifier.c:1679:4: error: passing argument 1 of ‘verbose’ from incompatible pointer type [-Werror]
verbose(env, "verifier bug\n");
^
kernel/bpf/verifier.c:168:28: note: expected ‘const char *’ but argument is of type ‘struct bpf_verifier_env *’
static __printf(1, 2) void verbose(const char *fmt, ...)
^
CC mm/debug.o
kernel/bpf/verifier.c: In function ‘fixup_bpf_calls’:
kernel/bpf/verifier.c:4233:5: error: passing argument 1 of ‘verbose’ from incompatible pointer type [-Werror]
verbose(env, "tail_call obusing map_ptr\n");
^
kernel/bpf/verifier.c:168:28: note: expected ‘const char *’ but argument is of type ‘struct bpf_verifier_env *’
static __printf(1, 2) void verbose(const char *fmt, ...)
^
CC mm/gup.o
cc1: all warnings being treated as errors
make[2]: *** [kernel/bpf/verifier.o] Error 1
make[2]: *** Waiting for unfinished jobs....

anybody knows why?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with kernel/bpf/verifier.c and the CONFIG_BPF_SYSCALL and CONFIG_NET_ACT_BPF settings described in the report. Reproduce the failure through make menuconfig and the kernel build, then trace the reported verbose() calls and compiler diagnostics. Done means the kernel builds successfully with both options enabled, with the relevant compiler errors addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.