-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Silence missing BPF program error #1393
Silence missing BPF program error #1393
Conversation
Maybe we could replace this message when we will have the logging capability in place, in this way, we don't lose this info for an undefined period of time...WDYT? BTW thank you for working on this, a logging framework is something we really need in scap/libpman! Just a minor note: in theory, we could remove libpman now, if it requires extra work in this logging task. libpman was used as an helper library in the initial modern bpf testing framework but now that we have the v-table and the engine architecture, this library is no longer necessary |
My intention here is to optimize the state of things short-term as well. The logging message already produces confusion among users, while bringing value in form of debugging information. It would take some time to introduce a proper logging, and while the downsides are outweighing the advantages, it makes sense to me to turn it off for now. Does it sound reasonable for you, folks?
Sounds interesting, but to be honest I haven't followed the recent development so closely, and need to think about this possibility. Generally speaking less moving parts the better of course. |
Hey, it seems like someone heard your prayers 😆 #1395 Feel free to leave your review over there! |
Prayers is a strong word, but it's nice to see this development :) |
I think this can now be improved to log a debug message since #1395 was merged :) |
Issues go stale after 90d of inactivity. Mark the issue as fresh with Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh with Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with Provide feedback via https://github.com/falcosecurity/community. /lifecycle rotten |
/remove-lifecycle rotten @erthalion news? :) |
Lots of news, which one you would like to hear? :) Haven't had a chance yet to rework this one, give me a couple of days. |
Ahahaha hope they are good news :D
No problem! |
@FedeDP this should look better now. Not sure, is there anything needed to trigger the tests? |
Just me pushing the button heheh |
userspace/libpman/src/state.c
Outdated
@@ -46,7 +46,23 @@ static void log_error(const char* fmt, ...) | |||
va_end(args); | |||
} | |||
|
|||
static void log_error(const char* fmt, ...) |
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 think we can drop this one now ;)
@@ -25,7 +25,7 @@ limitations under the License. | |||
|
|||
struct internal_state g_state = {}; | |||
|
|||
static void log_error(const char* fmt, ...) | |||
static void log_msg(enum falcosecurity_log_severity level, const char* fmt, ...) |
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.
we need to use the level
inside this function, atm it's not used
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.
/me facepalming
Sure, give me a moment.
PR #943 has introduced ability to exclude a set of tail-called programs from loading. Yet current such excluded program will generate an error message, which could be misleading. Extend the logging infrastructure to be able to use a specified log level and downgrade the message to the debug level. Signed-off-by: Dmitrii Dolgov <9erthalion6@gmail.com>
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 like this!
/approve
LGTM label has been added. Git tree hash: 4c7cedd301e0f4073123e462fa6d7b3cbf3f286f
|
/milestone 0.15.0 |
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.
/approve
Thank you!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, erthalion, FedeDP 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 |
Thanks, @FedeDP @Andreagit97 ! |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area libpman
Does this PR require a change in the driver versions?
What this PR does / why we need it:
PR #943 has introduced ability to exclude a set of tail-called programs from loading. Yet current such excluded program will generate an error message, which could be misleading. Downgrage the error message to the debug level.
Which issue(s) this PR fixes:
Fixes #943
Special notes for your reviewer:
PR also extends the logging functionality a bit to be able to specify the logging level.
Does this PR introduce a user-facing change?: