[ros-diffs] [weiden] 24397: - Fix binary search algorithm in LdrGetProcedureAddress - Fix temporary ntdll export hack (r24395)

weiden at svn.reactos.org weiden at svn.reactos.org
Wed Oct 4 18:51:51 CEST 2006


Author: weiden
Date: Wed Oct  4 20:51:51 2006
New Revision: 24397

URL: http://svn.reactos.org/svn/reactos?rev=24397&view=rev
Log:
- Fix binary search algorithm in LdrGetProcedureAddress
- Fix temporary ntdll export hack (r24395)

Modified:
    trunk/reactos/dll/ntdll/def/ntdll.def
    trunk/reactos/dll/ntdll/main/i386/dispatch.S
    trunk/reactos/ntoskrnl/ldr/rtl.c
    trunk/reactos/ntoskrnl/ps/psmgr.c

Modified: trunk/reactos/dll/ntdll/def/ntdll.def
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.def?rev=24397&r1=24396&r2=24397&view=diff
==============================================================================
--- trunk/reactos/dll/ntdll/def/ntdll.def (original)
+++ trunk/reactos/dll/ntdll/def/ntdll.def Wed Oct  4 20:51:51 2006
@@ -38,7 +38,7 @@
 KiUserCallbackDispatcher at 12
 KiUserExceptionDispatcher at 8
 KiIntSystemCall at 0
-KeFastSystemCallRet at 0 ; big hack since LdrGetProcedureAddress is broken
+KiFastSystemCallRet at 0
 KiFastSystemCall at 0
 LdrAccessResource at 16
 LdrAddRefDll at 8

Modified: trunk/reactos/dll/ntdll/main/i386/dispatch.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/main/i386/dispatch.S?rev=24397&r1=24396&r2=24397&view=diff
==============================================================================
--- trunk/reactos/dll/ntdll/main/i386/dispatch.S (original)
+++ trunk/reactos/dll/ntdll/main/i386/dispatch.S Wed Oct  4 20:51:51 2006
@@ -257,9 +257,9 @@
     sysenter
 .endfunc
 
-.func KeFastSystemCallRet at 0
-.globl _KeFastSystemCallRet at 0
-_KeFastSystemCallRet at 0:
+.func KiFastSystemCallRet at 0
+.globl _KiFastSystemCallRet at 0
+_KiFastSystemCallRet at 0:
 
     /* Just return to caller */
     ret

Modified: trunk/reactos/ntoskrnl/ldr/rtl.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ldr/rtl.c?rev=24397&r1=24396&r2=24397&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ldr/rtl.c (original)
+++ trunk/reactos/ntoskrnl/ldr/rtl.c Wed Oct  4 20:51:51 2006
@@ -69,22 +69,15 @@
       {
          mid = (minn + maxn) / 2;
          CurrentNamePtr = (PCHAR)RVA(BaseAddress, NamePtr[mid]);
-         res = strncmp(CurrentNamePtr, Name->Buffer, Name->Length);
+         res = strcmp(CurrentNamePtr, Name->Buffer);
          if (res == 0)
          {
             /*
              * Check if the beginning of the name matched, but it's still
              * not the whole name.
              */
-            if (CurrentNamePtr[Name->Length] != 0)
-            {
-               res = -1;
-            }
-            else
-            {
-               *ProcedureAddress = (PVOID)RVA(BaseAddress, AddressPtr[OrdinalPtr[mid]]);
-               return STATUS_SUCCESS;
-            }
+             *ProcedureAddress = (PVOID)RVA(BaseAddress, AddressPtr[OrdinalPtr[mid]]);
+             return STATUS_SUCCESS;
          }
          if (res > 0)
             maxn = mid - 1;

Modified: trunk/reactos/ntoskrnl/ps/psmgr.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/psmgr.c?rev=24397&r1=24396&r2=24397&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ps/psmgr.c (original)
+++ trunk/reactos/ntoskrnl/ps/psmgr.c Wed Oct  4 20:51:51 2006
@@ -42,7 +42,7 @@
 ANSI_STRING CallbackName = RTL_CONSTANT_STRING("KiUserCallbackDispatcher");
 ANSI_STRING RaiseName = RTL_CONSTANT_STRING("KiRaiseUserExceptionDispatcher");
 ANSI_STRING FastName = RTL_CONSTANT_STRING("KiFastSystemCall");
-ANSI_STRING FastReturnName = RTL_CONSTANT_STRING("KeFastSystemCallRet");
+ANSI_STRING FastReturnName = RTL_CONSTANT_STRING("KiFastSystemCallRet");
 ANSI_STRING InterruptName = RTL_CONSTANT_STRING("KiIntSystemCall");
 
 PHANDLE_TABLE PspCidTable;




More information about the Ros-diffs mailing list