Pcornel
Windows · Windows Fundamentals

Kernel Mode

Cheat sheet · https://pcornel.dk/topic.php?topic=2929

Back to the Topic

Answer

Kernel mode is Windows’ privileged execution mode. Core NT operating-system components and many device/filesystem/filter drivers execute there with access to kernel address space and privileged processor operations, so defects can affect the entire system rather than a single process.

Remember

  • Kernel-mode code is highly privileged and shares protected kernel resources.
  • A kernel-mode fault can trigger a bugcheck to prevent continued corruption.
  • Not every driver is kernel mode; Windows also supports user-mode driver frameworks.
  • A kernel-mode stack proves privileged execution occurred, not which module originally caused bad state.
  • User identity/elevation and CPU execution mode are separate concepts.

First checks

  • driverquery /v /fo csv — drivers with state and path
  • Get-WinEvent -FilterHashtable @{LogName='System';Id=41,1001} — bugchecks
  • Get-PnpDevice -PresentOnly | ? Status -ne 'OK' — devices with problems
  • verifier /query — Driver Verifier status

Verify in this order

driver loaded in kernel mode → handles hardware/I/O → error → bugcheck or device problem logged

Where it usually breaks

First mismatch in target identity/version → persistent configuration/source of truth → provider/service/control plane → runtime/effective state → user/workload-visible result → event/log evidence; preserve identity/native error/pre-state before mutation.

Kernel-mode evidence boundaries

ObservationProvesDoes not prove
Bugcheck occurredWindows stopped after a fatal kernel conditionroot-cause module by itself
Driver on stackdriver participated in captured pathdriver created the bad state
WHEA hardware eventhardware/firmware reported an error classwhich replaceable component is certainly bad
Kernel CPU/DPC time highprivileged work consumed CPUexact driver/function without deeper sampling

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2929

Confirmation

Confirm action

Continue?