microsoft / microsoft/usersim

cxplat_kernel when running against usersim does the wrong thing in cxplat_get_current_processor_number

Open
#222 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
105
Forks
34
Avg merge
3d 39m
Merged PRs (30d)
5

Description

The issue is that cxplat_get_current_processor_number calls KeGetCurrentProcessorIndex, which is an inline function that expands to:

return __readgsdword(0x1a4);

Which doesn't work when running in user mode.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at cxplat_get_current_processor_number and inspect how usersim represents the current processor when running in user mode. Determine an appropriate user-mode path instead of the KeGetCurrentProcessorIndex expansion, then verify that the function returns the correct processor number under usersim; no file or test path is named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.