ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2006
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
23 participants
586 discussions
Start a n
N
ew thread
[weiden] 20873: RegDisablePredefinedCacheEx() should also disable the cache for HKU
by weiden@svn.reactos.org
RegDisablePredefinedCacheEx() should also disable the cache for HKU Modified: trunk/reactos/lib/advapi32/reg/reg.c _____ Modified: trunk/reactos/lib/advapi32/reg/reg.c --- trunk/reactos/lib/advapi32/reg/reg.c 2006-01-14 23:37:56 UTC (rev 20872) +++ trunk/reactos/lib/advapi32/reg/reg.c 2006-01-14 23:54:05 UTC (rev 20873) @@ -325,6 +325,7 @@ { RtlEnterCriticalSection (&HandleTableCS); DefaultHandlesDisabled = TRUE; + DefaultHandleHKUDisabled = TRUE; RtlLeaveCriticalSection (&HandleTableCS); return ERROR_SUCCESS; }
18 years, 11 months
1
0
0
0
[weiden] 20872: fixed a buffer overflow when the referenced domain length is 0
by weiden@svn.reactos.org
fixed a buffer overflow when the referenced domain length is 0 Modified: trunk/reactos/subsys/system/cacls/cacls.c _____ Modified: trunk/reactos/subsys/system/cacls/cacls.c --- trunk/reactos/subsys/system/cacls/cacls.c 2006-01-14 23:35:20 UTC (rev 20871) +++ trunk/reactos/subsys/system/cacls/cacls.c 2006-01-14 23:37:56 UTC (rev 20872) @@ -248,7 +248,7 @@ &DomainSize, &Use)) { - if (GetLastError() == ERROR_NONE_MAPPED) + if (GetLastError() == ERROR_NONE_MAPPED || NameSize == 0) { goto BuildSidString; } @@ -271,7 +271,9 @@ } Domain = Name + NameSize; - Name[0] = Domain[0] = _T('\0'); + Name[0] = _T('\0'); + if (DomainSize != 0) + Domain[0] = _T('\0'); if (!LookupAccountSid(NULL, Sid, Name,
18 years, 11 months
1
0
0
0
[npwoods] 20871: Freeloader: Check return code of RegOpenKey() in FrLdrLoadBootDrivers() for failure
by npwoods@svn.reactos.org
Freeloader: Check return code of RegOpenKey() in FrLdrLoadBootDrivers() for failure Another one... Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c _____ Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c 2006-01-14 23:17:26 UTC (rev 20870) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c 2006-01-14 23:35:20 UTC (rev 20871) @@ -499,53 +499,55 @@ /* open driver Key */ rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); + if (rc == ERROR_SUCCESS) + { + /* Read the Start Value */ + ValueSize = sizeof(ULONG); + rc = RegQueryValue(hDriverKey, L"Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); + if (rc != ERROR_SUCCESS) StartValue = (ULONG)-1; + DbgPrint((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); - /* Read the Start Value */ - ValueSize = sizeof(ULONG); - rc = RegQueryValue(hDriverKey, L"Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); - if (rc != ERROR_SUCCESS) StartValue = (ULONG)-1; - DbgPrint((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); + /* Read the Tag */ + ValueSize = sizeof(ULONG); + rc = RegQueryValue(hDriverKey, L"Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); + if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; + DbgPrint((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); - /* Read the Tag */ - ValueSize = sizeof(ULONG); - rc = RegQueryValue(hDriverKey, L"Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); - if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; - DbgPrint((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); + /* Read the driver's group */ + DriverGroupSize = sizeof(DriverGroup); + rc = RegQueryValue(hDriverKey, L"Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); + DbgPrint((DPRINT_REACTOS, " Group: '%S' \n", DriverGroup)); - /* Read the driver's group */ - DriverGroupSize = sizeof(DriverGroup); - rc = RegQueryValue(hDriverKey, L"Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); - DbgPrint((DPRINT_REACTOS, " Group: '%S' \n", DriverGroup)); + for (TagIndex = 1; TagIndex <= OrderList[0]; TagIndex++) { + if (TagValue == OrderList[TagIndex]) break; + } - for (TagIndex = 1; TagIndex <= OrderList[0]; TagIndex++) { - if (TagValue == OrderList[TagIndex]) break; - } + if ((StartValue == 0) && + (TagIndex > OrderList[0]) && + (_wcsicmp(DriverGroup, GroupName) == 0)) { - if ((StartValue == 0) && - (TagIndex > OrderList[0]) && - (_wcsicmp(DriverGroup, GroupName) == 0)) { + ValueSize = sizeof(TempImagePath); + rc = RegQueryValue(hDriverKey, L"ImagePath", NULL, (PUCHAR)TempImagePath, &ValueSize); + if (rc != ERROR_SUCCESS) { + DbgPrint((DPRINT_REACTOS, " ImagePath: not found\n")); + sprintf(ImagePath, "%ssystem32\\drivers\\%S.sys", szSystemRoot, ServiceName); + } else if (TempImagePath[0] != L'\\') { + sprintf(ImagePath, "%s%S", szSystemRoot, TempImagePath); + } else { + sprintf(ImagePath, "%S", TempImagePath); + DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); + } + DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath)); - ValueSize = sizeof(TempImagePath); - rc = RegQueryValue(hDriverKey, L"ImagePath", NULL, (PUCHAR)TempImagePath, &ValueSize); - if (rc != ERROR_SUCCESS) { - DbgPrint((DPRINT_REACTOS, " ImagePath: not found\n")); - sprintf(ImagePath, "%ssystem32\\drivers\\%S.sys", szSystemRoot, ServiceName); - } else if (TempImagePath[0] != L'\\') { - sprintf(ImagePath, "%s%S", szSystemRoot, TempImagePath); - } else { - sprintf(ImagePath, "%S", TempImagePath); - DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); - } - DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath)); + if (nPos < 100) nPos += 5; - if (nPos < 100) nPos += 5; + FrLdrLoadDriver(ImagePath, nPos); - FrLdrLoadDriver(ImagePath, nPos); + } else { - } else { - - DbgPrint((DPRINT_REACTOS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current group '%S')\n", - ServiceName, StartValue, TagValue, DriverGroup, GroupName)); + DbgPrint((DPRINT_REACTOS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current group '%S')\n", + ServiceName, StartValue, TagValue, DriverGroup, GroupName)); + } } Index++;
18 years, 11 months
1
0
0
0
[weiden] 20870: - implemented RegDisablePredefinedCache()
by weiden@svn.reactos.org
- implemented RegDisablePredefinedCache() - added stubs for RegEnableReflectionKey(), RegDisableReflectionKey() and RegQueryReflectionKey() Modified: trunk/reactos/lib/advapi32/advapi32.def Modified: trunk/reactos/lib/advapi32/reg/reg.c Modified: trunk/reactos/w32api/include/winreg.h _____ Modified: trunk/reactos/lib/advapi32/advapi32.def --- trunk/reactos/lib/advapi32/advapi32.def 2006-01-14 22:47:35 UTC (rev 20869) +++ trunk/reactos/lib/advapi32/advapi32.def 2006-01-14 23:17:26 UTC (rev 20870) @@ -482,8 +482,10 @@ RegDeleteTreeW@8 RegDeleteValueA@8 RegDeleteValueW@8 -;RegDisablePredefinedCache +RegDisablePredefinedCache@0 RegDisablePredefinedCacheEx@0 +RegDisableReflectionKey@4 +RegEnableReflectionKey@4 RegEnumKeyA@16 RegEnumKeyExA@32 RegEnumKeyExW@32 @@ -508,6 +510,7 @@ RegQueryInfoKeyW@48 RegQueryMultipleValuesA@20 RegQueryMultipleValuesW@20 +RegQueryReflectionKey@8 RegQueryValueA@16 RegQueryValueExA@24 RegQueryValueExW@24 _____ Modified: trunk/reactos/lib/advapi32/reg/reg.c --- trunk/reactos/lib/advapi32/reg/reg.c 2006-01-14 22:47:35 UTC (rev 20869) +++ trunk/reactos/lib/advapi32/reg/reg.c 2006-01-14 23:17:26 UTC (rev 20870) @@ -30,6 +30,7 @@ static HANDLE DefaultHandleTable[MAX_DEFAULT_HANDLES]; static HANDLE ProcessHeap; static BOOLEAN DefaultHandlesDisabled = FALSE; +static BOOLEAN DefaultHandleHKUDisabled = FALSE; /* PROTOTYPES ***************************************************************/ @@ -143,7 +144,7 @@ { PHANDLE Handle; ULONG Index; - BOOLEAN DoOpen; + BOOLEAN DoOpen, DefDisabled; NTSTATUS Status = STATUS_SUCCESS; TRACE("MapDefaultKey (Key %x)\n", Key); @@ -162,8 +163,13 @@ } RtlEnterCriticalSection (&HandleTableCS); - - if (!DefaultHandlesDisabled) + + if (Key == HKEY_CURRENT_USER) + DefDisabled = DefaultHandleHKUDisabled; + else + DefDisabled = DefaultHandlesDisabled; + + if (!DefDisabled) { Handle = &DefaultHandleTable[Index]; DoOpen = (*Handle == NULL); @@ -183,7 +189,7 @@ if (NT_SUCCESS(Status)) { - if (!DefaultHandlesDisabled) + if (!DefDisabled) *RealKey = *Handle; else *(PULONG_PTR)Handle |= 0x1; @@ -295,6 +301,21 @@ /*********************************************************************** * + * RegDisablePredefinedCache + * + * @implemented + */ +LONG WINAPI +RegDisablePredefinedCache(VOID) +{ + RtlEnterCriticalSection (&HandleTableCS); + DefaultHandleHKUDisabled = TRUE; + RtlLeaveCriticalSection (&HandleTableCS); + return ERROR_SUCCESS; +} + + +/********************************************************************** ** * RegDisablePredefinedCacheEx * * @implemented @@ -1634,6 +1655,32 @@ /*********************************************************************** * + * RegDisableReflectionKey + * + * @unimplemented + */ +LONG WINAPI +RegDisableReflectionKey(IN HKEY hBase) +{ + DPRINT1("RegDisableReflectionKey(0x%p) UNIMPLEMENTED!\n", hBase); + return ERROR_CALL_NOT_IMPLEMENTED; +} + + +/********************************************************************** ** + * RegEnableReflectionKey + * + * @unimplemented + */ +LONG WINAPI +RegEnableReflectionKey(IN HKEY hBase) +{ + DPRINT1("RegEnableReflectionKey(0x%p) UNIMPLEMENTED!\n", hBase); + return ERROR_CALL_NOT_IMPLEMENTED; +} + + +/********************************************************************** ** * RegSetKeyValueW * * @implemented @@ -3372,6 +3419,21 @@ /*********************************************************************** * + * RegQueryReflectionKey + * + * @unimplemented + */ +LONG WINAPI +RegQueryReflectionKey(IN HKEY hBase, + OUT BOOL* bIsReflectionDisabled) +{ + DPRINT1("RegQueryReflectionKey(0x%p, 0x%p) UNIMPLEMENTED!\n", + hBase, bIsReflectionDisabled); + return ERROR_CALL_NOT_IMPLEMENTED; +} + + +/********************************************************************** ** * RegQueryValueExW * * @implemented _____ Modified: trunk/reactos/w32api/include/winreg.h --- trunk/reactos/w32api/include/winreg.h 2006-01-14 22:47:35 UTC (rev 20869) +++ trunk/reactos/w32api/include/winreg.h 2006-01-14 23:17:26 UTC (rev 20870) @@ -78,8 +78,13 @@ #endif LONG WINAPI RegDeleteValueA(HKEY,LPCSTR); LONG WINAPI RegDeleteValueW(HKEY,LPCWSTR); +#if (_WIN32_WINNT >= 0x0500) +LONG WINAPI RegDisablePredefinedCache(VOID); +#endif #if (_WIN32_WINNT >= 0x0600) LONG WINAPI RegDisablePredefinedCacheEx(VOID); +LONG WINAPI RegDisableReflectionKey(HKEY); +LONG WINAPI RegEnableReflectionKey(HKEY); #endif LONG WINAPI RegEnumKeyA(HKEY,DWORD,LPSTR,DWORD); LONG WINAPI RegEnumKeyW(HKEY,DWORD,LPWSTR,DWORD); @@ -104,6 +109,9 @@ LONG WINAPI RegQueryInfoKeyW(HKEY,LPWSTR,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,PDWORD,P DWORD,PDWORD,PDWORD,PFILETIME); LONG WINAPI RegQueryMultipleValuesA(HKEY,PVALENTA,DWORD,LPSTR,LPDWORD); LONG WINAPI RegQueryMultipleValuesW(HKEY,PVALENTW,DWORD,LPWSTR,LPDWORD); +#if (_WIN32_WINNT >= 0x0600) +LONG WINAPI RegQueryReflectionKey(HKEY,BOOL*); +#endif LONG WINAPI RegQueryValueA(HKEY,LPCSTR,LPSTR,PLONG); LONG WINAPI RegQueryValueExA(HKEY,LPCSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD); LONG WINAPI RegQueryValueExW(HKEY,LPCWSTR,LPDWORD,LPDWORD,LPBYTE,LPDWORD);
18 years, 11 months
1
0
0
0
[weiden] 20869: add stubs for CancelIoEx() and CancelSynchronousIo()
by weiden@svn.reactos.org
add stubs for CancelIoEx() and CancelSynchronousIo() Modified: trunk/reactos/lib/kernel32/file/iocompl.c Modified: trunk/reactos/lib/kernel32/kernel32.def Modified: trunk/reactos/w32api/include/winbase.h _____ Modified: trunk/reactos/lib/kernel32/file/iocompl.c --- trunk/reactos/lib/kernel32/file/iocompl.c 2006-01-14 22:25:20 UTC (rev 20868) +++ trunk/reactos/lib/kernel32/file/iocompl.c 2006-01-14 22:47:35 UTC (rev 20869) @@ -187,4 +187,29 @@ return(TRUE); } + +/* + * @unimplemented + */ +BOOL +WINAPI +CancelIoEx(IN HANDLE hFile, + IN LPOVERLAPPED lpOverlapped) +{ + UNIMPLEMENTED; + return FALSE; +} + + +/* + * @unimplemented + */ +BOOL +WINAPI +CancelSynchronousIo(IN HANDLE hThread) +{ + UNIMPLEMENTED; + return FALSE; +} + /* EOF */ _____ Modified: trunk/reactos/lib/kernel32/kernel32.def --- trunk/reactos/lib/kernel32/kernel32.def 2006-01-14 22:25:20 UTC (rev 20868) +++ trunk/reactos/lib/kernel32/kernel32.def 2006-01-14 22:47:35 UTC (rev 20869) @@ -70,6 +70,8 @@ CallNamedPipeW@28 CancelDeviceWakeupRequest@4 CancelIo@4 +CancelIoEx@8 +CancelSynchronousIo@4 CancelTimerQueueTimer@8 CancelWaitableTimer@4 ChangeTimerQueueTimer@16 _____ Modified: trunk/reactos/w32api/include/winbase.h --- trunk/reactos/w32api/include/winbase.h 2006-01-14 22:25:20 UTC (rev 20868) +++ trunk/reactos/w32api/include/winbase.h 2006-01-14 22:47:35 UTC (rev 20869) @@ -1116,6 +1116,10 @@ BOOL WINAPI CallNamedPipeW(LPCWSTR,PVOID,DWORD,PVOID,DWORD,PDWORD,DWORD); BOOL WINAPI CancelDeviceWakeupRequest(HANDLE); BOOL WINAPI CancelIo(HANDLE); +#if (_WIN32_WINNT >= 0x0600) +BOOL WINAPI CancelIoEx(HANDLE,LPOVERLAPPED); +BOOL WINAPI CancelSynchronousIo(HANDLE); +#endif BOOL WINAPI CancelWaitableTimer(HANDLE); #if (_WIN32_WINNT >= 0x0501) BOOL WINAPI CheckNameLegalDOS8Dot3A(LPCSTR,LPSTR,DWORD,PBOOL,PBOOL);
18 years, 11 months
1
0
0
0
[weiden] 20868: added stubs for SetFileBandwidthReservation(), GetFileBandwidthReservation(), SetFileCompletionNotificationModes() and OpenFileById(). Thanks also to Alex
by weiden@svn.reactos.org
added stubs for SetFileBandwidthReservation(), GetFileBandwidthReservation(), SetFileCompletionNotificationModes() and OpenFileById(). Thanks also to Alex Modified: trunk/reactos/lib/kernel32/file/file.c Modified: trunk/reactos/lib/kernel32/kernel32.def Modified: trunk/reactos/w32api/include/winbase.h Modified: trunk/reactos/w32api/include/winnt.h _____ Modified: trunk/reactos/lib/kernel32/file/file.c --- trunk/reactos/lib/kernel32/file/file.c 2006-01-14 22:18:07 UTC (rev 20867) +++ trunk/reactos/lib/kernel32/file/file.c 2006-01-14 22:25:20 UTC (rev 20868) @@ -1679,8 +1679,85 @@ IN DWORD cchFilePath, IN DWORD dwFlags) { + if (dwFlags & ~(VOLUME_NAME_DOS | VOLUME_NAME_GUID | VOLUME_NAME_NT | + VOLUME_NAME_NONE | FILE_NAME_NORMALIZED | FILE_NAME_OPENED)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return 0; + } + UNIMPLEMENTED; return 0; } + +/* + * @unimplemented + */ +BOOL +WINAPI +SetFileBandwidthReservation(IN HANDLE hFile, + IN DWORD nPeriodMilliseconds, + IN DWORD nBytesPerPeriod, + IN BOOL bDiscardable, + OUT LPDWORD lpTransferSize, + OUT LPDWORD lpNumOutstandingRequests) +{ + UNIMPLEMENTED; + return FALSE; +} + + +/* + * @unimplemented + */ +BOOL +WINAPI +GetFileBandwidthReservation(IN HANDLE hFile, + OUT LPDWORD lpPeriodMilliseconds, + OUT LPDWORD lpBytesPerPeriod, + OUT LPBOOL pDiscardable, + OUT LPDWORD lpTransferSize, + OUT LPDWORD lpNumOutstandingRequests) +{ + UNIMPLEMENTED; + return FALSE; +} + + +/* + * @unimplemented + */ +BOOL +WINAPI +SetFileCompletionNotificationModes(IN HANDLE FileHandle, + IN UCHAR Flags) +{ + if (Flags & ~(FILE_SKIP_COMPLETION_PORT_ON_SUCCESS | FILE_SKIP_SET_EVENT_ON_HANDLE)) + { + SetLastError(ERROR_INVALID_PARAMETER); + return FALSE; + } + + UNIMPLEMENTED; + return FALSE; +} + + +/* + * @unimplemented + */ +HANDLE +WINAPI +OpenFileById(IN HANDLE hFile, + IN LPFILE_ID_DESCRIPTOR lpFileID, + IN DWORD dwDesiredAccess, + IN DWORD dwShareMode, + IN LPSECURITY_ATTRIBUTES lpSecurityAttributes OPTIONAL, + IN DWORD dwFlags) +{ + UNIMPLEMENTED; + return INVALID_HANDLE_VALUE; +} + /* EOF */ _____ Modified: trunk/reactos/lib/kernel32/kernel32.def --- trunk/reactos/lib/kernel32/kernel32.def 2006-01-14 22:18:07 UTC (rev 20867) +++ trunk/reactos/lib/kernel32/kernel32.def 2006-01-14 22:25:20 UTC (rev 20868) @@ -382,6 +382,7 @@ GetFileAttributesByHandle@12 GetFileAttributesExA@12 GetFileAttributesExW@12 +GetFileBandwidthReservation@24 GetFileInformationByHandle@8 GetFileSize@8 GetFileSizeEx@8 @@ -663,6 +664,7 @@ OpenEventA@12 OpenEventW@12 OpenFile@12 +OpenFileById@24 OpenFileMappingA@12 OpenFileMappingW@12 OpenJobObjectA@12 @@ -822,6 +824,8 @@ SetFileAttributesA@8 SetFileAttributesW@8 SetFileAttributesByHandle@12 +SetFileBandwidthReservation@24 +SetFileCompletionNotificationModes@8 SetFilePointer@16 SetFilePointerEx@20 SetFileShortNameA@8 _____ Modified: trunk/reactos/w32api/include/winbase.h --- trunk/reactos/w32api/include/winbase.h 2006-01-14 22:18:07 UTC (rev 20867) +++ trunk/reactos/w32api/include/winbase.h 2006-01-14 22:25:20 UTC (rev 20868) @@ -519,6 +519,14 @@ #define RESTART_CYCLICAL 0x1 #define RESTART_NOTIFY_SOLUTION 0x2 #define RESTART_NOTIFY_FAULT 0x4 +#define VOLUME_NAME_DOS 0x0 +#define VOLUME_NAME_GUID 0x1 +#define VOLUME_NAME_NT 0x2 +#define VOLUME_NAME_NONE 0x4 +#define FILE_NAME_NORMALIZED 0x0 +#define FILE_NAME_OPENED 0x8 +#define FILE_SKIP_COMPLETION_PORT_ON_SUCCESS 0x1 +#define FILE_SKIP_SET_EVENT_ON_HANDLE 0x2 #endif #if (_WIN32_WINNT >= 0x0500) #define GET_MODULE_HANDLE_EX_FLAG_PIN 0x1 @@ -808,6 +816,19 @@ DWORD dwStreamNameSize; WCHAR cStreamName[ANYSIZE_ARRAY]; } WIN32_STREAM_ID, *LPWIN32_STREAM_ID; +#if (_WIN32_WINNT >= 0x0600) +typedef enum _FILE_ID_TYPE { + FileIdType, + MaximumFileIdType +} FILE_ID_TYPE, *PFILE_ID_TYPE; +typedef struct _FILE_ID_DESCRIPTOR { + DWORD dwSize; + FILE_ID_TYPE Type; + _ANONYMOUS_UNION union { + LARGE_INTEGER FileID; + } DUMMYUNIONNAME; +} FILE_ID_DESCRIPTOR, *LPFILE_ID_DESCRIPTOR; +#endif typedef enum _FINDEX_INFO_LEVELS { FindExInfoStandard, FindExInfoMaxInfoLevel @@ -1374,6 +1395,9 @@ DWORD WINAPI GetFileAttributesW(LPCWSTR); BOOL WINAPI GetFileAttributesExA(LPCSTR,GET_FILEEX_INFO_LEVELS,PVOID); BOOL WINAPI GetFileAttributesExW(LPCWSTR,GET_FILEEX_INFO_LEVELS,PVOID); +#if (_WIN32_WINNT >= 0x0600) +BOOL WINAPI GetFileBandwidthReservation(HANDLE,LPDWORD,LPDWORD,LPBOOL,LPDWORD,LPDWOR D); +#endif BOOL WINAPI GetFileInformationByHandle(HANDLE,LPBY_HANDLE_FILE_INFORMATION); BOOL WINAPI GetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD, PDWORD); BOOL WINAPI GetFileSecurityW(LPCWSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR,DWORD ,PDWORD); @@ -1703,6 +1727,9 @@ HANDLE WINAPI OpenEventLogW(LPCWSTR,LPCWSTR); HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR); HFILE WINAPI OpenFile(LPCSTR,LPOFSTRUCT,UINT); +#if (_WIN32_WINNT >= 0x0600) +HANDLE WINAPI OpenFileById(HANDLE,LPFILE_ID_DESCRIPTOR,DWORD,DWORD,LPSECURITY_ATTRIBUT ES,DWORD); +#endif HANDLE WINAPI OpenFileMappingA(DWORD,BOOL,LPCSTR); HANDLE WINAPI OpenFileMappingW(DWORD,BOOL,LPCWSTR); HANDLE WINAPI OpenMutexA(DWORD,BOOL,LPCSTR); @@ -1814,6 +1841,10 @@ BOOL WINAPI SetFileAttributesByHandle(HANDLE,DWORD,DWORD); #endif BOOL WINAPI SetFileAttributesW(LPCWSTR,DWORD); +#if (_WIN32_WINNT >= 0x0600) +BOOL WINAPI SetFileBandwidthReservation(HANDLE,DWORD,DWORD,BOOL,LPDWORD,LPDWORD); +BOOL WINAPI SetFileCompletionNotificationModes(HANDLE,UCHAR); +#endif DWORD WINAPI SetFilePointer(HANDLE,LONG,PLONG,DWORD); BOOL WINAPI SetFilePointerEx(HANDLE,LARGE_INTEGER,PLARGE_INTEGER,DWORD); BOOL WINAPI SetFileSecurityA(LPCSTR,SECURITY_INFORMATION,PSECURITY_DESCRIPTOR); _____ Modified: trunk/reactos/w32api/include/winnt.h --- trunk/reactos/w32api/include/winnt.h 2006-01-14 22:18:07 UTC (rev 20867) +++ trunk/reactos/w32api/include/winnt.h 2006-01-14 22:25:20 UTC (rev 20868) @@ -2171,29 +2171,29 @@ PCONTEXT ContextRecord; } EXCEPTION_POINTERS,*PEXCEPTION_POINTERS,*LPEXCEPTION_POINTERS; typedef union _LARGE_INTEGER { - struct { - DWORD LowPart; - LONG HighPart; - } u; #if ! defined(NONAMELESSUNION) || defined(__cplusplus) _ANONYMOUS_STRUCT struct { DWORD LowPart; LONG HighPart; }; #endif /* NONAMELESSUNION */ + struct { + DWORD LowPart; + LONG HighPart; + } u; LONGLONG QuadPart; } LARGE_INTEGER, *PLARGE_INTEGER; typedef union _ULARGE_INTEGER { - struct { - DWORD LowPart; - DWORD HighPart; - } u; #if ! defined(NONAMELESSUNION) || defined(__cplusplus) _ANONYMOUS_STRUCT struct { DWORD LowPart; DWORD HighPart; }; #endif /* NONAMELESSUNION */ + struct { + DWORD LowPart; + DWORD HighPart; + } u; ULONGLONG QuadPart; } ULARGE_INTEGER, *PULARGE_INTEGER; typedef struct _LUID {
18 years, 11 months
1
0
0
0
[gvg] 20867: HTML-escape high characters
by gvg@svn.reactos.org
HTML-escape high characters Modified:
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
Added:
trunk/web/reactos.org/phpext/
Added:
trunk/web/reactos.org/phpext/config.m4
Added:
trunk/web/reactos.org/phpext/php_roscms.h
Added:
trunk/web/reactos.org/phpext/roscms.c
_____ Modified:
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
---
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
2006-01-14 21:57:07 UTC (rev 20866) +++
trunk/web/reactos.org/htdocs/roscms/inc/generate_page.php
2006-01-14 22:18:07 UTC (rev 20867) @@ -392,7 +392,9 @@ // redirect all bad links to the frontpage: $data_page = str_replace("[#link_",$roscms_intern_path_server."?page=index&temp=" ,$data_page); // correct link - + // Replace high chars by their html-escaped version + $data_page = roscms_unicode_escape($data_page); + // Output & View: switch ($rpm_sec2) { case "genpage": // generate a single page _____ Added:
trunk/web/reactos.org/phpext/config.m4
---
trunk/web/reactos.org/phpext/config.m4
2006-01-14 21:57:07 UTC (rev 20866) +++
trunk/web/reactos.org/phpext/config.m4
2006-01-14 22:18:07 UTC (rev 20867) @@ -0,0 +1,8 @@ +dnl config.m4 for extension roscms + +PHP_ARG_ENABLE(roscms, whether to enable roscms support, +[ --enable-roscms Enable roscms support]) + +if test "$PHP_ROSCMS" != "no"; then + PHP_NEW_EXTENSION(roscms, roscms.c, $ext_shared) +fi Property changes on:
trunk/web/reactos.org/phpext/config.m4
___________________________________________________________________ Name: svn:eol-style + native _____ Added:
trunk/web/reactos.org/phpext/php_roscms.h
---
trunk/web/reactos.org/phpext/php_roscms.h
2006-01-14 21:57:07 UTC (rev 20866) +++
trunk/web/reactos.org/phpext/php_roscms.h
2006-01-14 22:18:07 UTC (rev 20867) @@ -0,0 +1,21 @@ +#ifndef PHP_ROSCMS_H +#define PHP_ROSCMS_H + +extern zend_module_entry roscms_module_entry; +#define phpext_roscms_ptr &roscms_module_entry + +#ifdef PHP_WIN32 +#define PHP_ROSCMS_API __declspec(dllexport) +#else +#define PHP_ROSCMS_API +#endif + +#ifdef ZTS +#include "TSRM.h" +#endif + +PHP_MINFO_FUNCTION(roscms); + +PHP_FUNCTION(roscms_unicode_escape); + +#endif /* PHP_ROSCMS_H */ Property changes on:
trunk/web/reactos.org/phpext/php_roscms.h
___________________________________________________________________ Name: svn:eol-style + native _____ Added:
trunk/web/reactos.org/phpext/roscms.c
---
trunk/web/reactos.org/phpext/roscms.c
2006-01-14 21:57:07 UTC (rev 20866) +++
trunk/web/reactos.org/phpext/roscms.c
2006-01-14 22:18:07 UTC (rev 20867) @@ -0,0 +1,206 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "php.h" +#include "php_ini.h" +#include "ext/standard/info.h" +#include "php_roscms.h" + +/* + * Every user visible function must have an entry in roscms_functions[]. + */ +function_entry roscms_functions[] = { + PHP_FE(roscms_unicode_escape,NULL) + {NULL, NULL, NULL} /* Must be the last line in roscms_functions[] */ +}; + +zend_module_entry roscms_module_entry = { +#if ZEND_MODULE_API_NO >= 20010901 + STANDARD_MODULE_HEADER, +#endif + "roscms", + roscms_functions, + NULL, + NULL, + NULL, + NULL, + PHP_MINFO(roscms), +#if ZEND_MODULE_API_NO >= 20010901 + "1.0", /* Replace with version number for your extension */ +#endif + STANDARD_MODULE_PROPERTIES +}; + +#ifdef COMPILE_DL_ROSCMS +ZEND_GET_MODULE(roscms) +#endif + +PHP_MINFO_FUNCTION(roscms) +{ + php_info_print_table_start(); + php_info_print_table_header(2, "roscms support", "enabled"); + php_info_print_table_end(); +} +/* {{{ proto string roscms_unicode_escape(string arg) + Return a string in which characters > 127 have been HTML-escaped */ +PHP_FUNCTION(roscms_unicode_escape) +{ + unsigned char *in, *out, *pi, *po; + unsigned in_len, out_len; + unsigned i; + unsigned val, len; + int has_high; + char msg[128]; + unsigned size; + + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + &in, &in_len)) + { + RETURN_NULL(); + } + + /* We make a first pass over the input string. If there are high chars, + we use this pass to compute the total amount of mem required. If there + aren't any high chars (will probably happen a lot), we can skip the + conversion */ + size = 0; + i = 0; + pi = in; + has_high = 0; + while (i < in_len) + { + if (*pi <= 127) + { + size++; + i++; + pi++; + } + else + { + if (192 <= *pi && *pi < 224) + { + i += 2; + pi += 2; + } + else if (224 <= *pi && *pi < 240) + { + i += 3; + pi += 3; + } + else if (240 <= *pi && *pi < 248) + { + i += 4; + pi += 4; + } + else if (248 <= *pi && *pi < 252) + { + i += 5; + pi += 5; + } + else if (252 <= *pi && *pi < 254) + { + i += 6; + pi += 6; + } + else + { + RETURN_NULL(); + } + has_high = 1; + size += 8; /*  */ + } + } + + /* Now check if any high chars were found. If not, just return the input */ + if (! has_high) + { + RETURN_STRINGL((char *) in, in_len, 1); + } + + size++; + out = emalloc(size); + if (NULL == out) + { + RETURN_NULL(); + } + + i = 0; + pi = in; + out_len = 0; + po = out; + while (i < in_len) + { + if (*pi <= 127) + { + i++; + *po++ = *pi++; + out_len++; + } + else + { + if (192 <= *pi && *pi < 224) + { + val = (pi[0] - 192) * 64 + + (pi[1] - 128); + i += 2; + pi += 2; + } + else if (224 <= *pi && *pi < 240) + { + val = (pi[0] - 224) * 4096 + + (pi[1] - 128) * 64 + + (pi[2] - 128); + i += 3; + pi += 3; + } + else if (240 <= *pi && *pi < 248) + { + val = (pi[0] - 240) * 262144 + + (pi[1] - 128) * 4096 + + (pi[2] - 128) * 64 + + (pi[3] - 128); + i += 4; + pi += 4; + } + else if (248 <= *pi && *pi < 252) + { + val = (pi[0] - 248) * 16777216 + + (pi[1] - 128) * 262144 + + (pi[2] - 128) * 4096 + + (pi[3] - 128) * 64 + + (pi[4] - 128); + i += 5; + pi += 5; + } + else if (252 <= *pi && *pi < 254) + { + val = (pi[0] - 252) * 1073741824 + + (pi[1] - 128) * 16777216 + + (pi[2] - 128) * 262144 + + (pi[3] - 128) * 4096 + + (pi[4] - 128) * 64 + + (pi[5] - 128); + i += 6; + pi += 6; + } + else + { + RETURN_NULL(); + } + php_sprintf((char *) po, "&#%u;", val); + out_len += strlen((char *)po); + po = out + out_len; + } + } + *po = '\0'; + + if (size < out_len + 1) + { + sprintf(msg, "roscms_unicode_escape: buffer overflow size %u needed %d", + size, out_len); + zend_error(E_ERROR, msg); + } + + RETURN_STRINGL((char *) out, out_len, 0); +} Property changes on:
trunk/web/reactos.org/phpext/roscms.c
___________________________________________________________________ Name: svn:eol-style + native
18 years, 11 months
1
0
0
0
[npwoods] 20866: Freeloader: Check return code of RegOpenKey() in FrLdrLoadBootDrivers() for failure
by npwoods@svn.reactos.org
Freeloader: Check return code of RegOpenKey() in FrLdrLoadBootDrivers() for failure Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c _____ Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c 2006-01-14 20:36:49 UTC (rev 20865) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c 2006-01-14 21:57:07 UTC (rev 20866) @@ -428,55 +428,57 @@ /* open driver Key */ rc = RegOpenKey(hServiceKey, ServiceName, &hDriverKey); + if (rc == ERROR_SUCCESS) + { + /* Read the Start Value */ + ValueSize = sizeof(ULONG); + rc = RegQueryValue(hDriverKey, L"Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); + if (rc != ERROR_SUCCESS) StartValue = (ULONG)-1; + DbgPrint((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); - /* Read the Start Value */ - ValueSize = sizeof(ULONG); - rc = RegQueryValue(hDriverKey, L"Start", &ValueType, (PUCHAR)&StartValue, &ValueSize); - if (rc != ERROR_SUCCESS) StartValue = (ULONG)-1; - DbgPrint((DPRINT_REACTOS, " Start: %x \n", (int)StartValue)); + /* Read the Tag */ + ValueSize = sizeof(ULONG); + rc = RegQueryValue(hDriverKey, L"Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); + if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; + DbgPrint((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); - /* Read the Tag */ - ValueSize = sizeof(ULONG); - rc = RegQueryValue(hDriverKey, L"Tag", &ValueType, (PUCHAR)&TagValue, &ValueSize); - if (rc != ERROR_SUCCESS) TagValue = (ULONG)-1; - DbgPrint((DPRINT_REACTOS, " Tag: %x \n", (int)TagValue)); + /* Read the driver's group */ + DriverGroupSize = sizeof(DriverGroup); + rc = RegQueryValue(hDriverKey, L"Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); + DbgPrint((DPRINT_REACTOS, " Group: '%S' \n", DriverGroup)); - /* Read the driver's group */ - DriverGroupSize = sizeof(DriverGroup); - rc = RegQueryValue(hDriverKey, L"Group", NULL, (PUCHAR)DriverGroup, &DriverGroupSize); - DbgPrint((DPRINT_REACTOS, " Group: '%S' \n", DriverGroup)); + /* Make sure it should be started */ + if ((StartValue == 0) && + (TagValue == OrderList[TagIndex]) && + (_wcsicmp(DriverGroup, GroupName) == 0)) { - /* Make sure it should be started */ - if ((StartValue == 0) && - (TagValue == OrderList[TagIndex]) && - (_wcsicmp(DriverGroup, GroupName) == 0)) { + /* Get the Driver's Location */ + ValueSize = sizeof(TempImagePath); + rc = RegQueryValue(hDriverKey, L"ImagePath", NULL, (PUCHAR)TempImagePath, &ValueSize); - /* Get the Driver's Location */ - ValueSize = sizeof(TempImagePath); - rc = RegQueryValue(hDriverKey, L"ImagePath", NULL, (PUCHAR)TempImagePath, &ValueSize); + /* Write the whole path if it suceeded, else prepare to fail */ + if (rc != ERROR_SUCCESS) { + DbgPrint((DPRINT_REACTOS, " ImagePath: not found\n")); + sprintf(ImagePath, "%s\\system32\\drivers\\%S.sys", szSystemRoot, ServiceName); + } else if (TempImagePath[0] != L'\\') { + sprintf(ImagePath, "%s%S", szSystemRoot, TempImagePath); + } else { + sprintf(ImagePath, "%S", TempImagePath); + DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); + } - /* Write the whole path if it suceeded, else prepare to fail */ - if (rc != ERROR_SUCCESS) { - DbgPrint((DPRINT_REACTOS, " ImagePath: not found\n")); - sprintf(ImagePath, "%s\\system32\\drivers\\%S.sys", szSystemRoot, ServiceName); - } else if (TempImagePath[0] != L'\\') { - sprintf(ImagePath, "%s%S", szSystemRoot, TempImagePath); - } else { - sprintf(ImagePath, "%S", TempImagePath); - DbgPrint((DPRINT_REACTOS, " ImagePath: '%s'\n", ImagePath)); - } + DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath)); - DbgPrint((DPRINT_REACTOS, " Loading driver: '%s'\n", ImagePath)); + /* Update the position if needed */ + if (nPos < 100) nPos += 5; - /* Update the position if needed */ - if (nPos < 100) nPos += 5; + FrLdrLoadDriver(ImagePath, nPos); - FrLdrLoadDriver(ImagePath, nPos); + } else { - } else { - - DbgPrint((DPRINT_REACTOS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current Tag %d, current group '%S')\n", - ServiceName, StartValue, TagValue, DriverGroup, OrderList[TagIndex], GroupName)); + DbgPrint((DPRINT_REACTOS, " Skipping driver '%S' with Start %d, Tag %d and Group '%S' (Current Tag %d, current group '%S')\n", + ServiceName, StartValue, TagValue, DriverGroup, OrderList[TagIndex], GroupName)); + } } Index++;
18 years, 11 months
1
0
0
0
[weiden] 20865: remove debug information I forgot to remove
by weiden@svn.reactos.org
remove debug information I forgot to remove Modified: trunk/reactos/ntoskrnl/ke/i386/thread.c _____ Modified: trunk/reactos/ntoskrnl/ke/i386/thread.c --- trunk/reactos/ntoskrnl/ke/i386/thread.c 2006-01-14 20:36:01 UTC (rev 20864) +++ trunk/reactos/ntoskrnl/ke/i386/thread.c 2006-01-14 20:36:49 UTC (rev 20865) @@ -122,12 +122,12 @@ PKKINIT_FRAME InitFrame; InitFrame = (PKKINIT_FRAME)((ULONG_PTR)Thread->InitialStack - sizeof(KKINIT_FRAME)); DPRINT("Setting up a kernel thread with the Frame at: %x\n", InitFrame); -extern ULONG kernel_stack[]; + /* Setup the Fx Area */ FxSaveArea = &InitFrame->FxSaveArea; - DbgPrint("->a Ldr: %d kernel_stack:0%p r0x%p InitialStack: %p Initframe: %p-%p FxSav: %p-%p\n", KeLoaderBlock.ModsCount, &kernel_stack, PAGE_ROUND_UP(&kernel_stack), Thread->InitialStack, InitFrame, (ULONG_PTR)InitFrame + sizeof(KKINIT_FRAME), FxSaveArea, (ULONG_PTR)FxSaveArea + sizeof(FX_SAVE_AREA)); + RtlZeroMemory(FxSaveArea, sizeof(FX_SAVE_AREA)); - DbgPrint("->b Ldr: %d kernel_stack:0%p r0x%p InitialStack: %p Initframe: %p-%p FxSav: %p-%p\n", KeLoaderBlock.ModsCount, &kernel_stack, PAGE_ROUND_UP(&kernel_stack), Thread->InitialStack, InitFrame, (ULONG_PTR)InitFrame + sizeof(KKINIT_FRAME), FxSaveArea, (ULONG_PTR)FxSaveArea + sizeof(FX_SAVE_AREA)); + Thread->NpxState = NPX_STATE_INVALID; /* Setup the Stack for KiThreadStartup and Context Switching */
18 years, 11 months
1
0
0
0
[weiden] 20864: make the initial kernel_stack large enough to have enough space for the fx savings area
by weiden@svn.reactos.org
make the initial kernel_stack large enough to have enough space for the fx savings area Modified: trunk/reactos/ntoskrnl/ke/i386/main_asm.S Modified: trunk/reactos/ntoskrnl/ke/i386/thread.c Modified: trunk/reactos/ntoskrnl/ke/main.c _____ Modified: trunk/reactos/ntoskrnl/ke/i386/main_asm.S --- trunk/reactos/ntoskrnl/ke/i386/main_asm.S 2006-01-14 19:45:50 UTC (rev 20863) +++ trunk/reactos/ntoskrnl/ke/i386/main_asm.S 2006-01-14 20:36:01 UTC (rev 20864) @@ -35,7 +35,7 @@ .m1: /* Load the initial kernel stack */ lea _kernel_stack, %eax - add $0x1000, %eax + add $0x2000, %eax and $0xFFFFE000, %eax add $(0x3000 - SIZEOF_FX_SAVE_AREA), %eax movl %eax, %esp _____ Modified: trunk/reactos/ntoskrnl/ke/i386/thread.c --- trunk/reactos/ntoskrnl/ke/i386/thread.c 2006-01-14 19:45:50 UTC (rev 20863) +++ trunk/reactos/ntoskrnl/ke/i386/thread.c 2006-01-14 20:36:01 UTC (rev 20864) @@ -122,10 +122,12 @@ PKKINIT_FRAME InitFrame; InitFrame = (PKKINIT_FRAME)((ULONG_PTR)Thread->InitialStack - sizeof(KKINIT_FRAME)); DPRINT("Setting up a kernel thread with the Frame at: %x\n", InitFrame); - +extern ULONG kernel_stack[]; /* Setup the Fx Area */ FxSaveArea = &InitFrame->FxSaveArea; + DbgPrint("->a Ldr: %d kernel_stack:0%p r0x%p InitialStack: %p Initframe: %p-%p FxSav: %p-%p\n", KeLoaderBlock.ModsCount, &kernel_stack, PAGE_ROUND_UP(&kernel_stack), Thread->InitialStack, InitFrame, (ULONG_PTR)InitFrame + sizeof(KKINIT_FRAME), FxSaveArea, (ULONG_PTR)FxSaveArea + sizeof(FX_SAVE_AREA)); RtlZeroMemory(FxSaveArea, sizeof(FX_SAVE_AREA)); + DbgPrint("->b Ldr: %d kernel_stack:0%p r0x%p InitialStack: %p Initframe: %p-%p FxSav: %p-%p\n", KeLoaderBlock.ModsCount, &kernel_stack, PAGE_ROUND_UP(&kernel_stack), Thread->InitialStack, InitFrame, (ULONG_PTR)InitFrame + sizeof(KKINIT_FRAME), FxSaveArea, (ULONG_PTR)FxSaveArea + sizeof(FX_SAVE_AREA)); Thread->NpxState = NPX_STATE_INVALID; /* Setup the Stack for KiThreadStartup and Context Switching */ _____ Modified: trunk/reactos/ntoskrnl/ke/main.c --- trunk/reactos/ntoskrnl/ke/main.c 2006-01-14 19:45:50 UTC (rev 20863) +++ trunk/reactos/ntoskrnl/ke/main.c 2006-01-14 20:36:01 UTC (rev 20864) @@ -48,9 +48,9 @@ ULONG KeLargestCacheLine = 0x40; /* FIXME: Arch-specific */ -/* We allocate 4 pages, but we only use 3. The 4th is to guarantee page alignment */ -ULONG kernel_stack[4096]; -ULONG double_trap_stack[4096]; +/* We allocate 5 pages, but we only use 4. The 5th is to guarantee page alignment */ +ULONG kernel_stack[5120]; +ULONG double_trap_stack[5120]; /* These point to the aligned 3 pages */ ULONG init_stack; @@ -155,10 +155,11 @@ PIMAGE_OPTIONAL_HEADER OptHead; CHAR* s; - /* Set up the Stacks (Initial Kernel Stack and Double Trap Stack)*/ - trap_stack = PAGE_ROUND_UP(&double_trap_stack); + /* Set up the Stacks (Initial Kernel Stack and Double Trap Stack) + and save a page for the fx savings area */ + trap_stack = PAGE_ROUND_UP(&double_trap_stack) + PAGE_SIZE; trap_stack_top = trap_stack + 3 * PAGE_SIZE; - init_stack = PAGE_ROUND_UP(&kernel_stack); + init_stack = PAGE_ROUND_UP(&kernel_stack) + PAGE_SIZE; init_stack_top = init_stack + 3 * PAGE_SIZE; /* Copy the Loader Block Data locally since Low-Memory will be wiped */
18 years, 11 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
59
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Results per page:
10
25
50
100
200