Open
Description
When attempting to utilize cilium's pwru --filter-trace-tc
option with a p4-ebpf psa program loaded using nikss-ctl, I get the below error. The p4-ebpf psa program compiles and loads without issue. Running pwru --filter-trace-tc
when the p4-ebpf program is not loaded runs as expected. p4-ebpf c/bc/o files attached.
$ sudo ./pwru --filter-trace-tc
2023/12/22 10:59:20 Failed to load objects: Verifier error: load program: permission denied:
func#0 @0
func#1 @38
func#2 @854
func#3 @861
reg type unsupported for arg#0 function fentry_tc#1
0: R1=ctx(off=0,imm=0) R10=fp0
; int BPF_PROG(fentry_tc, struct sk_buff *skb) {
0: (bf) r6 = r1 ; R1=ctx(off=0,imm=0) R6_w=ctx(off=0,imm=0)
; int BPF_PROG(fentry_tc, struct sk_buff *skb) {
1: (79) r7 = *(u64 *)(r6 +0)
func 'map_initializer' doesn't have 1-th argument
invalid bpf_context access off=0 size=8
processed 2 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
program fentry_tc: load program: permission denied: func 'map_initializer' doesn't have 1-th argument: invalid bpf_context access off=0 size=8 (11 line(s) omitted)
I see the same exact error on the following two systems:
- Ubuntu 23: Linux pwru-dev 6.5.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 14 14:59:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
- Oracle Linux 9: Linux p4-dev 5.15.0-200.131.27.1.el9uek.x86_64 #2 SMP Wed Nov 22 18:01:23 PST 2023 x86_64 x86_64 x86_64 GNU/Linux
For context, I was experimenting with pwru to see if I could trace a packet through a p4-ebpf processing pipeline. Similar to ovs-appctl ofproto/trace, except with live traffic.