Disassembly support for Extended BPF#6204
Conversation
78acef3 to
068b958
Compare
notxvilka
left a comment
There was a problem hiding this comment.
Please rebase on top of the latest dev
068b958 to
1104c78
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 15 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
I will be back to this PR after 4 days, need to finish up my semester exams |
228e3ae to
cbde434
Compare
|
@Jagath-P please rebase again and resolve the conflicts |
a9381bd to
b7b2fed
Compare
b7b2fed to
dafe935
Compare
Rot127
left a comment
There was a problem hiding this comment.
Please increase test coverage to cover at lease:
- all operand types
- all jumps and calls. They are too important to not be tested.
| case BPF_INS_JSGE: | ||
| case BPF_INS_JSLT: | ||
| case BPF_INS_JSLE: | ||
| if (insn->detail->bpf.op_count > 2) { |
|
this needs to be tested against cs4-5 |
BPF doesn't exist in capstone v4 , It was introduced only from v5, Hence in meson.build file declared bpf plugins under capstone version >4 . Also I have added multiple checks in analysis_bpf_cs.c file for capstone v6 specific instructions I have taken https://github.com/capstone-engine/capstone/blob/next/include/capstone/bpf.h as reference, and I took into account bpf.h file of next, v5,v6 even though how do i test locally using capstone past versions ? should i update my subprojects? |
See how it's done in our CI workflow: |
|
@Jagath-P please address the feedback so that this could land for the upcoming 0.9.0 release |
Yeah was busy in other works, will finish the work soon |
dafe935 to
0d71459
Compare
|
I have gated the bpf plugin currently to capstone next only . As CS_API_MAJOR is 6 in both released v6 and next — version numbers alone cannot distinguish them. Latest BPF instructions (SDIV, SMOD, MOVSB, JLT32etc.) (present in the Linux Kernel 7.1.0 BPF ISA specification doc) are not present in any released Capstone version yet. |
aceb55e to
cb18ba8
Compare
cb18ba8 to
72ead9b
Compare
|
@notxvilka @wargio @Rot127 can any of you review this once again |
There was a problem hiding this comment.
As CS_API_MAJOR is 6 in both released v6 and next
Please rebase. With the latest capstone there is the CS_VERSION_PRE_RELEASE you can use.
@Jagath-P It seems like the capstone v4/v5 workflows don't run properly if I push it to upstream/
Please address the comments here and then reopen the PR with a capstone- prefix in the branch name.
| cs_free(insn, n); | ||
| return op->size; | ||
| } | ||
| RzAnalysisPlugin rz_analysis_plugin_bpf_cs = { |
| .name = "bpf", | ||
| .desc = "Extended BPF analysis plugin", | ||
| .license = "LGPL3", | ||
| .arch = "bpf", |
|
Superseded by #6611 |
Your checklist for this pull request
RZ_APIfunction and struct this PR changes.RZ_API).Detailed description
I have used AI for doing some repeated stuff like writing all instructions op types, I have manually checked each instruction after the use.
...
Test plan
...
Closing issues
closes ebpf part of #4757
...