-
Notifications
You must be signed in to change notification settings - Fork 743
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
Add lexers for syzkaller DSLs #1699
Conversation
As CI is currently broken, here's the result of running
@dblessing PTAL, when you get a chance. Thanks! |
@dblessing, a reminder ping as you have asked. I'm also getting a word from Travis that Rouge has been allotted the requested OSS credits. |
Hi @tancnle, How could I help with getting this PR merged? Being one of syzkaller's developers, I have a lot of experience working with the mentioned languages, so I'm confident in the semantical correctness of these lexers. I've also included extensive tests for both lexers, which I manually written and checked. It would be awesome to have these lexers merged into Rouge, and thus allow highlighting syzkaller-related snippets on GitHub Pages. Thank you! |
@xairy Thank you for your hard work on this PR. I will spend some time reviewing it later today 👍🏼 . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution @xairy 👍🏼 Really appreciated the level of care you have put into this PR. Great write up on the issue and implementation (https://xairy.io/articles/2021/syzkaller-syntax-highlight) ❤️
I have left some suggestions for your consideration, nothing major, mostly around indentation and replacing tests with visual samples. Please let me know what you think 🙏🏼
Sorry for the indentation issues, all should be fixed now. Thanks a lot for looking at the PR! |
This change adds a lexer for syzlang, a DSL used by syzkaller [1] to describe system call interfaces. The lexer intentionally recognizes code with less strict whitespacing rules than what syzkaller demands. This is useful for line-splitting and annotating syzlang snippets. [1] https://github.com/google/syzkaller Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
This change adds a lexer for syzprog, a DSL used by syzkaller [1] to describe sequences of system calls. The lexer intentionally recognizes code with less strict whitespacing rules than what syzkaller demands. This is useful for line-splitting and annotating syzprog snippets. [1] https://github.com/google/syzkaller Signed-off-by: Andrey Konovalov <andreyknvl@gmail.com>
Oh, and thank you for checking out the write-up! =) |
Great work on this @xairy 👍🏼 Merging 🚀 |
Awesome! Thank you, @tancnle! Looking forward to the next release! =) |
This changes adds lexers for two domain-specific languages used by syzkaller, a production-grade kernel fuzzer:
syzlang
, which allows describing system call interfaces, andsyzprog
, which allows describing sequences of system calls.Both lexers are less restrictive than syzkaller's parsers to allow more whitespaces and comments. This is done deliberately to allow adding line-by-line annotations to snippets.
CC @dvyukov