Skip to content
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

[BUG] BPF program is too large. Processed 1000001 insn #83

Open
btdev1 opened this issue Feb 10, 2025 · 2 comments
Open

[BUG] BPF program is too large. Processed 1000001 insn #83

btdev1 opened this issue Feb 10, 2025 · 2 comments

Comments

@btdev1
Copy link

btdev1 commented Feb 10, 2025

Describe the bug
【问题】BPF program is too large. Processed 1000001 insn
详细报错如下,佬们看看
processed 1000001 insns (limit 1000000) max_states_per_insn 28 total_states 45898 peak_states 2906 mark_read 371 , couldn't load eBPF programs, cs:&{map[.bss:Array(keySize=4, valueSize=8196, maxEntries=1, flags=0) bufs:PerCPUArray(keySize=4, valueSize=32768, maxEntries=4, flags=0) bufs_off:PerCPUArray(keySize=4, valueSize=4, maxEntries=3, flags=0) cgroup_id_filter:Hash(keySize=8, valueSize=4, maxEntries=512, flags=0) config_map:Hash(keySize=4, valueSize=8, maxEntries=512, flags=0) connect_cache:LRUHash(keySize=8, valueSize=12, maxEntries=4096, flags=0) deny_filter:LRUHash(keySize=8, valueSize=4, maxEntries=20, flags=0) exec_events:PerfEventArray(keySize=4, valueSize=4, maxEntries=1024, flags=0) file_events:PerfEventArray(keySize=4, valueSize=4, maxEntries=1024, flags=0) inner_filter:LRUHash(keySize=8, valueSize=16, maxEntries=20, flags=0) mod_map:Hash(keySize=8, valueSize=64, maxEntries=512, flags=0) net_events:PerfEventArray(keySize=4, valueSize=4, maxEntries=1024, flags=0) path_filter:Array(keySize=4, valueSize=128, maxEntries=3, flags=0) pid_filter:Hash(keySize=4, valueSize=4, maxEntries=512, flags=0) pns_filter:Hash(keySize=4, valueSize=4, maxEntries=512, flags=0) syscall_buffer_cache:Hash(keySize=8, valueSize=8196, maxEntries=512, flags=0) udpmsg:LRUHash(keySize=8, valueSize=24, maxEntries=4096, flags=0) uid_filter:Hash(keySize=4, valueSize=4, maxEntries=512, flags=0)] map[hades_egress:0xc0004ba5a0 hades_ingress:0xc0004ba510 kprobe_call_usermodehelper:0xc0004bb290 kprobe_commit_creds:0xc0004bb200 kprobe_do_init_module:0xc000002090 kprobe_icmp_send:0xc0004bb440 kprobe_security_file_permission:0xc0004ba750 kprobe_security_inode_create:0xc0004bb3b0 kprobe_security_inode_link:0xc0004ba120 kprobe_security_inode_rename:0xc0004ba7e0 kprobe_security_kernel_read_file:0xc000002120 kprobe_security_sb_mount:0xc0004baab0 kprobe_security_socket_bind:0xc0004baea0 kprobe_tcp_reset:0xc0004bb050 kprobe_udp_recvmsg:0xc0004baf30 kretprobe_udp_recvmsg:0xc0004bb560 krpobe_icmp6_send:0xc0004bb0e0 krpobe_icmp_rcv:0xc0004ba870 krpobe_icmpv6_rcv:0xc0004bb4d0 sys_enter_connect:0xc0004ba900 sys_enter_execve:0xc0004ba990 sys_enter_execveat:0xc0004bb170 sys_enter_memfd_create:0xc0004ba480 sys_enter_prctl:0xc0004ba090 sys_enter_ptrace:0xc0004ba630 sys_exit_connect:0xc0004bae10 sys_exit_execve:0xc0004baa20 sys_exit_execveat:0xc0004ba1b0 trigger_idt_scan:0xc0004bb320 trigger_module_scan:0xc0004ba6c0 trigger_sct_scan:0xc0004bafc0] 0xc00019e060 LittleEndian} sou^Ce:go/sandbox.go:94 timestamp:1738984073]

Environment

  • OS Information: ubuntu24 6.8.0-51-generic

To Reproduce

  1. 在6.8.0-51-generic内核中,直接编译出edriver文件
  2. 将这个edriver,放到5.15.0-157内核的ubuntu22中运行,就会异常
  3. 反过来,拿着5.15.0-157内核编译的edriver,就能用到6.8.0-51-generic

Screenshots
编译后报错显示

Image

Additional context

@chriskaliX
Copy link
Owner

Received. I'll look into this on weekends

@chriskaliX
Copy link
Owner

Reason: It seems get_path_str again since I add magic and 'int to str' code in a loop, then the code just exponential increase.

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

No branches or pull requests

2 participants