Skip to content

feat: detect CAP_BPF#681

Merged
cfc4n merged 2 commits into
gojue:masterfrom
Asphaltt:feat/env-detection
Dec 6, 2024
Merged

feat: detect CAP_BPF#681
cfc4n merged 2 commits into
gojue:masterfrom
Asphaltt:feat/env-detection

Conversation

@Asphaltt
Copy link
Copy Markdown
Member

@Asphaltt Asphaltt commented Dec 5, 2024

Without this check, there will be many noisy logs before log "error:operation not permitted", like #678 (comment).

In order to simplify code of main.go, let us move code of kernel
checking to cli.

Furthermore, put kernel checking at pre-run phase of cli.

Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
Comment thread cli/cmd/env_detection.go Outdated
@cfc4n cfc4n self-requested a review December 5, 2024 14:17
@cfc4n cfc4n added the improve label Dec 5, 2024
If no capability to run bpf progs, we must check CAP_BPF asap.

Without this check, there will be many noisy logs before log "error:operation
not permitted", like gojue#678 (comment).

Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
Copy link
Copy Markdown
Member

@cfc4n cfc4n 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.

@cfc4n cfc4n merged commit 1183b8d into gojue:master Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants