-
Notifications
You must be signed in to change notification settings - Fork 387
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
RHEL-68725: netkvm: Several fixes to prevent problems under driver verifier #1206
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://issues.redhat.com/browse/RHEL-68725 The problem can be reproduced under driver verifier with low resource simulation. If the miniport is registered but the protocol fail to register we need to deregister the miniport. Otherwise in future attempts to load the driver the NDIS enters erroneous state and may issue BSOD. Example of BSOD: BUGCODE_NDIS_DRIVER/NDIS_BUGCHECK_REFCOUNT_IMBALANCE. Signed-off-by: Yuri Benditovich <[email protected]>
Global value of max RX buffers, shared among queues, is bad idea. It is especially bad when memory allocation during queue initialization may fail, for example in case of driver running under driver verifier. Changing the global field to per-queue field. Signed-off-by: Yuri Benditovich <[email protected]>
https://issues.redhat.com/browse/RHEL-68725 virtio-win#1197 In such case we do not have any other option than request to unload the driver. This can happen in 2 flows: power up (during fast startup) or reset, both with driver verifier that simulates low resources. In reset flow we need to request driver unload explicitly. Power up flow works in SET_POWER, so it will do it automatically. Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
Read-write lock is created with MiniportContext=NULL because this happens in the constructor when this field in adapter context is not populated yet. Pass miniport context as parameter to the constructor of adapter object and propagate it to the RSSParameters member. Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
https://issues.redhat.com/browse/RHEL-68725 Simplify failure flow, remove redundant things from it and ensure the pContext is always deleted. It's destructor does complete cleanup, including interrupt deregistration. This fixes BSOD under driver verifier with low resource simulation NDIS_BUGCHECK_INIT_FAILED_WITHOUT_INTERRUPT_DEREGISTER. Signed-off-by: Yuri Benditovich <[email protected]>
Under driver verifier with low resources simulation the attempt to access NIC configuration may fail, important fields of the context are not initialized correctly causing driver verifier BSOD on attempt to allocate zero bytes from memory. Fail initialization if the NIC configuration is not accessible. Signed-off-by: Yuri Benditovich <[email protected]>
Signed-off-by: Yuri Benditovich <[email protected]>
YanVugenfirer
changed the title
netkvm: Several fixes to prevent problems under driver verifier
RHEL-68725: netkvm: Several fixes to prevent problems under driver verifier
Dec 1, 2024
YanVugenfirer
approved these changes
Dec 1, 2024
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.
Approved. But I suggest to change commit messages to comply with Jira automation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.