-
Notifications
You must be signed in to change notification settings - Fork 920
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(scripts/falco-driver-loader): lsmod usage #1474
fix(scripts/falco-driver-loader): lsmod usage #1474
Conversation
Attempting to start falco on a host that had a similarly named module (e.g., "falcon") would cause the falco-driver-loader to loop attempting to rmmod falco when falco was not loaded. falco-driver-loader will now inspect only the first column of lsmod output and require the whole search string to match Fixes falcosecurity#1468 Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
Welcome @dnwe! It looks like this is your first PR to falcosecurity/falco 🎉 |
/assign @fntlnz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
We definitively need this fix.
/milestone 0.27.0
Just a question, see below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some concerns on the portability of -q
flag.
... unlike GNU grep, 7th Edition Unix grep did not conform to POSIX, because it lacked -q and its -s option behaved like GNU grep's -q option. USG-style grep also lacked -q but its -s option behaved like GNU grep. Portable shell scripts should avoid both -q and -s and should redirect standard and error output to /dev/null instead.
From the manual pages.
Also, we could think of using /proc/modules
rather than lsmod
. WDYT?
RE: portability of |
Regarding my comment about Thank you again. |
I was referring to what man pages say. Not checked personally, by hand. So, if the BTW great job, this is really needed 👏 |
RE: container runtimes, I checked the only two I have to hand (docker and containerd). In both cases if I start a barebones container with However, there's no great motivation to change it when the |
LGTM label has been added. Git tree hash: 3a5aa8848cedd78d5794bcb6353e4a6cf34d90e5
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: leodido, 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 |
What type of PR is this?
/kind bug
Any specific area of the project related to this PR?
/area engine
What this PR does / why we need it:
Attempting to start falco on a host that had a similarly named module
(e.g., "falcon") would cause the falco-driver-loader to loop attempting
to rmmod falco when falco was not loaded.
falco-driver-loader will now inspect only the first column of lsmod
output and require the whole search string to match
Which issue(s) this PR fixes:
Fixes #1468
Special notes for your reviewer:
Does this PR introduce a user-facing change?: