Bug with heap ?
This commit is contained in:
parent
38c0f14332
commit
c6efa5c9a4
|
@ -124,27 +124,27 @@ void MmInitPaging(void)
|
|||
if ((ulong)curAddrPT == (ulong)BtLoaderInfo.stackEndAddr) {
|
||||
MmPT[index] = (ulong)curAddrPT | PRESENT;
|
||||
MmStackGuards[0] = (ulong)curAddrPT;
|
||||
//DebugLog("\tStack Guard at %p\n", curAddrPT);
|
||||
DebugLog("\tStack Guard at %p\n", curAddrPT);
|
||||
}
|
||||
else if ((ulong)curAddrPT == (ulong)BtLoaderInfo.kernelEndAddr) {
|
||||
MmPT[index] = (ulong)curAddrPT | PRESENT;
|
||||
MmStackGuards[1] = (ulong)curAddrPT;
|
||||
//DebugLog("\tStack Guard at %p\n", curAddrPT);
|
||||
DebugLog("\tStack Guard at %p\n", curAddrPT);
|
||||
}
|
||||
// SECTION .TEXT PROTECTION
|
||||
else if ((ulong)curAddrPT >= (ulong)&_text && (ulong)curAddrPT <= (ulong)&_text_end) {
|
||||
MmPT[index] = (ulong)curAddrPT | PRESENT;
|
||||
//DebugLog("\tSection .text at %p\n", curAddrPT);
|
||||
DebugLog("\tSection .text at %p\n", curAddrPT);
|
||||
}
|
||||
// SECTION .DATA PROTECTION
|
||||
else if ((ulong)curAddrPT >= (ulong)&_data && (ulong)curAddrPT <= (ulong)&_data_end) {
|
||||
MmPT[index] = (ulong)curAddrPT | PRESENT | WRITETHR | READWRITE | NX;
|
||||
//DebugLog("\tSection .data at %p\n", curAddrPT);
|
||||
DebugLog("\tSection .data at %p\n", curAddrPT);
|
||||
}
|
||||
// SECTION .RODATA PROTECTION
|
||||
else if ((ulong)curAddrPT >= (ulong)&_rodata && (ulong)curAddrPT <= (ulong)&_rodata_end) {
|
||||
MmPT[index] = (ulong)curAddrPT | PRESENT | WRITETHR | NX;
|
||||
//DebugLog("\tSection .rodata at %p\n", curAddrPT);
|
||||
DebugLog("\tSection .rodata at %p\n", curAddrPT);
|
||||
}
|
||||
// While we're inside the kernel pages
|
||||
else if ((ulong)curAddrPT <= lastKernelAddr) {
|
||||
|
|
Loading…
Reference in New Issue