seccomp-tools
seccomp-tools copied to clipboard
Support dumping/disassembling to an input format accepted by `seccomp-tools asm`
Right now this is possible:
seccomp-tools asm filter.asm -f raw | seccomp-tools disasm -
But as far as I can tell, this is not:
seccomp-tools disasm filter.bin -f <format-name> | seccomp-tools asm -
Can we support disasm and dump outputting in a format accepted by asm? Or have asm accept the format output by dump and disasm.
Sounds a good suggestion. The original intention of dump/disasm is making them human readable, but as we also support different format of output, it makes sense to have a certain format is acceptable by asm.
I somehow decided to re-write the whole assembly parser so it will take a longer time. A WIP is at the racc branch: https://github.com/david942j/seccomp-tools/compare/racc?expand=1
Hi @gsingh93 , I have a PR https://github.com/david942j/seccomp-tools/pull/210 which adds the support of passing --no-bpf to disasm, and the output format in this case is a valid format for seccomp-tools asm.
You can see READMD.md in the PR for more details. Let me know whether the usage matches your expectations.
Thanks! I haven't tested it yet, but based on the README it looks good.
Thanks! I will continue to merge it then.