libs icon indicating copy to clipboard operation
libs copied to clipboard

[FEATURE/BUG] Bpf module test failed on loongarch

Open yzewei opened this issue 1 year ago • 7 comments

Describe the bug ERROR:

-----------------------------------------------------
- Setup phase
-----------------------------------------------------

* Configure BPF probe tests! Probe path: /home/yzw/rd/libs/build/driver/bpf/probe.o
* Using buffer dim: 8388608
-- BEGIN PROG LOAD LOG --
0: R1=ctx() R10=fp0
0: (85) call bpf_get_smp_processor_id#8       ; R0_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=7,var_off=(0x0; 0x7))
1: (63) *(u32 *)(r10 -4) = r0         ; R0_w=scalar(smin=smin32=0,smax=umax=smax32=umax32=7,var_off=(0x0; 0x7)) R10=fp0 fp-8=mmmm????
2: (bf) r2 = r10                      ; R2_w=fp0 R10=fp0
3: (07) r2 += -4                      ; R2_w=fp-4
4: (18) r1 = 0x900000059f745800       ; R1_w=map_ptr(ks=4,vs=201)
6: (85) call bpf_map_lookup_elem#1    ; R0_w=map_value_or_null(id=1,ks=4,vs=201)
7: (18) r1 = 0x9000000135452e00       ; R1=map_ptr(ks=4,vs=4)
9: (15) if r0 == 0x0 goto pc+2        ; R0=map_value(ks=4,vs=201)
10: (18) r1 = 0x9000000135452e00      ; R1_w=map_ptr(ks=4,vs=4)
12: (61) r2 = *(u32 *)(r1 +0)
cannot access ptr member ops with moff 0 in struct bpf_map with off 0 size 4
processed 10 insns (limit 1000000) max_states_per_insn 0 total_states 1 peak_states 1 mark_read 1

-- END PROG LOAD LOG --
Unable to open the engine: libscap: bpf_load_program() event=tracepoint/filler/terminate_filler: Operation not permitted

How to reproduce it

cmake -DUSE_BUNDLED_DEPS=On -DENABLE_DRIVERS_TESTS=On -DBUILD_LIBSCAP_GVISOR=Off -DBUILD_BPF=On -DBUILD_LIBSCAP_MODERN_BPF=On -DCREATE_TEST_TARGETS=On -DMODERN_BPF_DEBUG_MODE=On ..
make drivers_test
make bpf
sudo ./test/drivers/drivers_test -b

Environment

  • Falco version: master
  • OS: fedora 38
  • Kernel: 6.8.0-rc5
  • Installation method: source
  • Arch: loongarch

yzewei avatar May 08 '24 02:05 yzewei

@FedeDP @Andreagit97

yzewei avatar May 08 '24 02:05 yzewei

Hi @yzewei ! it seems you are hitting a verifier issue; are you using libs from master?

FedeDP avatar May 14 '24 07:05 FedeDP

/milestone TBD

FedeDP avatar May 14 '24 07:05 FedeDP

Hi @yzewei ! it seems you are hitting a verifier issue; are you using libs from master?

@FedeDP Currently using the 0.14.3 branch, ready to use the master branch to try.

yzewei avatar May 16 '24 08:05 yzewei

Yes it would be great, thanks!

FedeDP avatar May 16 '24 08:05 FedeDP

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana avatar Aug 14 '24 10:08 poiana

/remove-lifecycle stale

Andreagit97 avatar Aug 14 '24 15:08 Andreagit97

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

poiana avatar Nov 12 '24 16:11 poiana

Resolved

yzewei avatar Nov 13 '24 00:11 yzewei