예제 #1
0
        public static bool InterruptsDisabled()
        {
            if ((ProcessPrivileges.GetCurrentPrivileges().AllowedOperations &
                 ProcessPrivileges.Operations.DisableInterrupts) != 0)
            {
                return(Processor.InterruptsDisabled());
            }

            //  ISSUE: Assert here until all instances get cleaned up from SIPs
            //  This assertion should be removed / replaced with something that would
            //  flag / halt / break only the bogus SIP, not the entire system

            VTable.Assert(false, "InterruptsDisabled called from unprivileged SIP");

            return(false);
        }
예제 #2
0
        public static void RestoreInterrupts(bool enabled)
        {
            if ((ProcessPrivileges.GetCurrentPrivileges().AllowedOperations &
                 ProcessPrivileges.Operations.DisableInterrupts) != 0)
            {
                Processor.RestoreInterrupts(enabled);
            }
            else
            {
                //  ISSUE: Assert here until all instances get cleaned up from SIPs
                //  This assertion should be removed / replaced with something that would
                //  flag / halt / break only the bogus SIP, not the entire system

                VTable.Assert(false, "RestoreInterrupts called from unprivileged SIP");
            }
        }
예제 #3
0
 public static extern IntPtr OpenProcess(ProcessPrivileges dwDesiredAccess, bool bInheritHandle, int dwProcessId);