naoki9911 / xdp-nat

8 stars 1 forks source link

permission denied, R8 invalid mem access 'inv' #1

Open berryalen02 opened 1 year ago

berryalen02 commented 1 year ago

When I deployed XDP to Ubuntu, I encountered some problems that I couldn't solve, can you help solve it? Go generate for compilation, the environment is ubuntu 20.04, no other tools are used, all use go-cilium/ebpf libraries for deployment, permissions are no problem, but an error is reported.

root@ubuntu:/home/golang/go/src/xdp-nat# ./xdp-nat ens33 lo
2023/07/24 23:57:49 loading objects: field XdpNatInner2outerFunc: program xdp_nat_inner2outer_func: load program: permission denied: 554: (71) r1 = *(u8 *)(r8 +17): R8 invalid mem access ' inv' (506 line(s) omitted)
naoki9911 commented 1 year ago

Hello! It seems my XDP code violates some regulation and eBPF verifier rejects the code. I will check it.