User Mode Scheduler (UMS) returns ERROR_NOT_SUPPORTED

岁酱吖の 提交于 2019-12-24 00:24:16

问题


I want to use the Windows User-Mode Scheduler API but every sample C or C++ I have found in the internet fails. Invariably I get ERROR_NOT_SUPPORTED.

My Computer is running Windows 10 Pro 64-bits in an x64 processor. I am using VS2015 and the application is an x64 console application.

Notably not every call fails, in the 4 samples I've tested either

  1. EnterUmsSchedulingMode
  2. CreateRemoteThreadEx

Fail with ERROR_NOT_SUPPORTED. Those are necessary to get things going, but for example CreateUmsCompletionList or GetUmsCompletionListEvent do not.

The API is not trivial to use but I am having a hard time believing all of them are wrong.

I've debugged a bit what happens inside EnterUmsSchedulingMode and it seems that things go wrong when calling NtSetInformationThread inside RtlpAttachThreadToUmsCompletionList although of this I am less sure.

Here is one and here is another of the samples I've tried.


回答1:


If you're on a pre-Ivy Bridge processor UMS will fail to work due to a potential security problem where an LDT is created on x64. The problem can be avoided with Ivy Bridge and a Windows 10 (and ostensibly Server 2016) update simply disables the UMS feature if the processor doesn't have access to the Ivy Bridge feature.

More info here: http://www.alex-ionescu.com/?p=340



来源:https://stackoverflow.com/questions/34913794/user-mode-scheduler-ums-returns-error-not-supported

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!