mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 23:45:42 +00:00
[NTOS:KE] Add IRQL checks and fix KiInitiateUserApc
This commit is contained in:
parent
3d18831c19
commit
90a0e426ed
2 changed files with 50 additions and 0 deletions
|
@ -116,6 +116,14 @@ MACRO(EnterTrap, Flags)
|
|||
mov es, ax
|
||||
swapgs
|
||||
|
||||
#if DBG
|
||||
/* Check IRQL */
|
||||
mov rax, cr8
|
||||
test rax, rax
|
||||
jz kernel_mode_entry
|
||||
int HEX(2c)
|
||||
#endif
|
||||
|
||||
kernel_mode_entry:
|
||||
|
||||
// if (Flags AND TF_IRQL)
|
||||
|
@ -151,6 +159,7 @@ MACRO(ExitTrap, Flags)
|
|||
LOCAL kernel_mode_return
|
||||
LOCAL IntsEnabled
|
||||
LOCAL NoUserApc
|
||||
LOCAL IrqlPassive
|
||||
|
||||
#if DBG
|
||||
/* Check previous irql */
|
||||
|
@ -201,6 +210,14 @@ MACRO(ExitTrap, Flags)
|
|||
jnz IntsEnabled
|
||||
int HEX(2c)
|
||||
IntsEnabled:
|
||||
|
||||
/* Make sure we are at passive level */
|
||||
mov rax, cr8
|
||||
test rax, rax
|
||||
jz IrqlPassive
|
||||
int HEX(2C)
|
||||
|
||||
IrqlPassive:
|
||||
#endif
|
||||
|
||||
cli
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue