Ejemplo n.º 1
0
        private static unsafe void SetInitialExecutionProtection()
        {
            if (KConfig.UseExecutionProtection)
            {
                var code    = BootInfo.GetMap(BootInfoMemoryType.KernelTextSegment);
                var codeReg = new LinkedMemoryRegion(new MemoryRegion(code->Start, code->Size));

                PageTable.KernelTable.SetExecutionProtectionForAllInitialPages(&codeReg);
            }
        }
Ejemplo n.º 2
0
        private static unsafe void SetInitialExecutionProtection()
        {
            if (KConfig.UseExecutionProtection)
            {
                var code    = BootInfo.GetMap(BootInfoMemoryType.KernelTextSegment);
                var codeReg = new LinkedMemoryRegion(new MemoryRegion(code->Start, code->Size));
                //var otherReg = new LinkedMemoryRegion(new MemoryRegion(0, 10124 * 1024 * 60), &codeReg);
                //var otherReg = new LinkedMemoryRegion(new MemoryRegion(0, 10124 * 1024 * 60), &codeReg);

                PageTable.KernelTable.SetExecutionProtectionForAllInitialPages(&codeReg);
                //InitialKernelProtect_MakeExecutable_ByMapType(BootInfoMemoryType.KernelTextSegment);
            }
        }