Re: [KMDF] Removing FDO and let PDO running



> that or somebody in the stack other then acpi is reporting
> PNP_DEVICE_NOT_DISABLEABLE

You're right, here's what my stack looks like with !devnode (also, the stack contains 2 devices.)

# The system timer PDO :

DevNode 0x86add9f0 for PDO 0000000000
(...)
Flags (0000000000)
CapabilityFlags (0xe9766544) LockSupported, UniqueID,
RawDeviceOK, WakeFromD0,
WakeFromD3, HardwareDisabled,
NoDisplayInUI
Unknown flags 0xe9740000

# My FDO :

DevNode 0x86adb1c8 for PDO 0x86add9f0
(...)
Flags (0x000000f0) DNF_ENUMERATED, DNF_IDS_QUERIED,
DNF_HAS_BOOT_CONFIG, DNF_BOOT_CONFIG_RESERVED
UserFlags (0x00000008) ***DNUF_NOT_DISABLEABLE***
CapabilityFlags (0x00000080) SilentInstall
DisableableDepends = 1 (including self)

So it appears I unintentionally set a PNP_DEVICE_NOT_DISABLEABLE user flag somehow. I am not touching any flag of capability directly in my code. How can I unset this flag safely ?

if you have one reference and no handles, you leaked a reference somewhere with ObReferenceObject.

Isn't that reference the one for my running FDO ?? If it was zero, the stack would unload without disabling right ?
.



Relevant Pages

  • Re: [ubuntu-hardened] Re: Collecting NX information
    ... >>everything PaX wants ... define exactly what the flags should do. ... Stack and heap default to +X ... kernel randomizes anything that can be randomized in the address ...
    (Linux-Kernel)
  • Re: Multiple Undo Program / Command Logger
    ... HALT errors if suspending isn't OK, ... it then halts (which creates a brand new "Last Stack") ... you can have a different BetaENTER program ... The following resets flags and modes after any operation, ...
    (comp.sys.hp48)
  • [Patch] no exec: sync x86_64 behaviour with i386
    ... Control non executable mappings for 64bit processes. ... -per executable using ELF header flags ... Stack is non executable, heap/data is. ...
    (Linux-Kernel)
  • Re: CPU design
    ... Simpler solution - have the microcode FSM push the flags to the stack. ... re-entrant, so a faster context switch is to re-map the Registers, Flags (and even PC? ...
    (comp.arch.fpga)