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

bpf2c needs better diagnostics support. #3879

Open
ben-zen opened this issue Sep 27, 2024 · 1 comment · May be fixed by #4140
Open

bpf2c needs better diagnostics support. #3879

ben-zen opened this issue Sep 27, 2024 · 1 comment · May be fixed by #4140
Assignees
Labels
blocked Blocked on another issue that must be done first enhancement New feature or request P2 triaged Discussed in a triage meeting
Milestone

Comments

@ben-zen
Copy link
Contributor

ben-zen commented Sep 27, 2024

Describe the feature you'd like supported

When bpf2c fails to validate a command, the results are lackluster:

Verification failed for StringOpsTest with error error: mismatched EBPF_ARGUMENT_TYPE_PTR_TO* and EBPF_ARGUMENT_TYPE_CONST_SIZE_OR_ZERO: bpf_strchr

With no further explanation, including what arguments the verifier found, it's difficult to understand these failures without running bpf2c under a debugger directly and breaking on the exception that it throws.

Proposed solution

Adding a --verbose flag and extended logging to the running system.

Additional context

There's a verbose option on the runtime verifier (netsh ebpf sh ver ... level=verbose) and the goal here would be to add similar behavior in the build step.

@ben-zen ben-zen added the enhancement New feature or request label Sep 27, 2024
@shankarseal
Copy link
Collaborator

shankarseal commented Sep 30, 2024

@ben-zen - one proposed solution is to output verbose error logs always when verification fails. This particular error however needs better error output from the verifier. And so, an issue must be raised on verifier for this particular issue. @Alan-Jowett can you please create one in the verifier repo and associate with this issue?

@shankarseal shankarseal changed the title bpf2c needs --verbose bpf2c needs better diagnostics support. Sep 30, 2024
@shankarseal shankarseal added blocked Blocked on another issue that must be done first triaged Discussed in a triage meeting P2 labels Sep 30, 2024
@shankarseal shankarseal added this to the 2411 milestone Sep 30, 2024
@shankarseal shankarseal modified the milestones: 2411, 2501 Nov 2, 2024
@Alan-Jowett Alan-Jowett linked a pull request Jan 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked on another issue that must be done first enhancement New feature or request P2 triaged Discussed in a triage meeting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants