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

Verify that prevail is consistent with bpf2c and ubpf behavior #1451

Closed
dthaler opened this issue Oct 7, 2022 · 7 comments · Fixed by #1991
Closed

Verify that prevail is consistent with bpf2c and ubpf behavior #1451

dthaler opened this issue Oct 7, 2022 · 7 comments · Fixed by #1991
Assignees
Labels
security Related to security hardening tests triaged Discussed in a triage meeting
Milestone

Comments

@dthaler
Copy link
Collaborator

dthaler commented Oct 7, 2022

Describe the feature you'd like supported

https://github.com/Alan-Jowett/bpf_conformance has a runtime-agnostic conformance suite.
Prevail computes invariants when verifying a program, and so should be able to compute the results expected by the suite.

Proposed solution

This can be done in the prevail repository but since ebpf-for-windows depends on having ubpf and bpf2c compute the same answers as the verifier expects, we should use a common test suite to ensure consistency independent of ebpf-for-windows.
This issue thus tracks the dependency, but the only work in ebpf-for-windows for this issue should be to update to a future version of dependencies once the work is done in the dependency.

Additional context

No response

@dthaler dthaler added enhancement New feature or request security Related to security hardening tests and removed enhancement New feature or request labels Oct 7, 2022
@dthaler
Copy link
Collaborator Author

dthaler commented Oct 10, 2022

vbpf/ebpf-verifier#400 and vbpf/ebpf-verifier#401 add tests to do this

@dahavey dahavey added the triaged Discussed in a triage meeting label Oct 10, 2022
@dahavey dahavey added this to the 2210 milestone Oct 10, 2022
@dthaler dthaler modified the milestones: 2210, 2211 Oct 30, 2022
@Alan-Jowett
Copy link
Member

@dthaler Can we go ahead and close this now?

@dthaler
Copy link
Collaborator Author

dthaler commented Nov 7, 2022

@dthaler Can we go ahead and close this now?

No, this is not done yet. There are a series of PRs in the verifier repo, some merged, some to be posted still.

@dthaler
Copy link
Collaborator Author

dthaler commented Nov 11, 2022

@dthaler dthaler added the blocked Blocked on another issue that must be done first label Nov 11, 2022
@dahavey dahavey modified the milestones: 2211, 2301 Nov 21, 2022
@dthaler
Copy link
Collaborator Author

dthaler commented Nov 21, 2022

#1665 documents the findings.
I believe this issue can be closed once #1665 is merged, and we pull in an updated verifier after vbpf/ebpf-verifier#423 (or a similar alternative) is merged.

dthaler added a commit to dthaler/ebpf-for-windows that referenced this issue Dec 20, 2022
Fixes microsoft#1451

Signed-off-by: Dave Thaler <[email protected]>
@dthaler
Copy link
Collaborator Author

dthaler commented Dec 20, 2022

This is now blocked on issue #1667

dthaler added a commit to dthaler/ebpf-for-windows that referenced this issue Dec 20, 2022
Fixes microsoft#1451

Signed-off-by: Dave Thaler <[email protected]>
dthaler added a commit to dthaler/ebpf-for-windows that referenced this issue Dec 22, 2022
Fixes microsoft#1451

Signed-off-by: Dave Thaler <[email protected]>
dthaler added a commit to dthaler/ebpf-for-windows that referenced this issue Jan 2, 2023
Fixes microsoft#1451

Signed-off-by: Dave Thaler <[email protected]>
@dthaler dthaler added blocked Blocked on another issue that must be done first and removed blocked Blocked on another issue that must be done first labels Jan 3, 2023
@dthaler
Copy link
Collaborator Author

dthaler commented Jan 3, 2023

This is now blocked on vbpf/ebpf-verifier#441

@dthaler dthaler modified the milestones: 2301, 2302 Jan 28, 2023
@dthaler dthaler removed the blocked Blocked on another issue that must be done first label Jan 31, 2023
dthaler added a commit to dthaler/ebpf-for-windows that referenced this issue Feb 1, 2023
dthaler added a commit to dthaler/ebpf-for-windows that referenced this issue Feb 1, 2023
dthaler added a commit that referenced this issue Feb 1, 2023
* Update verifier to latest

Fixes #1451
Fixes #1756

Signed-off-by: Dave Thaler <[email protected]>

* Update samples to work around verifier limitation

Signed-off-by: Dave Thaler <[email protected]>

* Update expected bpf2c output

Signed-off-by: Dave Thaler <[email protected]>

* Fix cmake build

Signed-off-by: Dave Thaler <[email protected]>

---------

Signed-off-by: Dave Thaler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
security Related to security hardening tests triaged Discussed in a triage meeting
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants