-
-
Notifications
You must be signed in to change notification settings - Fork 305
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
[windows_kext] Improve documentation #1719
Conversation
📝 WalkthroughWalkthroughThe pull request includes updates to several Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (9)
windows_kext/release/README.md (2)
10-10
: Approved with a minor formatting suggestion.The specification of "Visual Studio 2022 and WDK" provides clearer information about the required tools. This is a positive change that will help users set up the correct environment.
Consider changing the asterisk to a dash for consistency with the unordered list style used in the rest of the document:
- * Visual Studio 2022 and WDK need to be installed. +- Visual Studio 2022 and WDK need to be installed.🧰 Tools
🪛 Markdownlint
10-10: Expected: dash; Actual: asterisk
Unordered list style(MD004, ul-style)
16-17
: Approved with suggestions for clarity and formatting.The addition of the note about the Windows SDK version is valuable information for users. It helps prevent potential issues if a different SDK version is used.
Consider the following improvements:
- Add a language specification to the code block above this note.
- Adjust the wording and punctuation for better clarity:
-> Script is written for VS `$SDK_Version = "10.0.22621.0"`. If different version is used update the script. +> The script is written for VS `$SDK_Version = "10.0.22621.0"`. If a different version is used, update the script.
- Consider adding instructions on how to update the script if a different SDK version is used.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~16-~16: A determiner appears to be missing. Consider inserting it.
Context: ...ext_release_v.../ ./build_cab.bat ``` > Script is written for VS `$SDK_Version = "10.0...(AI_EN_LECTOR_MISSING_DETERMINER)
[uncategorized] ~16-~16: You might be missing the article “a” here.
Context: ... VS$SDK_Version = "10.0.22621.0"
. If different version is used update the script. 3. ...(AI_EN_LECTOR_MISSING_DETERMINER_A)
[uncategorized] ~16-~16: A comma might be missing here.
Context: ...10.0.22621.0"`. If different version is used update the script. 3. Sing the cab fil...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
windows_kext/protocol/README.md (3)
5-9
: Improve grammar and clarity in the introductionThe introduction provides a good overview of the protocol. However, there are a few minor grammatical issues that should be addressed:
- Line 5: Add an article before "simple binary protocol".
- Line 5: Use "are" instead of "is" for "communications".
- Line 7: Add an article before "single read request".
- Consider breaking the bullet points into separate lines for better readability.
Here's a suggested revision:
-The crate implements simple binary protocol. The communications is designed to be concurrent stream of packets. -Input and output work independent of each other. - - Pormtaster can read multiple info packets from the queue with single read request. - - Portmaster can write one command packet to the kernel extension with single write request. +The crate implements a simple binary protocol. The communications are designed to be a concurrent stream of packets. +Input and output work independently of each other: + +- Portmaster can read multiple info packets from the queue with a single read request. +- Portmaster can write one command packet to the kernel extension with a single write request.Also, there's a typo in "Pormtaster" which should be "Portmaster".
🧰 Tools
🪛 LanguageTool
[uncategorized] ~5-~5: Possible missing article found.
Context: ...ce` / Portmaster. The crate implements simple binary protocol. The communications is ...(AI_HYDRA_LEO_MISSING_A)
[grammar] ~5-~5: You should probably use: “are”.
Context: ...ple binary protocol. The communications is designed to be concurrent stream of pac...(AGREEMENT_SENT_START)
[uncategorized] ~5-~5: Possible missing article found.
Context: ...l. The communications is designed to be concurrent stream of packets. Input and output wor...(AI_HYDRA_LEO_MISSING_A)
[uncategorized] ~7-~7: Possible missing article found.
Context: ...ltiple info packets from the queue with single read request. - Portmaster can write o...(AI_HYDRA_LEO_MISSING_A)
🪛 Markdownlint
7-7: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
8-8: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
28-42
: Command packet description is good, with a minor suggestionThe description of Command packets is clear and well-structured, similar to the Info packet section. The visual representation of the packet header is helpful. However, there's a minor grammatical issue in the last line that could be improved.
Consider revising the last line for better clarity:
-Rest of the packet will be the payload of the command (some commands don't contain payload just the command type). +The rest of the packet will be the payload of the command (some commands contain only the command type without additional payload).This revision improves readability and avoids the missing comma issue flagged by the static analysis tool.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~29-~29: Possible missing article found.
Context: ...data. ## Command: Portmaster -> Kext Command is a packet that portmaster sends to th...(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~41-~41: Possible missing article found.
Context: ...tick mark represents one bit position. Rest of the packet will be the payload of th...(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~42-~42: Possible missing comma found.
Context: ...he command (some commands don't contain payload just the command type).(AI_HYDRA_LEO_MISSING_COMMA)
🪛 Markdownlint
34-34: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
Line range hint
1-43
: Improve markdown formatting for better consistencyThe overall structure of the document is logical and easy to follow. However, there are a few minor formatting issues that could be addressed to improve consistency:
- Unordered list indentation: Ensure all unordered lists have consistent indentation (lines 7-8).
- Fenced code blocks: Add a language specifier to the fenced code blocks for syntax highlighting (lines 16-22 and 34-39).
Here are the suggested improvements:
For the unordered list in the introduction:
Input and output work independently of each other: - Portmaster can read multiple info packets from the queue with a single read request. - Portmaster can write one command packet to the kernel extension with a single write request.For the fenced code blocks, add a language specifier (e.g.,
txt
for plain text):```txt 0 1 2 3 4 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Info Type | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
These changes will improve the overall consistency and appearance of the document.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~5-~5: Possible missing article found.
Context: ...ce` / Portmaster. The crate implements simple binary protocol. The communications is ...(AI_HYDRA_LEO_MISSING_A)
[grammar] ~5-~5: You should probably use: “are”.
Context: ...ple binary protocol. The communications is designed to be concurrent stream of pac...(AGREEMENT_SENT_START)
[uncategorized] ~5-~5: Possible missing article found.
Context: ...l. The communications is designed to be concurrent stream of packets. Input and output wor...(AI_HYDRA_LEO_MISSING_A)
[uncategorized] ~7-~7: Possible missing article found.
Context: ...ltiple info packets from the queue with single read request. - Portmaster can write o...(AI_HYDRA_LEO_MISSING_A)
[uncategorized] ~29-~29: Possible missing article found.
Context: ...data. ## Command: Portmaster -> Kext Command is a packet that portmaster sends to th...(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~41-~41: Possible missing article found.
Context: ...tick mark represents one bit position. Rest of the packet will be the payload of th...(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~42-~42: Possible missing comma found.
Context: ...he command (some commands don't contain payload just the command type).(AI_HYDRA_LEO_MISSING_COMMA)
🪛 Markdownlint
7-7: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
8-8: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
16-16: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
34-34: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
windows_kext/README.md (4)
8-10
: LGTM! Consider adding brief descriptions for each link.The changes improve clarity and consistency. The renaming of "PacketDoc.md" to "PacketFlow.md" likely better reflects the content of that file.
To further enhance the documentation, consider adding a brief description (1-2 words) for each link to give readers a quick overview of what to expect in each linked document.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~10-~10: This verb may not be in the correct form. Consider using a different form for this context.
Context: ...g-wfp-callout-drivers) -> The driver is build on top of WFP. ### Building The Wind...(AI_EN_LECTOR_REPLACEMENT_VERB_FORM)
17-17
: Approved. Consider formatting the URL as a proper markdown link.The spelling correction and addition of the Windows Driver Kit as a prerequisite are valuable improvements.
To enhance readability and conform to markdown best practices, consider formatting the URL as a proper markdown link:
- Windows Driver Kit - [Download the Windows Driver Kit (WDK)](https://learn.microsoft.com/en-us/windows-hardware/drivers/download-the-wdk)Also applies to: 22-23
29-31
: Approved. Minor grammatical suggestion.The added note about test signing is crucial for security, and the improved formatting of command-line instructions enhances readability.
Consider this minor grammatical correction:
- Usually done on virtual machine dedicated for testing. + Usually done on a virtual machine dedicated for testing.Also applies to: 35-43
🧰 Tools
🪛 LanguageTool
[uncategorized] ~29-~29: You might be missing the article “a” here.
Context: ...ded for a work machine. Usually done on virtual machine dedicated for testing. In orde...(AI_EN_LECTOR_MISSING_DETERMINER_A)
[style] ~30-~30: Consider a shorter alternative to avoid wordiness.
Context: ...virtual machine dedicated for testing. In order to test the driver on your machine, you wi...(IN_ORDER_TO_PREMIUM)
70-72
: LGTM! Consider using consistent command prompt indicators.The improved formatting of command-line instructions enhances readability.
For consistency with the previous sections, consider using
ps1
as the language identifier for the code block:-```sh +```ps1 cd kext_tester go run .
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
- windows_kext/README.md (2 hunks)
- windows_kext/protocol/README.md (1 hunks)
- windows_kext/release/README.md (2 hunks)
🧰 Additional context used
🪛 LanguageTool
windows_kext/README.md
[uncategorized] ~10-~10: This verb may not be in the correct form. Consider using a different form for this context.
Context: ...g-wfp-callout-drivers) -> The driver is build on top of WFP. ### Building The Wind...(AI_EN_LECTOR_REPLACEMENT_VERB_FORM)
[uncategorized] ~29-~29: You might be missing the article “a” here.
Context: ...ded for a work machine. Usually done on virtual machine dedicated for testing. In orde...(AI_EN_LECTOR_MISSING_DETERMINER_A)
[style] ~30-~30: Consider a shorter alternative to avoid wordiness.
Context: ...virtual machine dedicated for testing. In order to test the driver on your machine, you wi...(IN_ORDER_TO_PREMIUM)
windows_kext/protocol/README.md
[uncategorized] ~5-~5: Possible missing article found.
Context: ...ce` / Portmaster. The crate implements simple binary protocol. The communications is ...(AI_HYDRA_LEO_MISSING_A)
[grammar] ~5-~5: You should probably use: “are”.
Context: ...ple binary protocol. The communications is designed to be concurrent stream of pac...(AGREEMENT_SENT_START)
[uncategorized] ~5-~5: Possible missing article found.
Context: ...l. The communications is designed to be concurrent stream of packets. Input and output wor...(AI_HYDRA_LEO_MISSING_A)
[uncategorized] ~7-~7: Possible missing article found.
Context: ...ltiple info packets from the queue with single read request. - Portmaster can write o...(AI_HYDRA_LEO_MISSING_A)
[uncategorized] ~29-~29: Possible missing article found.
Context: ...data. ## Command: Portmaster -> Kext Command is a packet that portmaster sends to th...(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~41-~41: Possible missing article found.
Context: ...tick mark represents one bit position. Rest of the packet will be the payload of th...(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~42-~42: Possible missing comma found.
Context: ...he command (some commands don't contain payload just the command type).(AI_HYDRA_LEO_MISSING_COMMA)
windows_kext/release/README.md
[uncategorized] ~16-~16: A determiner appears to be missing. Consider inserting it.
Context: ...ext_release_v.../ ./build_cab.bat ``` > Script is written for VS `$SDK_Version = "10.0...(AI_EN_LECTOR_MISSING_DETERMINER)
[uncategorized] ~16-~16: You might be missing the article “a” here.
Context: ... VS$SDK_Version = "10.0.22621.0"
. If different version is used update the script. 3. ...(AI_EN_LECTOR_MISSING_DETERMINER_A)
[uncategorized] ~16-~16: A comma might be missing here.
Context: ...10.0.22621.0"`. If different version is used update the script. 3. Sing the cab fil...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
🪛 Markdownlint
windows_kext/README.md
20-20: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
21-21: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
23-23: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
25-25: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
23-23: null
Bare URL used(MD034, no-bare-urls)
25-25: null
Bare URL used(MD034, no-bare-urls)
windows_kext/protocol/README.md
7-7: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
8-8: Expected: 0; Actual: 1
Unordered list indentation(MD007, ul-indent)
16-16: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
34-34: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
windows_kext/release/README.md
10-10: Expected: dash; Actual: asterisk
Unordered list style(MD004, ul-style)
12-12: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
🔇 Additional comments (5)
windows_kext/release/README.md (2)
29-29
: Approved: Valuable optional step added.The addition of the note about optionally signing the .sys file with a company certificate is a useful piece of information. It informs users of an additional step they might want to take, depending on their specific needs.
Line range hint
1-29
: Overall: Improved documentation with minor suggestions.The changes to this README file significantly improve the clarity and specificity of the instructions for the Kext release tool. The addition of specific Visual Studio version requirements and the note about the Windows SDK version are particularly helpful.
A few minor formatting and language improvements have been suggested to enhance consistency and readability. These include:
- Adjusting list formatting for consistency
- Adding a language specification to a code block
- Minor wording and punctuation adjustments
Once these small changes are addressed, the documentation will be even more user-friendly and informative.
🧰 Tools
🪛 LanguageTool
[grammar] ~9-~9: “Windows” (operating system by Microsoft) is a proper noun and needs to be capitalized.
Context: ...file - Copy the zip and extract it on a windows machine. * Visual Studio 2022 and WDK...(A_WINDOWS)
[uncategorized] ~16-~16: A determiner appears to be missing. Consider inserting it.
Context: ...ext_release_v.../ ./build_cab.bat ``` > Script is written for VS `$SDK_Version = "10.0...(AI_EN_LECTOR_MISSING_DETERMINER)
[uncategorized] ~16-~16: You might be missing the article “a” here.
Context: ... VS$SDK_Version = "10.0.22621.0"
. If different version is used update the script. 3. ...(AI_EN_LECTOR_MISSING_DETERMINER_A)
[uncategorized] ~16-~16: A comma might be missing here.
Context: ...10.0.22621.0"`. If different version is used update the script. 3. Sing the cab fil...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
🪛 Markdownlint
10-10: Expected: dash; Actual: asterisk
Unordered list style(MD004, ul-style)
12-12: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
windows_kext/protocol/README.md (1)
10-26
: Info packet description looks goodThe description of Info packets is clear, detailed, and well-structured. The visual representation of the packet header is particularly helpful for understanding the structure. Good job on providing comprehensive documentation for this part of the protocol.
🧰 Tools
🪛 Markdownlint
16-16: null
Fenced code blocks should have a language specified(MD040, fenced-code-language)
windows_kext/README.md (2)
46-50
: LGTM! Improved formatting enhances readability.The consistent use of code blocks for command-line instructions improves the overall readability and usability of the document.
Line range hint
1-74
: Overall, these changes significantly improve the documentation.The updates to the README file enhance clarity, readability, and completeness of the documentation for the Portmaster Windows kernel extension. The changes include:
- Updated documentation links
- Spelling corrections
- Addition of important prerequisites
- Improved formatting of command-line instructions
- Added security considerations for test signing
These improvements will help developers better understand the project setup and requirements.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~10-~10: This verb may not be in the correct form. Consider using a different form for this context.
Context: ...g-wfp-callout-drivers) -> The driver is build on top of WFP. ### Building The Wind...(AI_EN_LECTOR_REPLACEMENT_VERB_FORM)
[uncategorized] ~29-~29: You might be missing the article “a” here.
Context: ...ded for a work machine. Usually done on virtual machine dedicated for testing. In orde...(AI_EN_LECTOR_MISSING_DETERMINER_A)
[style] ~30-~30: Consider a shorter alternative to avoid wordiness.
Context: ...virtual machine dedicated for testing. In order to test the driver on your machine, you wi...(IN_ORDER_TO_PREMIUM)
🪛 Markdownlint
20-20: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
21-21: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
23-23: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
25-25: Expected: 2; Actual: 4
Unordered list indentation(MD007, ul-indent)
23-23: null
Bare URL used(MD034, no-bare-urls)
25-25: null
Bare URL used(MD034, no-bare-urls)
Summary by CodeRabbit
kextinterface
and Portmaster, detailing Info and Command packets.