-
Notifications
You must be signed in to change notification settings - Fork 205
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
add bpf2c support for non-inlined local function calls #3506
base: main
Are you sure you want to change the base?
Conversation
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.
One minor comment about ubpf support for calling local functions.
56ad36d
to
e72b0a8
Compare
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
I strongly suspect this change won't pass conformance tests once Alan-Jowett/bpf_conformance#245 merges. The BPF ISA appears to assume that the JIT compiler adjusts R10 when calling the child function. The code needs to be modified to do one of two things:
|
If so, I think that PR should be fixed.
The BPF ISA has no such assumption. See https://datatracker.ietf.org/doc/draft-ietf-bpf-isa/
This might be needed to match the Linux psABI but not for conformance to the ABI. As such, I'd treat them as part of a separate pull request that may need additional verifier support. |
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
uBPF supports call local for raw byte code but not when loaded from ELF Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
Description
Previous to this PR, bpf2c only supported inlined function calls, not bpf2bpf function calls.
PREVAIL support for non-inlined function calls is in vbpf/ebpf-verifier#608 which should be merged before this PR.
This PR adds support in bpf2c, as well as a bindmonitor_bpf2bpf.c test sample.
A few changes are prerequisites towards the ability to have multiple programs in the same ELF section (issue #1440), such as the fact that there can be multiple program_t structures per section_t in bpf2c. But #1440 also requires support in PREVAIL for vbpf/ebpf-verifier#393 which hasn't been done yet so the rest of #1440 is left for after that.
Fixes #3388
Testing
This PR adds a bindmonitor_bpf2bpf.c test sample
Documentation
This PR includes a doc update to isa-support.rst
Installation
No impact