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

Proper BPF support? #11

Open
SolalPirelli opened this issue Nov 8, 2022 · 8 comments
Open

Proper BPF support? #11

SolalPirelli opened this issue Nov 8, 2022 · 8 comments

Comments

@SolalPirelli
Copy link
Member

@tharvik in case that's in line with the C4DT's priorities, having Klint work on BPF programs directly (not the hacky stuff from the paper) might be a good showcase.

A student had almost finished BPF ISA support for angr in a semester project with me, but some issues cropped up in the actual PR and I guess there wasn't time after the semester to finish it. Maybe it can be resurrected? angr/angr-platforms#46

@tharvik
Copy link
Contributor

tharvik commented Nov 10, 2022

BPF programs might be a good showcase.

Good idea, I'll check with the hierachy :)

Hoo, a bunch of existing programs to try klint on: https://github.com/zoidbergwill/awesome-ebpf#examples
Correct me if I'm wrong, there is (or was) support for eBPF Maps in code?

@SolalPirelli
Copy link
Member Author

There was indeed, IIRC the main difference from Klint's map_* stuff is that BPF maps copy keys and values rather than partially owning key poiners.

@tharvik
Copy link
Contributor

tharvik commented Nov 17, 2022

quick update: the hierarchy validated 🥳

@tharvik
Copy link
Contributor

tharvik commented Jan 9, 2023

support for eBPF in angr is in progress at angr/angr-platforms#55

@SolalPirelli
Copy link
Member Author

@tharvik any news on this?

@tharvik
Copy link
Contributor

tharvik commented Feb 13, 2023

upstream isn't really proactive, I bumped them, hopefully we'll have some news this week.

anyway, the PR is working (minus relocation & some specials instructions), feel free to use it, I'm happy to help with/fix any issue you might encounter.

@SolalPirelli
Copy link
Member Author

I see the PR was merged 🎉 I guess angr-platforms should become a dependency of klint now? I don't know how the packaging of it works (so that we can point Klint to an ebpf binary and it "just works")

@tharvik
Copy link
Contributor

tharvik commented Feb 27, 2023

yeah, it took a while but it finally landed 🥳

I guess angr-platforms should become a dependency of klint now?

yep, it's quite easy in fact. as each angr arch register itself on import, you simply have to import angr_platforms.ebpf to support it.
and for the dep itself, it seems that it's not available via pip.. but you can depend on its git by adding a
"angr-platforms @ git+https://github.com/angr/angr-platforms.git" item in the dependencies' array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants