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

fix(driver): extend modern bpf test framework to all drivers (part 5) #832

Merged
merged 11 commits into from
Jan 20, 2023

Conversation

Andreagit97
Copy link
Member

@Andreagit97 Andreagit97 commented Jan 16, 2023

What type of PR is this?

/kind bug

/kind feature

Any specific area of the project related to this PR?

/area driver-kmod

/area driver-bpf

/area driver-modern-bpf

/area tests

Does this PR require a change in the driver versions?

No

What this PR does / why we need it:

This PR belongs to the #783 series. It fixes some differences between the 3 drivers. It tries also to simplify code paths where possible.

Which issue(s) this PR fixes:

Special notes for your reviewer:

I've to check the CI part, but I've tested it locally on the following machines:

  • 5.11.0-051100 (x86)
  • 5.15.0-1023 (x86)
  • 4.14.276 (x86)
  • 4.14.276 (aarch64)
  • 5.15.0-1019 (aarch64)
  • 5.11.0-051100 (s390x)
  • 5.15.0-56-generic (s390x)

Does this PR introduce a user-facing change?:

NONE

Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
@Andreagit97 Andreagit97 changed the title [WIP] fix(driver): extend modern bpf test framework to all drivers (part 5) fix(driver): extend modern bpf test framework to all drivers (part 5) Jan 18, 2023
@Andreagit97
Copy link
Member Author

/hold

@Andreagit97
Copy link
Member Author

Andreagit97 commented Jan 19, 2023

hold because we need to change the required tests on test-infra when we are ready to merge it

Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM, as always Andrea :D

Left a minor comment!

* workaround, since `CAPTURE_SCHED_PROC_FORK` requires `BPF_RAW_TRACEPOINTS` and so
* kernel versions >= 4.17
*/
#ifndef CAPTURE_SCHED_PROC_FORK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we check the kernel version or if has raw tracepoints here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would perhaps adding those kind of checks to driver/feature_gates.h or another central place to collect those minimum requirements or even distro levels.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uhm right now we have this check at compile time in the probe bpf https://github.com/falcosecurity/libs/blob/master/driver/bpf/quirks.h#L31-L33... maybe we can do something better a build time like if you enable -DBUILD_BPF you should have a kernel version >=4.17 on some arch like aarch64 and s390x. BTW this doesn't seem too much related to this test PR, we can do that in another PR when we decide how to proceed, WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is more a follow-up as we should then review and consider the other options.

Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Jan 19, 2023

LGTM label has been added.

Git tree hash: f77f1131923de6954cc2b3a9af42caafec0e10dd

@FedeDP
Copy link
Contributor

FedeDP commented Jan 19, 2023

Note, we need to merge falcosecurity/test-infra#959 before this PR can be merged.
When we merge that PR, all other opened PRs in libs need to be rebased before being eventually merged.

Copy link
Contributor

@jasondellaluce jasondellaluce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

/hold due to @FedeDP's comment above

@poiana
Copy link
Contributor

poiana commented Jan 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

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

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,jasondellaluce]

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

@FedeDP
Copy link
Contributor

FedeDP commented Jan 20, 2023

Closing and reopening to trigger new prow required status checks.
/close

@poiana poiana closed this Jan 20, 2023
@poiana
Copy link
Contributor

poiana commented Jan 20, 2023

@FedeDP: Closed this PR.

In response to this:

Closing and reopening to trigger new prow required status checks.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@FedeDP
Copy link
Contributor

FedeDP commented Jan 20, 2023

/reopen

@poiana poiana reopened this Jan 20, 2023
@poiana
Copy link
Contributor

poiana commented Jan 20, 2023

@FedeDP: Reopened this PR.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@FedeDP
Copy link
Contributor

FedeDP commented Jan 20, 2023

/unhold

@FedeDP
Copy link
Contributor

FedeDP commented Jan 20, 2023

Poiana is 😴

@FedeDP
Copy link
Contributor

FedeDP commented Jan 20, 2023

/honk

@poiana
Copy link
Contributor

poiana commented Jan 20, 2023

@FedeDP: Unable to find goose. Have you checked the garden?

In response to this:

/honk

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@FedeDP FedeDP merged commit 48d74fa into falcosecurity:master Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants