microsoft / microsoft/wdkmetadata

IRQL and maybe other platform-dependent constants mismatch

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

Nobody has claimed this yet.

Dominant language
C++
Stars
110
Forks
15
PR merge metrics
No merged PRs in 30d

Description

In C++ WDK, we have different definitions of IRQL constants for different platforms (_X86_, _AMD64_, _ARM_, _ARM64_). But in windows-rs we have consts from the _X86_ target for all platforms:

// wdm.h:
#if defined(_X86_) 
...
#define HIGH_LEVEL 31               // Highest interrupt level
...
#endif 
#if defined(_AMD64_)
...
#define HIGH_LEVEL 15                   // Highest interrupt level
...
#endif

But got:

// sys::src::Windows::Wdk::System::SystemServices::mod.rs
pub const HIGH_LEVEL: u32 = 31u32; // Must be 15 for x86_64, arm and arm64 targets

And it's a critical issue as we have to re-check all constants now to ensure they're correct...

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 with sys::src::Windows::Wdk::System::SystemServices::mod.rs and compare its platform-independent constants with the corresponding platform-specific definitions in the WDK wdm.h. Audit the other generated constants for the same mismatch, then verify that values such as HIGH_LEVEL match x86, x86_64, ARM, and ARM64 targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, rust
Domain
operating-systems, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.