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
2025
January
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
October 2009
----- 2025 -----
January 2025
----- 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
26 participants
641 discussions
Start a n
N
ew thread
[tkreuzer] 43559: Comment out mmebuddy, I currently see no chance compiling this for 64 bit. Please someone fix this.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 18:08:31 2009 New Revision: 43559 URL:
http://svn.reactos.org/svn/reactos?rev=43559&view=rev
Log: Comment out mmebuddy, I currently see no chance compiling this for 64 bit. Please someone fix this. Modified: branches/ros-amd64-bringup/reactos/lib/drivers/sound/sound.rbuild Modified: branches/ros-amd64-bringup/reactos/lib/drivers/sound/sound.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/lib/d…
============================================================================== --- branches/ros-amd64-bringup/reactos/lib/drivers/sound/sound.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/lib/drivers/sound/sound.rbuild [iso-8859-1] Sun Oct 18 18:08:31 2009 @@ -13,9 +13,9 @@ <directory name="uartmidi"> <xi:include href="uartmidi/uartmidi.rbuild" /> </directory> - <directory name="mmebuddy"> + <!-- directory name="mmebuddy"> <xi:include href="mmebuddy/mmebuddy.rbuild" /> - </directory> + </directory --> <directory name="mment4"> <xi:include href="mment4/mment4.rbuild" /> </directory>
15 years, 2 months
1
0
0
0
[tkreuzer] 43558: build cardlib only if USERMODE = 1
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 17:52:07 2009 New Revision: 43558 URL:
http://svn.reactos.org/svn/reactos?rev=43558&view=rev
Log: build cardlib only if USERMODE = 1 Modified: branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild Modified: branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/React…
============================================================================== --- branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ReactOS-amd64.rbuild [iso-8859-1] Sun Oct 18 17:52:07 2009 @@ -221,9 +221,11 @@ <directory name="bzip2"> <xi:include href="lib/3rdparty/bzip2/bzip2.rbuild" /> </directory> + <if property="USERMODE" value="1"> <directory name="cardlib"> <xi:include href="lib/3rdparty/cardlib/cardlib.rbuild" /> </directory> + </if> <directory name="expat"> <xi:include href="lib/3rdparty/expat/expat.rbuild" /> </directory>
15 years, 2 months
1
0
0
0
[tkreuzer] 43557: comment out audio_test for now
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 17:47:57 2009 New Revision: 43557 URL:
http://svn.reactos.org/svn/reactos?rev=43557&view=rev
Log: comment out audio_test for now Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/directory.rbuild Modified: branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/drive…
============================================================================== --- branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/directory.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/drivers/wdm/audio/backpln/directory.rbuild [iso-8859-1] Sun Oct 18 17:47:57 2009 @@ -1,9 +1,9 @@ <?xml version="1.0"?> <!DOCTYPE group SYSTEM "../../../../tools/rbuild/project.dtd"> <group xmlns:xi="
http://www.w3.org/2001/XInclude
"> - <directory name="audio_test"> + <!-- directory name="audio_test"> <xi:include href="audio_test/audio_test.rbuild" /> - </directory> + </directory --> <directory name="portcls"> <xi:include href="portcls/portcls.rbuild" /> </directory>
15 years, 2 months
1
0
0
0
[cwittich] 43556: sync advapi32 winetest to wine 1.1.31
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Oct 18 16:57:22 2009 New Revision: 43556 URL:
http://svn.reactos.org/svn/reactos?rev=43556&view=rev
Log: sync advapi32 winetest to wine 1.1.31 Modified: trunk/rostests/winetests/advapi32/cred.c trunk/rostests/winetests/advapi32/crypt_sha.c trunk/rostests/winetests/advapi32/lsa.c trunk/rostests/winetests/advapi32/registry.c trunk/rostests/winetests/advapi32/security.c trunk/rostests/winetests/advapi32/service.c Modified: trunk/rostests/winetests/advapi32/cred.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/cred.c…
============================================================================== --- trunk/rostests/winetests/advapi32/cred.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/cred.c [iso-8859-1] Sun Oct 18 16:57:22 2009 @@ -101,8 +101,8 @@ ret = pCredWriteA(&new_cred, 0); if (ret) { - /* Vista */ - ok(GetLastError() == ERROR_IO_PENDING, + ok(GetLastError() == ERROR_SUCCESS || + GetLastError() == ERROR_IO_PENDING, /* Vista */ "Expected ERROR_IO_PENDING, got %d\n", GetLastError()); } else @@ -154,12 +154,13 @@ /* these two tests would crash on both native and Wine. Implementations * does not check for NULL output pointers and try to zero them out early */ -#if 0 +if(0) +{ ok(!pCredReadDomainCredentialsA(&info, 0, NULL, &creds) && GetLastError() == ERROR_INVALID_PARAMETER, "!\n"); ok(!pCredReadDomainCredentialsA(&info, 0, &count, NULL) && GetLastError() == ERROR_INVALID_PARAMETER, "!\n"); -#endif +} SetLastError(0xdeadbeef); ret = pCredReadDomainCredentialsA(NULL, 0, &count, &creds); Modified: trunk/rostests/winetests/advapi32/crypt_sha.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/crypt_…
============================================================================== --- trunk/rostests/winetests/advapi32/crypt_sha.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/crypt_sha.c [iso-8859-1] Sun Oct 18 16:57:22 2009 @@ -35,21 +35,22 @@ static void test_sha_ctx(void) { - FARPROC pA_SHAInit, pA_SHAUpdate, pA_SHAFinal; - static const char test_buffer[] = "In our Life there's If" - "In our beliefs there's Lie" - "In our business there is Sin" - "In our bodies, there is Die"; - ULONG test_buffer_size = strlen(test_buffer); + void (WINAPI *pA_SHAInit)(PSHA_CTX); + void (WINAPI *pA_SHAUpdate)(PSHA_CTX, const unsigned char *, UINT); + void (WINAPI *pA_SHAFinal)(PSHA_CTX, PULONG); + static const unsigned char test_buffer[] = "In our Life there's If" + "In our beliefs there's Lie" + "In our business there is Sin" + "In our bodies, there is Die"; HMODULE hmod; SHA_CTX ctx; ULONG result[5]; ULONG result_correct[5] = {0xe014f93, 0xe09791ec, 0x6dcf96c8, 0x8e9385fc, 0x1611c1bb}; hmod = GetModuleHandleA("advapi32.dll"); - pA_SHAInit = GetProcAddress(hmod, "A_SHAInit"); - pA_SHAUpdate = GetProcAddress(hmod, "A_SHAUpdate"); - pA_SHAFinal = GetProcAddress(hmod, "A_SHAFinal"); + pA_SHAInit = (void *)GetProcAddress(hmod, "A_SHAInit"); + pA_SHAUpdate = (void *)GetProcAddress(hmod, "A_SHAUpdate"); + pA_SHAFinal = (void *)GetProcAddress(hmod, "A_SHAFinal"); if (!pA_SHAInit || !pA_SHAUpdate || !pA_SHAFinal) { @@ -59,8 +60,8 @@ RtlZeroMemory(&ctx, sizeof(ctx)); pA_SHAInit(&ctx); - pA_SHAUpdate(&ctx, test_buffer, test_buffer_size); - pA_SHAUpdate(&ctx, test_buffer, test_buffer_size); + pA_SHAUpdate(&ctx, test_buffer, sizeof(test_buffer)-1); + pA_SHAUpdate(&ctx, test_buffer, sizeof(test_buffer)-1); pA_SHAFinal(&ctx, result); ok(!memcmp(result, result_correct, sizeof(result)), "incorrect result\n"); } Modified: trunk/rostests/winetests/advapi32/lsa.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/lsa.c?…
============================================================================== --- trunk/rostests/winetests/advapi32/lsa.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/lsa.c [iso-8859-1] Sun Oct 18 16:57:22 2009 @@ -41,7 +41,8 @@ static NTSTATUS (WINAPI *pLsaFreeMemory)(PVOID); static NTSTATUS (WINAPI *pLsaOpenPolicy)(PLSA_UNICODE_STRING,PLSA_OBJECT_ATTRIBUTES,ACCESS_MASK,PLSA_HANDLE); static NTSTATUS (WINAPI *pLsaQueryInformationPolicy)(LSA_HANDLE,POLICY_INFORMATION_CLASS,PVOID*); -static BOOL (WINAPI *pConvertSidToStringSidA)(PSID pSid, LPSTR *str); +static BOOL (WINAPI *pConvertSidToStringSidA)(PSID,LPSTR*); +static NTSTATUS (WINAPI *pLsaLookupNames2)(LSA_HANDLE,ULONG,ULONG,PLSA_UNICODE_STRING,PLSA_REFERENCED_DOMAIN_LIST*,PLSA_TRANSLATED_SID2*); static BOOL init(void) { @@ -53,6 +54,7 @@ pLsaOpenPolicy = (void*)GetProcAddress(hadvapi32, "LsaOpenPolicy"); pLsaQueryInformationPolicy = (void*)GetProcAddress(hadvapi32, "LsaQueryInformationPolicy"); pConvertSidToStringSidA = (void*)GetProcAddress(hadvapi32, "ConvertSidToStringSidA"); + pLsaLookupNames2 = (void*)GetProcAddress(hadvapi32, "LsaLookupNames2"); if (pLsaClose && pLsaEnumerateAccountRights && pLsaFreeMemory && pLsaOpenPolicy && pLsaQueryInformationPolicy && pConvertSidToStringSidA) return TRUE; @@ -216,6 +218,139 @@ } } +static void get_sid_info(PSID psid, LPSTR *user, LPSTR *dom) +{ + static char account[257], domain[257]; + DWORD user_size, dom_size; + SID_NAME_USE use; + BOOL ret; + + *user = account; + *dom = domain; + + user_size = dom_size = 257; + account[0] = domain[0] = 0; + ret = LookupAccountSidA(NULL, psid, account, &user_size, domain, &dom_size, &use); + ok(ret, "LookupAccountSidA failed %u\n", GetLastError()); +} + +static void test_LsaLookupNames2(void) +{ + static const WCHAR n1[] = {'L','O','C','A','L',' ','S','E','R','V','I','C','E'}; + static const WCHAR n2[] = {'N','T',' ','A','U','T','H','O','R','I','T','Y','\\','L','o','c','a','l','S','e','r','v','i','c','e'}; + + NTSTATUS status; + LSA_HANDLE handle; + LSA_OBJECT_ATTRIBUTES attrs; + PLSA_REFERENCED_DOMAIN_LIST domains; + PLSA_TRANSLATED_SID2 sids; + LSA_UNICODE_STRING name[3]; + LPSTR account, sid_dom; + + if (!pLsaLookupNames2) + { + win_skip("LsaLookupNames2 not avaliable\n"); + return; + } + + if (PRIMARYLANGID(LANGIDFROMLCID(GetThreadLocale())) != LANG_ENGLISH) + { + skip("Non-english locale (skipping LsaLookupNames2 tests)\n"); + return; + } + + memset(&attrs, 0, sizeof(attrs)); + attrs.Length = sizeof(attrs); + + status = pLsaOpenPolicy(NULL, &attrs, POLICY_ALL_ACCESS, &handle); + ok(status == STATUS_SUCCESS || status == STATUS_ACCESS_DENIED, + "LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08x\n", status); + + /* try a more restricted access mask if necessary */ + if (status == STATUS_ACCESS_DENIED) + { + trace("LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION\n"); + status = pLsaOpenPolicy(NULL, &attrs, POLICY_LOOKUP_NAMES, &handle); + ok(status == STATUS_SUCCESS, "LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08x\n", status); + } + if (status != STATUS_SUCCESS) + { + skip("Cannot acquire policy handle\n"); + return; + } + + name[0].Buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(n1)); + name[0].Length = name[0].MaximumLength = sizeof(n1); + memcpy(name[0].Buffer, n1, sizeof(n1)); + + name[1].Buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(n1)); + name[1].Length = name[1].MaximumLength = sizeof(n1) - sizeof(WCHAR); + memcpy(name[1].Buffer, n1, sizeof(n1) - sizeof(WCHAR)); + + name[2].Buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(n2)); + name[2].Length = name[2].MaximumLength = sizeof(n2); + memcpy(name[2].Buffer, n2, sizeof(n2)); + + /* account name only */ + sids = NULL; + domains = NULL; + status = pLsaLookupNames2(handle, 0, 1, &name[0], &domains, &sids); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status); + ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); + ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); + ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); + get_sid_info(sids[0].Sid, &account, &sid_dom); + ok(!strcmp(account, "LOCAL SERVICE"), "expected \"LOCAL SERVICE\", got \"%s\"\n", account); + ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected \"NT AUTHORITY\", got \"%s\"\n", sid_dom); + pLsaFreeMemory(sids); + pLsaFreeMemory(domains); + + /* unknown account name */ + sids = NULL; + domains = NULL; + status = pLsaLookupNames2(handle, 0, 1, &name[1], &domains, &sids); + ok(status == STATUS_NONE_MAPPED, "expected STATUS_NONE_MAPPED, got %x)\n", status); + ok(sids[0].Use == SidTypeUnknown, "expected SidTypeUnknown, got %u\n", sids[0].Use); + ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); + ok(domains->Entries == 0, "expected 0, got %u\n", domains->Entries); + pLsaFreeMemory(sids); + pLsaFreeMemory(domains); + + /* account + domain */ + sids = NULL; + domains = NULL; + status = pLsaLookupNames2(handle, 0, 1, &name[2], &domains, &sids); + ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %x)\n", status); + ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); + ok(sids[0].Flags == 0, "expected 0, got 0x%08x\n", sids[0].Flags); + ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); + get_sid_info(sids[0].Sid, &account, &sid_dom); + ok(!strcmp(account, "LOCAL SERVICE"), "expected \"LOCAL SERVICE\", got \"%s\"\n", account); + ok(!strcmp(sid_dom, "NT AUTHORITY"), "expected \"NT AUTHORITY\", got \"%s\"\n", sid_dom); + pLsaFreeMemory(sids); + pLsaFreeMemory(domains); + + /* all three */ + sids = NULL; + domains = NULL; + status = pLsaLookupNames2(handle, 0, 3, name, &domains, &sids); + ok(status == STATUS_SOME_NOT_MAPPED, "expected STATUS_SOME_NOT_MAPPED, got %x)\n", status); + ok(sids[0].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); + ok(sids[1].Use == SidTypeUnknown, "expected SidTypeUnknown, got %u\n", sids[0].Use); + ok(sids[2].Use == SidTypeWellKnownGroup, "expected SidTypeWellKnownGroup, got %u\n", sids[0].Use); + ok(sids[0].DomainIndex == 0, "expected 0, got %u\n", sids[0].DomainIndex); + ok(domains->Entries == 1, "expected 1, got %u\n", domains->Entries); + pLsaFreeMemory(sids); + pLsaFreeMemory(domains); + + HeapFree(GetProcessHeap(), 0, name[0].Buffer); + HeapFree(GetProcessHeap(), 0, name[1].Buffer); + HeapFree(GetProcessHeap(), 0, name[2].Buffer); + + status = pLsaClose(handle); + ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08x\n", status); +} + START_TEST(lsa) { if (!init()) { @@ -224,4 +359,5 @@ } test_lsa(); -} + test_LsaLookupNames2(); +} Modified: trunk/rostests/winetests/advapi32/registry.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/regist…
============================================================================== --- trunk/rostests/winetests/advapi32/registry.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/registry.c [iso-8859-1] Sun Oct 18 16:57:22 2009 @@ -111,57 +111,6 @@ return res; } -static const char *wine_debugstr_wn( const WCHAR *str, int n ) -{ - char *dst, *res; - size_t size; - - if (!HIWORD(str)) - { - if (!str) return "(null)"; - res = get_temp_buffer( 6 ); - sprintf( res, "#%04x", LOWORD(str) ); - return res; - } - if (n == -1) n = lstrlenW(str); - if (n < 0) n = 0; - size = 12 + min( 300, n * 5); - dst = res = get_temp_buffer( n * 5 + 7 ); - *dst++ = 'L'; - *dst++ = '"'; - while (n-- > 0 && dst <= res + size - 10) - { - WCHAR c = *str++; - switch (c) - { - case '\n': *dst++ = '\\'; *dst++ = 'n'; break; - case '\r': *dst++ = '\\'; *dst++ = 'r'; break; - case '\t': *dst++ = '\\'; *dst++ = 't'; break; - case '"': *dst++ = '\\'; *dst++ = '"'; break; - case '\\': *dst++ = '\\'; *dst++ = '\\'; break; - default: - if (c >= ' ' && c <= 126) - *dst++ = (char)c; - else - { - *dst++ = '\\'; - sprintf(dst,"%04x",c); - dst+=4; - } - } - } - *dst++ = '"'; - if (n > 0) - { - *dst++ = '.'; - *dst++ = '.'; - *dst++ = '.'; - } - *dst = 0; - return res; -} - - #define ADVAPI32_GET_PROC(func) \ p ## func = (void*)GetProcAddress(hadvapi32, #func); @@ -288,8 +237,8 @@ if (string) { lok(memcmp(value, string, cbData) == 0, "RegQueryValueExW failed: %s/%d != %s/%d\n", - wine_debugstr_wn((WCHAR*)value, cbData / sizeof(WCHAR)), cbData, - wine_debugstr_wn(string, full_byte_len / sizeof(WCHAR)), full_byte_len); + wine_dbgstr_wn((WCHAR*)value, cbData / sizeof(WCHAR)), cbData, + wine_dbgstr_wn(string, full_byte_len / sizeof(WCHAR)), full_byte_len); } /* This implies that when cbData == 0, RegQueryValueExW() should not modify the buffer */ lok(*(value+cbData) == 0xbd, "RegQueryValueExW/2 overflowed at %u: %02x != bd\n", cbData, *(value+cbData)); @@ -959,6 +908,12 @@ ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", NULL); ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", ret); + ret = RegOpenKeyA(HKEY_CURRENT_USER, NULL, NULL); + ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", ret); + + ret = RegOpenKeyA(NULL, NULL, NULL); + ok(ret == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER, got %d\n", ret); + /* beginning backslash character */ ret = RegOpenKeyA(HKEY_CURRENT_USER, "\\Software\\Wine\\Test", &hkResult); ok(ret == ERROR_BAD_PATHNAME || /* NT/2k/XP */ Modified: trunk/rostests/winetests/advapi32/security.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/securi…
============================================================================== --- trunk/rostests/winetests/advapi32/security.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/security.c [iso-8859-1] Sun Oct 18 16:57:22 2009 @@ -92,6 +92,9 @@ static DWORD (WINAPI *pGetNamedSecurityInfoA)(LPSTR, SE_OBJECT_TYPE, SECURITY_INFORMATION, PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*); +static PDWORD (WINAPI *pGetSidSubAuthority)(PSID, DWORD); +static PUCHAR (WINAPI *pGetSidSubAuthorityCount)(PSID); +static BOOL (WINAPI *pIsValidSid)(PSID); typedef DWORD (WINAPI *fnRtlAdjustPrivilege)(ULONG,BOOLEAN,BOOLEAN,PBOOLEAN); typedef BOOL (WINAPI *fnCreateWellKnownSid)(WELL_KNOWN_SID_TYPE,PSID,PSID,DWORD*); typedef BOOL (WINAPI *fnDuplicateTokenEx)(HANDLE,DWORD,LPSECURITY_ATTRIBUTES, @@ -160,6 +163,9 @@ pSetFileSecurityA = (fnSetFileSecurityA)GetProcAddress(hmod, "SetFileSecurityA" ); pCreateWellKnownSid = (fnCreateWellKnownSid)GetProcAddress( hmod, "CreateWellKnownSid" ); pGetNamedSecurityInfoA = (void *)GetProcAddress(hmod, "GetNamedSecurityInfoA"); + pGetSidSubAuthority = (void *)GetProcAddress(hmod, "GetSidSubAuthority"); + pGetSidSubAuthorityCount = (void *)GetProcAddress(hmod, "GetSidSubAuthorityCount"); + pIsValidSid = (void *)GetProcAddress(hmod, "IsValidSid"); pMakeSelfRelativeSD = (void *)GetProcAddress(hmod, "MakeSelfRelativeSD"); pSetEntriesInAclW = (void *)GetProcAddress(hmod, "SetEntriesInAclW"); pSetSecurityDescriptorControl = (void *)GetProcAddress(hmod, "SetSecurityDescriptorControl"); @@ -2390,7 +2396,8 @@ /* can't perform access check when opening object against an anonymous impersonation token */ todo_wine { error = RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); - ok(error == ERROR_INVALID_HANDLE, "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE instead of %d\n", error); + ok(error == ERROR_INVALID_HANDLE || error == ERROR_CANT_OPEN_ANONYMOUS, + "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE or ERROR_CANT_OPEN_ANONYMOUS instead of %d\n", error); } RevertToSelf(); @@ -2443,7 +2450,8 @@ /* can't perform access check when opening object against an identification impersonation token */ error = RegOpenKeyEx(HKEY_CURRENT_USER, "Software", 0, KEY_READ, &hkey); todo_wine { - ok(error == ERROR_INVALID_HANDLE, "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE instead of %d\n", error); + ok(error == ERROR_INVALID_HANDLE || error == ERROR_BAD_IMPERSONATION_LEVEL, + "RegOpenKeyEx should have failed with ERROR_INVALID_HANDLE or ERROR_BAD_IMPERSONATION_LEVEL instead of %d\n", error); } ret = PrivilegeCheck(Token, PrivilegeSet, &AccessGranted); ok(ret, "PrivilegeCheck for SecurityIdentification failed with error %d\n", GetLastError()); @@ -2476,6 +2484,7 @@ SID_IDENTIFIER_AUTHORITY SIDAuthNT = { SECURITY_NT_AUTHORITY }; EXPLICIT_ACCESSW ExplicitAccess; static const WCHAR wszEveryone[] = {'E','v','e','r','y','o','n','e',0}; + static const WCHAR wszCurrentUser[] = { 'C','U','R','R','E','N','T','_','U','S','E','R','\0'}; if (!pSetEntriesInAclW) { @@ -2568,6 +2577,13 @@ ok(NewAcl != NULL, "returned acl was NULL\n"); LocalFree(NewAcl); } + + ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_USER; + ExplicitAccess.Trustee.ptstrName = (LPWSTR)wszCurrentUser; + res = pSetEntriesInAclW(1, &ExplicitAccess, OldAcl, &NewAcl); + ok(res == ERROR_SUCCESS, "SetEntriesInAclW failed: %u\n", res); + ok(NewAcl != NULL, "returned acl was NULL\n"); + LocalFree(NewAcl); ExplicitAccess.grfAccessMode = REVOKE_ACCESS; ExplicitAccess.Trustee.TrusteeForm = TRUSTEE_IS_SID; @@ -3036,20 +3052,25 @@ "GetPrivateObjectSecurity failed (err=%u)\n", GetLastError()); ok(retSize <= dwDescSize, "Buffer too small (%d vs %d)\n", retSize, dwDescSize); ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(buf, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed err=%u\n", GetLastError()); - CHECK_RESULT_AND_FREE("G:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"); + CHECK_ONE_OF_AND_FREE("G:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)", + "G:S-1-5-21-93476-23408-4576D:P(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"); /* Win7 */ GetSecurityDescriptorControl(buf, &ctrl, &dwRevision); - expect_eq(ctrl, 0x8004, int, "%x"); + expect_eq(ctrl & (~ SE_DACL_PROTECTED), 0x8004, int, "%x"); ok(GetPrivateObjectSecurity(sec, sec_info, buf, dwDescSize, &retSize), "GetPrivateObjectSecurity failed (err=%u)\n", GetLastError()); ok(retSize == dwDescSize, "Buffer too small (%d vs %d)\n", retSize, dwDescSize); ok(pConvertSecurityDescriptorToStringSecurityDescriptorA(buf, SDDL_REVISION_1, sec_info, &string, &len), "Conversion failed\n"); - CHECK_RESULT_AND_FREE("O:SY" + CHECK_ONE_OF_AND_FREE("O:SY" "G:S-1-5-21-93476-23408-4576" "D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)" - "S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)"); + "S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)", + "O:SY" + "G:S-1-5-21-93476-23408-4576" + "D:P(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)" + "S:(AU;OICINPIOIDSAFA;CCDCLCSWRPRC;;;SU)(AU;NPSA;0x12019f;;;SU)"); /* Win7 */ GetSecurityDescriptorControl(buf, &ctrl, &dwRevision); - expect_eq(ctrl, 0x8014, int, "%x"); + expect_eq(ctrl & (~ SE_DACL_PROTECTED), 0x8014, int, "%x"); SetLastError(0xdeadbeef); ok(GetPrivateObjectSecurity(sec, sec_info, buf, 5, &retSize) == FALSE, "GetPrivateObjectSecurity should have failed\n"); @@ -3174,6 +3195,34 @@ ok(IsValidAcl(dacl), "GetSecurityInfo\n"); CloseHandle(obj); +} + +static void test_GetSidSubAuthority(void) +{ + PSID psid = NULL; + + if (!pGetSidSubAuthority || !pConvertStringSidToSidA || !pIsValidSid || !pGetSidSubAuthorityCount) + { + win_skip("Some functions not available\n"); + return; + } + /* Note: on windows passing in an invalid index like -1, lets GetSidSubAuthority return 0x05000000 but + still GetLastError returns ERROR_SUCCESS then. We don't test these unlikely cornercases here for now */ + ok(pConvertStringSidToSidA("S-1-5-21-93476-23408-4576",&psid),"ConvertStringSidToSidA failed\n"); + ok(pIsValidSid(psid),"Sid is not valid\n"); + SetLastError(0xbebecaca); + ok(*pGetSidSubAuthorityCount(psid) == 4,"GetSidSubAuthorityCount gave %d expected 4\n",*pGetSidSubAuthorityCount(psid)); + ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); + SetLastError(0xbebecaca); + ok(*pGetSidSubAuthority(psid,0) == 21,"GetSidSubAuthority gave %d expected 21\n",*pGetSidSubAuthority(psid,0)); + ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); + SetLastError(0xbebecaca); + ok(*pGetSidSubAuthority(psid,1) == 93476,"GetSidSubAuthority gave %d expected 93476\n",*pGetSidSubAuthority(psid,1)); + ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); + SetLastError(0xbebecaca); + todo_wine ok(*pGetSidSubAuthority(psid,4) == 0,"GetSidSubAuthority gave %d,expected 0\n",*pGetSidSubAuthority(psid,4)); + ok(GetLastError() == 0,"GetLastError returned %d instead of 0\n",GetLastError()); + LocalFree(psid); } START_TEST(security) @@ -3205,4 +3254,5 @@ test_PrivateObjectSecurity(); test_acls(); test_GetSecurityInfo(); + test_GetSidSubAuthority(); } Modified: trunk/rostests/winetests/advapi32/service.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/servic…
============================================================================== --- trunk/rostests/winetests/advapi32/service.c [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/service.c [iso-8859-1] Sun Oct 18 16:57:22 2009 @@ -28,6 +28,7 @@ #include "winsvc.h" #include "winnls.h" #include "lmcons.h" +#include "aclapi.h" #include "wine/test.h" @@ -37,6 +38,8 @@ static BOOL (WINAPI *pEnumServicesStatusExA)(SC_HANDLE, SC_ENUM_TYPE, DWORD, DWORD, LPBYTE, DWORD, LPDWORD, LPDWORD, LPDWORD, LPCSTR); +static DWORD (WINAPI *pGetSecurityInfo)(HANDLE, SE_OBJECT_TYPE, SECURITY_INFORMATION, + PSID*, PSID*, PACL*, PACL*, PSECURITY_DESCRIPTOR*); static BOOL (WINAPI *pQueryServiceConfig2A)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD); static BOOL (WINAPI *pQueryServiceConfig2W)(SC_HANDLE,DWORD,LPBYTE,DWORD,LPDWORD); static BOOL (WINAPI *pQueryServiceStatusEx)(SC_HANDLE, SC_STATUS_TYPE, LPBYTE, @@ -48,6 +51,7 @@ pChangeServiceConfig2A = (void*)GetProcAddress(hadvapi32, "ChangeServiceConfig2A"); pEnumServicesStatusExA= (void*)GetProcAddress(hadvapi32, "EnumServicesStatusExA"); + pGetSecurityInfo = (void *)GetProcAddress(hadvapi32, "GetSecurityInfo"); pQueryServiceConfig2A= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2A"); pQueryServiceConfig2W= (void*)GetProcAddress(hadvapi32, "QueryServiceConfig2W"); pQueryServiceStatusEx= (void*)GetProcAddress(hadvapi32, "QueryServiceStatusEx"); @@ -1743,7 +1747,17 @@ return; } else + { ok(svc_handle != NULL, "Could not create the service : %d\n", GetLastError()); + if ((svc_handle != NULL) && (pGetSecurityInfo != NULL)) + { + PSID sidOwner, sidGroup; + PACL dacl, sacl; + PSECURITY_DESCRIPTOR pSD; + HRESULT retval = pGetSecurityInfo(svc_handle,SE_SERVICE,DACL_SECURITY_INFORMATION,&sidOwner,&sidGroup,&dacl,&sacl,&pSD); + todo_wine ok(ERROR_SUCCESS == retval, "Expected GetSecurityInfo to succeed: result %d\n",retval); + } + } if (!svc_handle) return;
15 years, 2 months
1
0
0
0
[cwittich] 43555: add some NULL checks
by cwittich@svn.reactos.org
Author: cwittich Date: Sun Oct 18 16:47:16 2009 New Revision: 43555 URL:
http://svn.reactos.org/svn/reactos?rev=43555&view=rev
Log: add some NULL checks Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c Modified: trunk/reactos/dll/win32/advapi32/reg/reg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/reg/reg…
============================================================================== --- trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/reg/reg.c [iso-8859-1] Sun Oct 18 16:47:16 2009 @@ -3272,6 +3272,9 @@ TRACE("RegOpenKeyA hKey 0x%x lpSubKey %s phkResult %p\n", hKey, lpSubKey, phkResult); + if (!phkResult) + return ERROR_INVALID_PARAMETER; + if (!hKey && lpSubKey && phkResult) { return ERROR_INVALID_HANDLE; @@ -3307,6 +3310,9 @@ { TRACE("RegOpenKeyW hKey 0x%x lpSubKey %S phkResult %p\n", hKey, lpSubKey, phkResult); + + if (!phkResult) + return ERROR_INVALID_PARAMETER; if (!hKey && lpSubKey && phkResult) {
15 years, 2 months
1
0
0
0
[tkreuzer] 43554: Add alignment checks to KdpSysReadIoSpace and KdpSysWriteIoSpace
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 16:36:03 2009 New Revision: 43554 URL:
http://svn.reactos.org/svn/reactos?rev=43554&view=rev
Log: Add alignment checks to KdpSysReadIoSpace and KdpSysWriteIoSpace Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdsup.c [iso-8859-1] Sun Oct 18 16:36:03 2009 @@ -264,6 +264,14 @@ return STATUS_INVALID_PARAMETER; } + /* Check for correct alignment */ + if ((IoAddress & (DataSize - 1))) + { + /* Invalid alignment */ + *ActualDataSize = 0; + return STATUS_DATATYPE_MISALIGNMENT; + } + switch (DataSize) { case sizeof(UCHAR): @@ -284,7 +292,7 @@ default: /* Invalid data size */ *ActualDataSize = 0; - return STATUS_UNSUCCESSFUL; + return STATUS_INVALID_PARAMETER; } /* Return the size of the data */ @@ -313,6 +321,14 @@ return STATUS_INVALID_PARAMETER; } + /* Check for correct alignment */ + if ((IoAddress & (DataSize - 1))) + { + /* Invalid alignment */ + *ActualDataSize = 0; + return STATUS_DATATYPE_MISALIGNMENT; + } + switch (DataSize) { case sizeof(UCHAR): @@ -333,7 +349,7 @@ default: /* Invalid data size */ *ActualDataSize = 0; - return STATUS_UNSUCCESSFUL; + return STATUS_INVALID_PARAMETER; } /* Return the size of the data */
15 years, 2 months
1
0
0
0
[janderwald] 43553: - Partly revert 43533
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Oct 18 16:22:00 2009 New Revision: 43553 URL:
http://svn.reactos.org/svn/reactos?rev=43553&view=rev
Log: - Partly revert 43533 Modified: trunk/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c Modified: trunk/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/sound/mmebuddy…
============================================================================== --- trunk/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/sound/mmebuddy/wave/streaming.c [iso-8859-1] Sun Oct 18 16:22:00 2009 @@ -245,13 +245,8 @@ IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PVOID Parameter) { - /* complete all pending headers */ - while(SoundDeviceInstance->HeadWaveHeader) - CompleteWaveHeader(SoundDeviceInstance, SoundDeviceInstance->HeadWaveHeader); - - SND_ASSERT( NULL == SoundDeviceInstance->HeadWaveHeader ); - SND_ASSERT( NULL == SoundDeviceInstance->TailWaveHeader ); - return MMSYSERR_NOERROR; + /* TODO */ + return MMSYSERR_NOTSUPPORTED; } MMRESULT
15 years, 2 months
1
0
0
0
[tkreuzer] 43552: Cleanup kernel init code a bit
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sun Oct 18 16:18:42 2009 New Revision: 43552 URL:
http://svn.reactos.org/svn/reactos?rev=43552&view=rev
Log: Cleanup kernel init code a bit Removed: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/asmmacro.S Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c Removed: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/asmmacro.S URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/asmmacro.S [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/asmmacro.S (removed) @@ -1,81 +1,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS Kernel - * FILE: ntoskrnl/include/amd64/asmmacro.S - * PURPOSE: Macros for x64 assembly - * PROGRAMMERS: Timo Kreuzer (timo.kreuzer(a)reactos.org) - */ - -.intel_syntax noprefix -.code64 - -/* Macros for x64 stack unwind OPs */ - -.macro .proc name - .func name - .global _\name - _\name: - .cfi_startproc - .equ cfa_current_offset, -8 -.endm - -.macro .endproc - .cfi_endproc - .endfunc -.endm - -.macro .allocstack size - .cfi_adjust_cfa_offset \size - .set cfa_current_offset, cfa_current_offset - \size -.endm - -.macro .pushframe code - .if (\code == 0) - .cfi_adjust_cfa_offset 0x28 - .set cfa_current_offset, cfa_current_offset - 0x28 - .else - .cfi_adjust_cfa_offset 0x30 - .set cfa_current_offset, cfa_current_offset - 0x30 - .endif -.endm - -.macro .pushreg reg - .cfi_adjust_cfa_offset 8 - .equ cfa_current_offset, cfa_current_offset - 8 - .cfi_offset \reg, cfa_current_offset -.endm - -.macro .savereg reg, offset - // checkme!!! - .cfi_offset \reg, \offset -.endm - -.macro .savexmm128 reg, offset - // checkme!!! - .cfi_offset \reg, \offset -.endm - -.macro .setframe reg, offset - .cfi_def_cfa reg, \offset - .equ cfa_current_offset, \offset -.endm - -.macro .endprolog -.endm - -.macro UNIMPLEMENTED2 line, func - jmp 3f - .equ expr, 12 -1: .asciz "\func" -2: .asciz __FILE__ -3: - sub rsp, 0x20 - lea rcx, _MsgUnimplemented[rip] - lea rdx, 1b[rip] - lea r8, 2b[rip] - mov r9, \line - call _DbgPrint - add rsp, 0x20 -.endm -#define UNIMPLEMENTED UNIMPLEMENTED2 __LINE__, - Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/include/internal/amd64/ke.h [iso-8859-1] Sun Oct 18 16:18:42 2009 @@ -108,12 +108,14 @@ VOID Ki386ApplicationProcessorInitializeTSS(VOID); +// Hack +VOID KiRosPrepareForSystemStartup(ULONG, PROS_LOADER_PARAMETER_BLOCK); + VOID FASTCALL Ki386InitializeTss( IN PKTSS Tss, - IN PKIDTENTRY Idt, - IN PKGDTENTRY Gdt, + IN PVOID GdtBase, IN UINT64 Stack ); Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] Sun Oct 18 16:18:42 2009 @@ -387,18 +387,16 @@ } } - VOID FASTCALL Ki386InitializeTss(IN PKTSS64 Tss, - IN PKIDTENTRY Idt, - IN PKGDTENTRY Gdt, + IN PVOID GdtBase, IN UINT64 Stack) { PKGDTENTRY64 TssEntry; /* Initialize the TSS descriptor entry */ - TssEntry = (PVOID)((ULONG64)Gdt + KGDT_TSS); + TssEntry = (PVOID)((ULONG64)GdtBase + KGDT_TSS); TssEntry->Bits.Type = 9;//AMD64_TSS; TssEntry->Bits.Dpl = 0; TssEntry->Bits.Present = 1; Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] Sun Oct 18 16:18:42 2009 @@ -328,18 +328,17 @@ VOID NTAPI -KiInitializePcr(IN ULONG ProcessorNumber, - IN PKIPCR Pcr, - IN PKIDTENTRY Idt, - IN PKGDTENTRY Gdt, - IN PKTSS Tss, +KiInitializePcr(IN PKIPCR Pcr, + IN ULONG ProcessorNumber, IN PKTHREAD IdleThread, IN PVOID DpcStack) { + KDESCRIPTOR GdtDescriptor = {{0},0,0}, IdtDescriptor = {{0},0,0}; + KGDTENTRY64 TssSelector; + USHORT Tr = 0; + + /* Zero out the PCR */ RtlZeroMemory(Pcr, PAGE_SIZE); - - /* Set the Current Thread */ - Pcr->Prcb.CurrentThread = IdleThread; /* Set pointers to ourselves */ Pcr->Self = (PKPCR)Pcr; @@ -349,7 +348,7 @@ Pcr->MajorVersion = PCR_MAJOR_VERSION; Pcr->MinorVersion = PCR_MINOR_VERSION; - /* Set the PCRB Version */ + /* Set the PRCB Version */ Pcr->Prcb.MajorVersion = 1; Pcr->Prcb.MinorVersion = 1; @@ -366,27 +365,44 @@ Pcr->Prcb.Number = (UCHAR)ProcessorNumber; Pcr->Prcb.SetMember = 1 << ProcessorNumber; - /* Set the PRCB for this Processor */ - KiProcessorBlock[ProcessorNumber] = &Pcr->Prcb; + /* Get GDT and IDT descriptors */ + __sgdt(&GdtDescriptor.Limit); + __sidt(&IdtDescriptor.Limit); + Pcr->GdtBase = (PVOID)GdtDescriptor.Base; + Pcr->IdtBase = (PKIDTENTRY)IdtDescriptor.Base; + + /* Get TSS Selector */ + Ke386GetTr(Tr); // <- FIXME: this is ugly! + if (Tr != KGDT_TSS) Tr = KGDT_TSS; // FIXME: HACKHACK + + /* Get TSS Selector, mask it and get its GDT Entry */ + TssSelector = *(PKGDTENTRY)((ULONG_PTR)Pcr->GdtBase + (Tr & ~RPL_MASK)); + + /* Get the KTSS itself */ + Pcr->TssBase = (PKTSS)(ULONG_PTR)(TssSelector.BaseLow | + TssSelector.Bytes.BaseMiddle << 16 | + TssSelector.Bytes.BaseHigh << 24 | + (ULONG64)TssSelector.BaseUpper << 32); + + Pcr->Prcb.RspBase = Pcr->TssBase->Rsp0; + + /* Set DPC Stack */ + Pcr->Prcb.DpcStack = DpcStack; + + /* Setup the processor set */ + Pcr->Prcb.MultiThreadProcessorSet = Pcr->Prcb.SetMember; + + /* Clear DR6/7 to cleanup bootloader debugging */ + Pcr->Prcb.ProcessorState.SpecialRegisters.KernelDr6 = 0; + Pcr->Prcb.ProcessorState.SpecialRegisters.KernelDr7 = 0; + + /* Set the Current Thread */ + Pcr->Prcb.CurrentThread = IdleThread; /* Start us out at PASSIVE_LEVEL */ // Pcr->Irql = PASSIVE_LEVEL; KeSetCurrentIrql(PASSIVE_LEVEL); - /* Set the GDT, IDT, TSS and DPC Stack */ - Pcr->GdtBase = (PVOID)Gdt; - Pcr->IdtBase = Idt; - Pcr->TssBase = Tss; - Pcr->Prcb.DpcStack = DpcStack; - - Pcr->Prcb.RspBase = Tss->Rsp0; - - /* Setup the processor set */ - Pcr->Prcb.MultiThreadProcessorSet = Pcr->Prcb.SetMember; - - /* Clear DR6/7 to cleanup bootloader debugging */ - Pcr->Prcb.ProcessorState.SpecialRegisters.KernelDr6 = 0; - Pcr->Prcb.ProcessorState.SpecialRegisters.KernelDr7 = 0; } VOID @@ -601,42 +617,6 @@ } VOID -FASTCALL -KiGetMachineBootPointers(IN PKGDTENTRY *Gdt, - IN PKIDTENTRY *Idt, - IN PKIPCR *Pcr, - IN PKTSS *Tss) -{ - KDESCRIPTOR GdtDescriptor = {{0},0,0}, IdtDescriptor = {{0},0,0}; - KGDTENTRY64 TssSelector; - USHORT Tr = 0; - - /* Get GDT and IDT descriptors */ - __sgdt(&GdtDescriptor.Limit); - __sidt(&IdtDescriptor.Limit); - - /* Save IDT and GDT */ - *Gdt = (PKGDTENTRY)GdtDescriptor.Base; - *Idt = (PKIDTENTRY)IdtDescriptor.Base; - - /* Get TSS and FS Selectors */ - Ke386GetTr(Tr); - if (Tr != KGDT_TSS) Tr = KGDT_TSS; // FIXME: HACKHACK - - /* Get TSS Selector, mask it and get its GDT Entry */ - TssSelector = *(PKGDTENTRY)((ULONG_PTR)*Gdt + (Tr & ~RPL_MASK)); - - /* Get the KTSS itself */ - *Tss = (PKTSS)(ULONG_PTR)(TssSelector.BaseLow | - TssSelector.Bytes.BaseMiddle << 16 | - TssSelector.Bytes.BaseHigh << 24 | - (ULONG64)TssSelector.BaseUpper << 32); -} - -// Hack -VOID KiRosPrepareForSystemStartup(ULONG, PROS_LOADER_PARAMETER_BLOCK); - -VOID NTAPI KiSystemStartup(IN ULONG_PTR Dummy, IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock) @@ -652,21 +632,16 @@ ULONG Cpu; PKTHREAD InitialThread; ULONG64 InitialStack; - PKGDTENTRY Gdt; - PKIDTENTRY Idt; -// KIDTENTRY NmiEntry, DoubleFaultEntry; - PKTSS Tss; PKIPCR Pcr; - /* Save the loader block and get the current CPU */ + /* Save the loader block */ KeLoaderBlock = LoaderBlock; /* Get the current CPU number */ - Cpu = KeNumberProcessors; + Cpu = KeNumberProcessors++; /* Set active processors */ KeActiveProcessors |= 1 << Cpu; - KeNumberProcessors++; /* LoaderBlock initialization for Cpu 0 */ if (Cpu == 0) @@ -681,6 +656,9 @@ /* Get Pcr from loader block */ Pcr = CONTAINING_RECORD(LoaderBlock->Prcb, KIPCR, Prcb); + /* Set the PRCB for this Processor */ + KiProcessorBlock[Cpu] = &Pcr->Prcb; + /* Set GS base */ __writemsr(X86_MSR_GSBASE, (ULONG64)Pcr); __writemsr(X86_MSR_KERNEL_GSBASE, (ULONG64)Pcr); @@ -706,23 +684,14 @@ /* Set us as the current process */ InitialThread->ApcState.Process = (PVOID)LoaderBlock->Process; - /* Get GDT, IDT, PCR and TSS pointers */ - KiGetMachineBootPointers(&Gdt, &Idt, &Pcr, &Tss); - /* Initialize the PCR */ - KiInitializePcr(Cpu, - Pcr, - Idt, - Gdt, - Tss, - InitialThread, - KiDoubleFaultStack); - - /* Skip initial setup if this isn't the Boot CPU */ + KiInitializePcr(Pcr, Cpu, InitialThread, KiDoubleFaultStack); + + /* Initial setup for the boot CPU */ if (Cpu == 0) { /* Setup the TSS descriptors and entries */ - Ki386InitializeTss(Tss, Idt, Gdt, InitialStack); + Ki386InitializeTss(Pcr->TssBase, Pcr->GdtBase, InitialStack); /* Setup the IDT */ KeInitExceptions(); @@ -749,7 +718,7 @@ LoaderBlock->NtBootPathName); } - DPRINT1("Gdt = %p, Idt = %p, Pcr = %p, Tss = %p\n", Gdt, Idt, Pcr, Tss); +// DPRINT1("Gdt = %p, Idt = %p, Pcr = %p, Tss = %p\n", Gdt, Idt, Pcr, Tss); /* Initialize the Processor with HAL */ HalInitializeProcessor(Cpu, KeLoaderBlock);
15 years, 2 months
1
0
0
0
[sginsberg] 43551: - Fix error return of EnumPrinterKeyA/W, spotted by janderwald
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Oct 18 16:04:59 2009 New Revision: 43551 URL:
http://svn.reactos.org/svn/reactos?rev=43551&view=rev
Log: - Fix error return of EnumPrinterKeyA/W, spotted by janderwald Modified: trunk/reactos/dll/win32/winspool/stubs.c Modified: trunk/reactos/dll/win32/winspool/stubs.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winspool/stubs.c…
============================================================================== --- trunk/reactos/dll/win32/winspool/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/winspool/stubs.c [iso-8859-1] Sun Oct 18 16:04:59 2009 @@ -814,7 +814,7 @@ *SubkeyReturned = 0; - return 0; + return ERROR_FILE_NOT_FOUND; } /* @@ -829,7 +829,7 @@ *SubkeyReturned = 0; - return 0; + return ERROR_FILE_NOT_FOUND; } /*
15 years, 2 months
1
0
0
0
[sginsberg] 43550: Get rid of MmStats -- most of the fields weren't used anymore and we have duplicates for most of the ones that are still in use; NrTotalPages -> MmNumberOfPhysicalPages NrFreePages -> MmAvailablePages (new) Get rid of NrSystemPages. Its value was only respected in MmInitializePageList at boot, even though it got updated later. Use a local variable in MmInitializePageList instead. Fix SystemBasicInformation to use the correct variables for physical page information. Also, don't
by sginsberg@svn.reactos.org
Author: sginsberg Date: Sun Oct 18 15:55:44 2009 New Revision: 43550 URL:
http://svn.reactos.org/svn/reactos?rev=43550&view=rev
Log: Get rid of MmStats -- most of the fields weren't used anymore and we have duplicates for most of the ones that are still in use; NrTotalPages -> MmNumberOfPhysicalPages NrFreePages -> MmAvailablePages (new) Get rid of NrSystemPages. Its value was only respected in MmInitializePageList at boot, even though it got updated later. Use a local variable in MmInitializePageList instead. Fix SystemBasicInformation to use the correct variables for physical page information. Also, don't set ResidentSystemCodePage in the SystemPerformanceInformation query to some random incorrect Mm value. We don't depend this value anywhere in ReactOS currently, so just set it to 0. Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c trunk/reactos/ntoskrnl/include/internal/mm.h trunk/reactos/ntoskrnl/mm/ARM3/procsup.c trunk/reactos/ntoskrnl/mm/balance.c trunk/reactos/ntoskrnl/mm/freelist.c trunk/reactos/ntoskrnl/mm/mminit.c trunk/reactos/ntoskrnl/mm/pool.c Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Sun Oct 18 15:55:44 2009 @@ -488,9 +488,9 @@ Sbi->Reserved = 0; Sbi->TimerResolution = KeMaximumIncrement; Sbi->PageSize = PAGE_SIZE; - Sbi->NumberOfPhysicalPages = MmStats.NrTotalPages; - Sbi->LowestPhysicalPageNumber = 0; /* FIXME */ - Sbi->HighestPhysicalPageNumber = MmStats.NrTotalPages; /* FIXME */ + Sbi->NumberOfPhysicalPages = MmNumberOfPhysicalPages; + Sbi->LowestPhysicalPageNumber = MmLowestPhysicalPage; + Sbi->HighestPhysicalPageNumber = MmHighestPhysicalPage; Sbi->AllocationGranularity = MM_VIRTMEM_GRANULARITY; /* hard coded on Intel? */ Sbi->MinimumUserModeAddress = 0x10000; /* Top of 64k */ Sbi->MaximumUserModeAddress = (ULONG_PTR)MmHighestUserAddress; @@ -555,7 +555,7 @@ Spi->IoWriteOperationCount = IoWriteOperationCount; Spi->IoOtherOperationCount = IoOtherOperationCount; - Spi->AvailablePages = MmStats.NrFreePages; + Spi->AvailablePages = MmAvailablePages; /* * Add up all the used "Committed" memory + pagefile. * Not sure this is right. 8^\ @@ -570,7 +570,7 @@ * All this make Taskmgr happy but not sure it is the right numbers. * This too, fixes some of GlobalMemoryStatusEx numbers. */ - Spi->CommitLimit = MmStats.NrTotalPages + MiFreeSwapPages + MiUsedSwapPages; + Spi->CommitLimit = MmNumberOfPhysicalPages + MiFreeSwapPages + MiUsedSwapPages; Spi->PeakCommitment = 0; /* FIXME */ Spi->PageFaultCount = 0; /* FIXME */ @@ -596,7 +596,7 @@ Spi->FreeSystemPtes = 0; /* FIXME */ - Spi->ResidentSystemCodePage = MmStats.NrSystemPages; /* FIXME */ + Spi->ResidentSystemCodePage = 0; /* FIXME */ Spi->TotalSystemDriverPages = 0; /* FIXME */ Spi->TotalSystemCodePages = 0; /* FIXME */ Modified: trunk/reactos/ntoskrnl/include/internal/mm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/mm.h [iso-8859-1] Sun Oct 18 15:55:44 2009 @@ -16,6 +16,7 @@ extern ULONG MmNumberOfPhysicalPages; extern ULONG MmLowestPhysicalPage; extern ULONG MmHighestPhysicalPage; +extern ULONG MmAvailablePages; extern PVOID MmPagedPoolBase; extern ULONG MmPagedPoolSize; @@ -295,19 +296,6 @@ } VirtualMemoryData; } Data; } MEMORY_AREA, *PMEMORY_AREA; - -typedef struct -{ - ULONG NrTotalPages; - ULONG NrSystemPages; - ULONG NrUserPages; - ULONG NrFreePages; - ULONG NrDirtyPages; - ULONG NrLockedPages; - ULONG PagingRequestsInLastMinute; - ULONG PagingRequestsInLastFiveMinutes; - ULONG PagingRequestsInLastFifteenMinutes; -} MM_STATS; // // These two mappings are actually used by Windows itself, based on the ASSERTS @@ -379,7 +367,6 @@ } MMPFN, *PMMPFN; extern PMMPFN MmPfnDatabase; -extern MM_STATS MmStats; typedef struct _MM_PAGEOP { Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
============================================================================== --- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Sun Oct 18 15:55:44 2009 @@ -296,7 +296,7 @@ // Check if we have less then 16MB of Physical Memory // if ((MmSystemSize == MmSmallSystem) && - (MmStats.NrTotalPages < ((15 * 1024 * 1024) / PAGE_SIZE))) + (MmNumberOfPhysicalPages < ((15 * 1024 * 1024) / PAGE_SIZE))) { // // Always use background priority Modified: trunk/reactos/ntoskrnl/mm/balance.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/balance.c?rev=…
============================================================================== --- trunk/reactos/ntoskrnl/mm/balance.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/balance.c [iso-8859-1] Sun Oct 18 15:55:44 2009 @@ -49,10 +49,10 @@ VOID MmPrintMemoryStatistic(VOID) { - DbgPrint("MC_CACHE %d, MC_USER %d, MC_PPOOL %d, MC_NPPOOL %d, MmStats.NrFreePages %d\n", + DbgPrint("MC_CACHE %d, MC_USER %d, MC_PPOOL %d, MC_NPPOOL %d, MmAvailablePages %d\n", MiMemoryConsumers[MC_CACHE].PagesUsed, MiMemoryConsumers[MC_USER].PagesUsed, MiMemoryConsumers[MC_PPOOL].PagesUsed, MiMemoryConsumers[MC_NPPOOL].PagesUsed, - MmStats.NrFreePages); + MmAvailablePages); } VOID @@ -117,7 +117,7 @@ if (MmGetReferenceCountPage(Page) == 1) { (void)InterlockedDecrementUL(&MiMemoryConsumers[Consumer].PagesUsed); - if (IsListEmpty(&AllocationListHead) || MmStats.NrFreePages < MiMinimumAvailablePages) + if (IsListEmpty(&AllocationListHead) || MmAvailablePages < MiMinimumAvailablePages) { KeReleaseSpinLock(&AllocationListLock, OldIrql); OldIrql = KeAcquireQueuedSpinLock(LockQueuePfnLock); @@ -208,7 +208,7 @@ ULONG NrFreedPages; NTSTATUS Status; - Target = (MiMinimumAvailablePages - MmStats.NrFreePages) + MiPagesRequired; + Target = (MiMinimumAvailablePages - MmAvailablePages) + MiPagesRequired; Target = max(Target, (LONG) MiMinimumPagesPerRun); for (i = 0; i < MC_MAXIMUM && Target > 0; i++) @@ -269,7 +269,7 @@ KeBugCheck(NO_PAGES_AVAILABLE); } *AllocatedPage = Page; - if (MmStats.NrFreePages <= MiMinimumAvailablePages && + if (MmAvailablePages <= MiMinimumAvailablePages && MiBalancerThreadHandle != NULL) { KeSetEvent(&MiBalancerEvent, IO_NO_INCREMENT, FALSE); @@ -280,7 +280,7 @@ /* * Make sure we don't exceed global targets. */ - if (MmStats.NrFreePages <= MiMinimumAvailablePages) + if (MmAvailablePages <= MiMinimumAvailablePages) { MM_ALLOCATION_REQUEST Request; @@ -369,7 +369,7 @@ if (Status == STATUS_SUCCESS) { /* MiBalancerEvent */ - while (MmStats.NrFreePages < MiMinimumAvailablePages + 5) + while (MmAvailablePages < MiMinimumAvailablePages + 5) { for (i = 0; i < MC_MAXIMUM; i++) { @@ -389,7 +389,7 @@ else if (Status == STATUS_SUCCESS + 1) { /* MiBalancerTimer */ - ShouldRun = MmStats.NrFreePages < MiMinimumAvailablePages + 5 ? TRUE : FALSE; + ShouldRun = MmAvailablePages < MiMinimumAvailablePages + 5 ? TRUE : FALSE; for (i = 0; i < MC_MAXIMUM; i++) { if (MiMemoryConsumers[i].Trim != NULL) Modified: trunk/reactos/ntoskrnl/mm/freelist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/freelist.c [iso-8859-1] Sun Oct 18 15:55:44 2009 @@ -49,6 +49,8 @@ #define PPHYSICAL_PAGE PMMPFN PPHYSICAL_PAGE MmPfnDatabase; + +ULONG MmAvailablePages; /* List of pages allocated to the MC_USER Consumer */ static LIST_ENTRY UserPageListHead; @@ -249,10 +251,9 @@ if (Pfn1->Flags.Zero == 0) UnzeroedPageCount--; // - // One less free page, one more system page + // One less free page // - MmStats.NrFreePages--; - MmStats.NrSystemPages++; + MmAvailablePages--; // // This PFN is now a used page, set it up @@ -465,8 +466,7 @@ // // Decrease available pages // - MmStats.NrSystemPages++; - MmStats.NrFreePages--; + MmAvailablePages--; // // Save it into the MDL @@ -523,8 +523,7 @@ // // Decrease available pages // - MmStats.NrSystemPages++; - MmStats.NrFreePages--; + MmAvailablePages--; // // Save this page into the MDL @@ -698,6 +697,7 @@ PHYSICAL_PAGE UsedPage; PMEMORY_ALLOCATION_DESCRIPTOR Md; PLIST_ENTRY NextEntry; + ULONG NrSystemPages = 0; /* Initialize the page lists */ InitializeListHead(&UserPageListHead); @@ -746,7 +746,7 @@ InsertTailList(&FreeUnzeroedPageListHead, &MmPfnDatabase[Md->BasePage + i].ListEntry); UnzeroedPageCount++; - MmStats.NrFreePages++; + MmAvailablePages++; } } else @@ -756,7 +756,7 @@ { /* Everything else is used memory */ MmPfnDatabase[Md->BasePage + i] = UsedPage; - MmStats.NrSystemPages++; + NrSystemPages++; } } } @@ -769,13 +769,12 @@ /* Mark it as used kernel memory */ MmPfnDatabase[i] = UsedPage; - MmStats.NrSystemPages++; + NrSystemPages++; } KeInitializeEvent(&ZeroPageThreadEvent, NotificationEvent, TRUE); - DPRINT("Pages: %x %x\n", MmStats.NrFreePages, MmStats.NrSystemPages); - MmStats.NrTotalPages = MmStats.NrFreePages + MmStats.NrSystemPages + MmStats.NrUserPages; - MmInitializeBalancer(MmStats.NrFreePages, MmStats.NrSystemPages); + DPRINT("Pages: %x %x\n", MmAvailablePages, NrSystemPages); + MmInitializeBalancer(MmAvailablePages, NrSystemPages); } VOID @@ -912,8 +911,7 @@ Page->ReferenceCount--; if (Page->ReferenceCount == 0) { - MmStats.NrFreePages++; - MmStats.NrSystemPages--; + MmAvailablePages++; if (Page->Flags.Consumer == MC_USER) RemoveEntryList(&Page->ListEntry); if (Page->RmapListHead != (LONG)NULL) { @@ -1028,7 +1026,7 @@ if (IsListEmpty(&FreeUnzeroedPageListHead)) { /* Check if this allocation is for the PFN DB itself */ - if (MmStats.NrTotalPages == 0) + if (MmNumberOfPhysicalPages == 0) { ASSERT(FALSE); } @@ -1066,8 +1064,7 @@ PageDescriptor->LockCount = 0; PageDescriptor->SavedSwapEntry = SwapEntry; - MmStats.NrSystemPages++; - MmStats.NrFreePages--; + MmAvailablePages--; PfnOffset = PageDescriptor - MmPfnDatabase; if ((NeedClear) && (Consumer != MC_SYSTEM)) Modified: trunk/reactos/ntoskrnl/mm/mminit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mminit.c?rev=4…
============================================================================== --- trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/mminit.c [iso-8859-1] Sun Oct 18 15:55:44 2009 @@ -50,7 +50,6 @@ PBOOLEAN Mm64BitPhysicalAddress = FALSE; ULONG MmReadClusterSize; -MM_STATS MmStats; PMMPTE MmSharedUserDataPte; PMMSUPPORT MmKernelAddressSpace; extern KMUTANT MmSystemLoadLock; @@ -432,7 +431,7 @@ /* Setup shared user data settings that NT does as well */ ASSERT(SharedUserData->NumberOfPhysicalPages == 0); - SharedUserData->NumberOfPhysicalPages = MmStats.NrTotalPages; + SharedUserData->NumberOfPhysicalPages = MmNumberOfPhysicalPages; SharedUserData->LargePageMinimum = 0; /* For now, we assume that we're always Server */ Modified: trunk/reactos/ntoskrnl/mm/pool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/pool.c?rev=435…
============================================================================== --- trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/pool.c [iso-8859-1] Sun Oct 18 15:55:44 2009 @@ -23,7 +23,6 @@ extern ULONG MiNonPagedPoolLength; extern ULONG MmTotalPagedPoolQuota; extern ULONG MmTotalNonPagedPoolQuota; -extern MM_STATS MmStats; /* FUNCTIONS ***************************************************************/
15 years, 2 months
1
0
0
0
← Newer
1
...
31
32
33
34
35
36
37
...
65
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
60
61
62
63
64
65
Results per page:
10
25
50
100
200