libs icon indicating copy to clipboard operation
libs copied to clipboard

wip: fix(driver/modern_bpf): fixed missing_definitions for ppc64le

Open FedeDP opened this issue 1 year ago • 5 comments

What type of PR is this?

/kind bug

Any specific area of the project related to this PR?

/area driver-modern-bpf /area tests

Does this PR require a change in the driver versions?

What this PR does / why we need it:

This PR tries to address multiple drivers_test failures on ppc64le. Remaining failures (for modern bpf):

[  FAILED  ] 12 tests, listed below:
[  FAILED  ] SyscallExit.clone3X_child
[  FAILED  ] SyscallExit.clone3X_child_clone_parent_flag
[  FAILED  ] SyscallExit.clone3X_child_new_namespace_from_child
[  FAILED  ] SyscallExit.cloneX_child
[  FAILED  ] SyscallExit.creatX_success
[  FAILED  ] SyscallExit.forkX_child
[  FAILED  ] SyscallExit.getrlimitX_success
[  FAILED  ] SyscallExit.openX_success
[  FAILED  ] SyscallExit.openatX_success
[  FAILED  ] SyscallExit.openatX_create_success
[  FAILED  ] SyscallExit.prlimit64X_success
[  FAILED  ] SyscallExit.socketcall_sendmsgX_fail
  • Clone + fork related tests fail because of page faults
  • creatX_success, openX_success, openatX_success, openatX_create_success fail because of some weird thing happening while encoding/decoding dev parameter:
Expected equality of these values:
 *(T*)(m_event_params[m_current_param].valptr)
   Which is: 29
 param
   Which is: 37
  • ~~prlimit64X_success, getrlimitX_success are failing because they return ENOSYS; they should be fixed by: https://github.com/falcosecurity/libs/pull/1737~~
  • ~~socketcall_sendmsgX_fail yet to be investigated:~~
Expected equality of these values:
  size
    Which is: 80
  expected_size
    Which is: 40

Huge thanks to @Andreagit97 for helping me debugging these weird issues!

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

FedeDP avatar Mar 08 '24 15:03 FedeDP

Old bpf situation:

[  FAILED  ] 11 tests, listed below:
[  FAILED  ] SyscallExit.clone3X_child
[  FAILED  ] SyscallExit.clone3X_child_clone_parent_flag
[  FAILED  ] SyscallExit.clone3X_child_new_namespace_from_child
[  FAILED  ] SyscallExit.cloneX_child
[  FAILED  ] SyscallExit.creatX_success
[  FAILED  ] SyscallExit.forkX_child
[  FAILED  ] SyscallExit.getrlimitX_success
[  FAILED  ] SyscallExit.openX_success
[  FAILED  ] SyscallExit.openatX_success
[  FAILED  ] SyscallExit.openatX_create_success
[  FAILED  ] SyscallExit.prlimit64X_success

Same except for SyscallExit.socketcall_sendmsgX_fail that is skipped on bpf and kmod.

FedeDP avatar Mar 08 '24 15:03 FedeDP

Kmod failures:

[  FAILED  ] 11 tests, listed below:
[  FAILED  ] SyscallExit.clone3X_child
[  FAILED  ] SyscallExit.clone3X_child_clone_parent_flag
[  FAILED  ] SyscallExit.clone3X_child_new_namespace_from_child
[  FAILED  ] SyscallExit.cloneX_child
[  FAILED  ] SyscallExit.creatX_success
[  FAILED  ] SyscallExit.forkX_child
[  FAILED  ] SyscallExit.getrlimitX_success
[  FAILED  ] SyscallExit.openX_success
[  FAILED  ] SyscallExit.openatX_success
[  FAILED  ] SyscallExit.openatX_create_success
[  FAILED  ] SyscallExit.prlimit64X_success

FedeDP avatar Mar 08 '24 16:03 FedeDP

After #1737 got merged, we are now at:

[  FAILED  ] 11 tests, listed below:
[  FAILED  ] SyscallExit.clone3X_child
[  FAILED  ] SyscallExit.clone3X_child_clone_parent_flag
[  FAILED  ] SyscallExit.clone3X_child_new_namespace_from_child
[  FAILED  ] SyscallExit.cloneX_child
[  FAILED  ] SyscallExit.creatX_success
[  FAILED  ] SyscallExit.forkX_child
[  FAILED  ] SyscallExit.openX_success
[  FAILED  ] SyscallExit.openatX_success
[  FAILED  ] SyscallExit.openatX_create_success
[  FAILED  ] SyscallExit.sendmsgX_fail
[  FAILED  ] SyscallExit.socketcall_sendmsgX_fail

Last 2 fails with same reason:

Expected equality of these values:
  size
    Which is: 80
  expected_size
    Which is: 40

only on modern BPF (only driver that does not skips checking parameters).

FedeDP avatar Mar 11 '24 12:03 FedeDP

Fixed socketcall and sendmsg tests; remaining:

[  FAILED  ] 9 tests, listed below:
[  FAILED  ] SyscallExit.clone3X_child
[  FAILED  ] SyscallExit.clone3X_child_clone_parent_flag
[  FAILED  ] SyscallExit.clone3X_child_new_namespace_from_child
[  FAILED  ] SyscallExit.cloneX_child
[  FAILED  ] SyscallExit.creatX_success
[  FAILED  ] SyscallExit.forkX_child
[  FAILED  ] SyscallExit.openX_success
[  FAILED  ] SyscallExit.openatX_success
[  FAILED  ] SyscallExit.openatX_create_success

FedeDP avatar Mar 12 '24 09:03 FedeDP

Rebased on top of master.

FedeDP avatar Apr 02 '24 09:04 FedeDP

/milestone next-driver

FedeDP avatar Apr 18 '24 08:04 FedeDP

Fixed all the open related tests; see #1805 for the encountered issue. Remaining failures:

[  FAILED  ] 5 tests, listed below:
[  FAILED  ] SyscallExit.clone3X_child
[  FAILED  ] SyscallExit.clone3X_child_clone_parent_flag
[  FAILED  ] SyscallExit.clone3X_child_new_namespace_from_child
[  FAILED  ] SyscallExit.cloneX_child
[  FAILED  ] SyscallExit.forkX_child

FedeDP avatar Apr 19 '24 08:04 FedeDP

Fixed all tests :rocket:

FedeDP avatar Apr 19 '24 09:04 FedeDP

/milestone 7.1.0+driver

FedeDP avatar Apr 19 '24 09:04 FedeDP

Drivers CI Build / test-drivers-arm64 😇 (bundled_deps) (pull_request) Failing after 8m

Broken because of ports.ubuntu.com unreachable:

Cannot initiate the connection to ports.ubuntu.com:80 (2620:2d:4000:1::16). - connect (101: Network is unreachable) Cannot initiate the connection to ports.ubuntu.com:80 (2620:2d:4000:1::19). - connect (101: Network is unreachable) [IP: 185.125.190.39 80]

FedeDP avatar Apr 19 '24 14:04 FedeDP

Rebased on top of master to fix conflicts.

FedeDP avatar Apr 22 '24 15:04 FedeDP

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Andreagit97, FedeDP, LucaGuerra

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • ~~OWNERS~~ [Andreagit97,FedeDP,LucaGuerra]

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

poiana avatar Apr 23 '24 09:04 poiana