Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User Mode Scheduler (UMS) returns ERROR_NOT_SUPPORTED

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.

like image 674
AlienRancher Avatar asked Dec 10 '25 00:12

AlienRancher


1 Answers

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

like image 154
rfenelus Avatar answered Dec 13 '25 12:12

rfenelus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!