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

New architecture: BPF #1388

Merged
merged 36 commits into from
Feb 18, 2019
Merged

New architecture: BPF #1388

merged 36 commits into from
Feb 18, 2019

Conversation

david942j
Copy link
Contributor

@david942j david942j commented Feb 17, 2019

closes #838

Berkeley Packet Filter

  • Supports both classic and extended BPF (CS_MODE_BPF_CLASSIC, CS_MODE_BPF_EXTENDED)
  • Fully tested
  • Python bindings

references:

@aquynh
Copy link
Collaborator

aquynh commented Feb 17, 2019

wow nice work! let me go thru the code & give some comments

cstool/cstool_bpf.c Outdated Show resolved Hide resolved
arch/BPF/BPFInstPrinter.c Outdated Show resolved Hide resolved
@aquynh
Copy link
Collaborator

aquynh commented Feb 17, 2019

the code looks very clean, you did an amazing job!

@HarDToBelieve @catenacyber this also updates your regression testsuite & fuzzer, please ack.

@aquynh
Copy link
Collaborator

aquynh commented Feb 17, 2019

@@ -189,14 +189,24 @@ static struct platform platforms[] = {
CS_MODE_BIG_ENDIAN,
"tms320c64x"
},
#if CS_NEXT_VERSION >= 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the ifdef needs to remain so that both next and master branch can be fuzzed

Copy link
Contributor Author

@david942j david942j Feb 18, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I found both master and next branch has the same CS_NEXT_VERSION = 5, that's why I removed it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok thanks @david942j so your code is good

@aquynh how can a program know at compile time which architectures are supported by the current capstone ie branch master and branch next ?

@catenacyber
Copy link
Contributor

Great !

Cheers @david942j
PS : if you know about BPF, could you take a look at the-tcpdump-group/libpcap#777

@aquynh aquynh merged commit cac94cc into capstone-engine:next Feb 18, 2019
@aquynh
Copy link
Collaborator

aquynh commented Feb 18, 2019

merged, thanks for this amazing work!

@aquynh
Copy link
Collaborator

aquynh commented Feb 18, 2019

@david942j, i had a commit to print out BPF for cstool -v at 7ed49b3

@david942j
Copy link
Contributor Author

Oops I missed it, thanks!

@david942j david942j deleted the bpf branch February 18, 2019 12:30
@riptl riptl mentioned this pull request Jul 22, 2022
6 tasks
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

Successfully merging this pull request may close these issues.

None yet

3 participants