【问题标题】:GFlags Stop on hung GUIGFlags 在挂起的 GUI 上停止
【发布时间】:2014-05-20 09:09:17
【问题描述】:

今天我想知道为什么 GFlags 选项 Stop on hang GUI 会出现在 GFlags 用户界面的 Kernel Flags 选项卡中。内核是否有可能挂起的 GUI?

所以我试图从微软那里得到一些信息,但是MSDN just says

GFlags 中出现停止挂起 GUI 标志,但它对 Windows 没有影响。

所以我想知道更多:具有 GUI 但不是 Windows 内核的内核的内核标志?

虽然看起来没有实际用处,但谁能解释一下?

我还尝试从 WinDbg .hh !gflag 获取更多信息,但它甚至没有声明这在 Windows 上不起作用。

【问题讨论】:

    标签: windbg windows-kernel gflags


    【解决方案1】:

    Kernel flag表示flag立即生效without requiring a reboot

    Registry flag requires a reboot 使标志生效

    内核没有任何可能挂起的 gui。

    windows这个词不是指内核,而是正在运行的应用程序的gui窗口

    检查你的操作系统中的 NtSetSystemInformation 以了解为什么 0x8 不生效

    这个 api 中基本上有一些硬编码的幻数,用于测试 GlobalFlag 更改的每个请求并允许或禁止它们 在 xp-sp3 中这个魔法值是 0B2319BF0 所以任何小于 0x10 的标志都将被禁止 并且在挂起的 gui 上停止是 0x8,因此它无效,您不能从注册表选项卡中设置它

    实际上无法设置此标志

    nt!NtSetSystemInformation+0x193:
    80606009 8b03            mov     eax,dword ptr [ebx]  ds:0023:001285f8=00000008  <---- +shg
    8060600b 25f09b31b2      and     eax,0B2319BF0h  < magic value in nt 
    80606010 8945a0          mov     dword ptr [ebp-60h],eax ss:0010:fb569cf0=00000000
    80606013 8b0d6c125580    mov     ecx,dword ptr [nt!NtGlobalFlag (8055126c)] ds:0023:8055126c=00000000
    80606019 81e10f64ce4d    and     ecx,4DCE640Fh  <--another magic value  both these magic values orred together 
    will be 0xffffffff covers the whole range of flags 
    8060601f 0bc1            or      eax,ecx
    80606021 8945a0          mov     dword ptr [ebp-60h],eax ss:0010:fb569cf0=00000000
    80606024 a36c125580      mov     dword ptr [nt!NtGlobalFlag (8055126c)],eax ds:0023:8055126c=00000000 
    

    【讨论】:

      猜你喜欢
      • 2020-11-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-08-31
      • 1970-01-01
      • 1970-01-01
      • 2020-04-16
      • 1970-01-01
      相关资源
      最近更新 更多