Skip to content

New architecture: BPF#1388

Merged
aquynh merged 36 commits intocapstone-engine:nextfrom
david942j:bpf
Feb 18, 2019
Merged

New architecture: BPF#1388
aquynh merged 36 commits intocapstone-engine:nextfrom
david942j:bpf

Conversation

@david942j
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

aquynh commented Feb 17, 2019

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

Comment thread cstool/cstool_bpf.c Outdated
Comment thread arch/BPF/BPFInstPrinter.c Outdated
@aquynh
Copy link
Copy Markdown
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
Copy Markdown
Collaborator

aquynh commented Feb 17, 2019

Comment thread suite/fuzz/fuzz_disasm.c
CS_MODE_BIG_ENDIAN,
"tms320c64x"
},
#if CS_NEXT_VERSION >= 5
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

aquynh commented Feb 18, 2019

merged, thanks for this amazing work!

@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented Feb 18, 2019

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

@david942j
Copy link
Copy Markdown
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.

3 participants