Skip to content
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

KeSetSystemGroupAffinityThread does not match kernel behavior #187

Merged
merged 7 commits into from
Apr 24, 2024

Conversation

Alan-Jowett
Copy link
Member

This pull request includes a change to the KeSetSystemAffinityThreadEx(KAFFINITY affinity) function in the src/ke.cpp file. The change modifies the error handling mechanism. Instead of triggering a bug check when an error occurs, the function now returns 0.

In detail:

  • src/ke.cpp: Modified the KeSetSystemAffinityThreadEx(KAFFINITY affinity) function to return 0 instead of triggering a bug check when SetThreadAffinityMask(GetCurrentThread(), affinity) returns an error.

Alan Jowett added 2 commits April 20, 2024 12:24
Signed-off-by: Alan Jowett <[email protected]>
Signed-off-by: Alan Jowett <[email protected]>
@Alan-Jowett
Copy link
Member Author

@mtfriesen Can I get this reviewed? It's blocking fuzz testing.

@@ -224,11 +224,17 @@ KeSetSystemAffinityThreadEx(KAFFINITY affinity)
{
GROUP_AFFINITY old_affinity;
usersim_get_current_thread_group_affinity(&old_affinity);
// Reject affinities that are not valid for the current group.
// Assume that the affinity mask is contiguous.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, I believe the affinity mask is guaranteed to be contiguous.

@Alan-Jowett Alan-Jowett merged commit 646469a into microsoft:main Apr 24, 2024
5 checks passed
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