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

chore(driver): allow kmod and bpf drivers different components #1709

Merged

Conversation

FedeDP
Copy link
Contributor

@FedeDP FedeDP commented Feb 27, 2024

What type of PR is this?

/kind cleanup

Any specific area of the project related to this PR?

/area build
/area driver-kmod
/area driver-bpf

Does this PR require a change in the driver versions?

What this PR does / why we need it:

This PR has a main scope: allow to install kmod and bpf under different components.
Also, now the ebpf probe gets built under CMAKE_CURRENT_BINARY_DIR instead of CMAKE_CURRENT_SOURCE_DIR, in a similar way to kmod.
Moreover, to properly build the bpf probe, all the driver/*.h header files are copied under CMAKE_CURRENT_BINARY_DIR for bpf and get eventually installed when issuing make install.
It has the main advantage that in the future we might want to split up falco-kmod and falco-bpf packages, BUT still retain the possibility to build the bpf probe under /usr/src/driverversion/bpf/ folder.

An example of the aforementioned issue is the current behavior if we configure libs using:

-DENABLE_DKMS=Off -DBUILD_DRIVER=Off -DBUILD_BPF=On ..

and then make install it. Under /usr/src/$version/ we will just have a bpf folder, and if we move under it, we cannot build the bpf probe because its sources include headers from the parent (that was not installed).

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

… install.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
…ike we do for kmod.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
@FedeDP
Copy link
Contributor Author

FedeDP commented Feb 27, 2024

/milestone 0.15.0

@poiana poiana requested a review from leogr February 27, 2024 15:50
@poiana poiana added this to the 0.15.0 milestone Feb 27, 2024
@poiana poiana added the size/M label Feb 27, 2024
Copy link

Please double check driver/API_VERSION file. See versioning.

/hold

@FedeDP
Copy link
Contributor Author

FedeDP commented Feb 27, 2024

Driverkit / build-drivers (linux-4.x) (pull_request) Failing after 33s

Need to fix bpf build in driverkit tests :/

EDIT: ouch of course because it needs falcosecurity/driverkit#302

@FedeDP
Copy link
Contributor Author

FedeDP commented Feb 29, 2024

Driverkit 0.17.0 was released, and driverkit related tests now pass fine.

@FedeDP
Copy link
Contributor Author

FedeDP commented Feb 29, 2024

/unhold

@FedeDP
Copy link
Contributor Author

FedeDP commented Feb 29, 2024

/cc @jasondellaluce

@poiana
Copy link
Contributor

poiana commented Mar 1, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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:

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

@poiana poiana merged commit 3f03a2c into falcosecurity:master Mar 1, 2024
51 checks passed
@FedeDP FedeDP deleted the chore/allow_kmod_bpf_different_components branch March 1, 2024 08:39
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.

4 participants