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

falco-driver-loader add TMPDIR support #2518

Merged
merged 3 commits into from May 4, 2023
Merged

falco-driver-loader add TMPDIR support #2518

merged 3 commits into from May 4, 2023

Conversation

jabdr
Copy link
Contributor

@jabdr jabdr commented Apr 28, 2023

Closes 2517
Make wrapper now uses $TMPDIR if set.

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

/kind release

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area tests

/area proposals

/area CI

What this PR does / why we need it:
Replaces hardcoded path for make wrapper, to allow building via falco-driver-loader on systems, where /tmp is mounted with noexec.

Which issue(s) this PR fixes:

Fixes #2517

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

update: `falco-driver-loader` now uses now uses $TMPDIR if set

Closes 2517
Make wrapper now uses $TMPDIR if set.

Signed-off-by: jabdr <jd@q321.de>
@poiana
Copy link

poiana commented Apr 28, 2023

Welcome @jabdr! It looks like this is your first PR to falcosecurity/falco 🎉

@@ -252,6 +252,7 @@ load_kernel_module_compile() {
fi

# Try to compile using all the available gcc versions
MAKEWRAPPER="${TMPDIR:-"/tmp"}/falco-dkms-make"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd move the TMPDIR declaration below, beside other variables declarations near the end of script.
Then, i'd avoid using the MAKEWRAPPER and instead just go with $TMPDIR/falco-dkms-make.

@FedeDP
Copy link
Contributor

FedeDP commented May 2, 2023

Thanks for this! I think it is a valuable fix indeed!
/milestone 0.35.0

@poiana poiana added this to the 0.35.0 milestone May 2, 2023
@jabdr
Copy link
Contributor Author

jabdr commented May 2, 2023

@FedeDP I can change that. Alternatively I could also switch to use mktemp. It uses $TMPDIR if set or else uses /tmp. What do you think?

@FedeDP
Copy link
Contributor

FedeDP commented May 2, 2023

Alternatively I could also switch to use mktemp. It uses $TMPDIR if set or else uses /tmp.

I'd go with the simplest solution possible (ie: without involving mktemp) so that we keep a well-known name.

jabdr added 2 commits May 4, 2023 11:20
Signed-off-by: jabdr <jd@q321.de>
Signed-off-by: jabdr <jd@q321.de>
@jabdr
Copy link
Contributor Author

jabdr commented May 4, 2023

@FedeDP Done.

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.

LGTM! Thanks!
/approve

@poiana
Copy link

poiana commented May 4, 2023

LGTM label has been added.

Git tree hash: 32cf48fdc2dbc1884019857a1101955fb9580490

@poiana poiana added the approved label May 4, 2023
@poiana
Copy link

poiana commented May 4, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: FedeDP, jabdr, 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 f25c057 into falcosecurity:master May 4, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

falco-driver-loader fails if /tmp is mounted with noexec
4 participants