Site icon EfmSoft

What does macOS kernel return 51 (KERN_POLICY_STATIC) mean?

 
Could be also:
ConstantTypeOS
ERROR_REM_NOT_LISTWin32 errorWindows
ippStsFeaturesCombinationIntel Ipp StatusAny
EL2HLTerrnoLinux
ENETUNREACHerrnoMac
EBADRerrnoSolaris
UNEXPECTED_INITIALIZATION_CALLBugCheck CodeWindows
Previous Next
KERN_CODESIGN_ERROR KERN_INSUFFICIENT_BUFFER_SIZE

KERN_POLICY_STATIC

A policy change that the target thread does not accept

KERN_POLICY_STATIC means that the requested property cannot be changed at that point. For Mach thread-policy operations, this is different from a malformed request and different from a normal authorization failure: the target thread has static policy parameters, so the scheduler does not apply the requested change through that path.

Current XNU checks the thread’s static_param state before applying policy changes. Both the kernel implementation of thread_policy_set and the legacy absolute-priority path can return KERN_POLICY_STATIC for such a thread.

Why an application may not see code 51 directly

The public libsyscall wrappers for thread_policy_set, thread_policy, and thread_set_policy explicitly convert KERN_POLICY_STATIC to KERN_SUCCESS after the underlying kernel RPC. Therefore a raw Mach result, an internal trace, or a lower-level client can expose this code even when a caller using the public wrapper only observes success.

For diagnosis, treat a wrapper-level success as insufficient proof that a legacy policy change became effective. Inspect the policy actually in force on the target thread and the exact interface that produced the status.

What to check

References


Looking for a different code? Search another status or error code.

Exit mobile version