winehq.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
February
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
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
June 2024
----- 2025 -----
February 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
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
613 discussions
Start a n
N
ew thread
Rémi Bernon : server: Mark block as writable in mark_block_uninitialized.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 33a9097bb4dcccb9d21e4dbc7ef00f3d93bda960 URL:
https://gitlab.winehq.org/wine/wine/-/commit/33a9097bb4dcccb9d21e4dbc7ef00f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Jun 21 01:06:05 2024 +0200 server: Mark block as writable in mark_block_uninitialized. Before writing to it, it may have been marked as noaccess before in free_shared_object. --- server/object.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/object.c b/server/object.c index 3b72b576d50..36c9c60fb65 100644 --- a/server/object.c +++ b/server/object.c @@ -116,6 +116,11 @@ void mark_block_noaccess( void *ptr, size_t size ) /* mark a block of memory as uninitialized for debugging purposes */ void mark_block_uninitialized( void *ptr, size_t size ) { +#if defined(VALGRIND_MAKE_MEM_UNDEFINED) + VALGRIND_DISCARD( VALGRIND_MAKE_MEM_UNDEFINED( ptr, size )); +#elif defined(VALGRIND_MAKE_WRITABLE) + VALGRIND_DISCARD( VALGRIND_MAKE_WRITABLE( ptr, size )); +#endif memset( ptr, 0x55, size ); #if defined(VALGRIND_MAKE_MEM_UNDEFINED) VALGRIND_DISCARD( VALGRIND_MAKE_MEM_UNDEFINED( ptr, size ));
1
0
0
0
Alex Henrie : ntdll: Fix type and size of expanded strings in RtlQueryRegistryValues.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: c77a217d34a7fb64915ddae89261868172c85a6b URL:
https://gitlab.winehq.org/wine/wine/-/commit/c77a217d34a7fb64915ddae8926186…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Jun 20 23:16:19 2024 -0600 ntdll: Fix type and size of expanded strings in RtlQueryRegistryValues. --- dlls/ntdll/reg.c | 3 +-- dlls/ntdll/tests/reg.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index a70f95a6807..d39c1a34bb7 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -376,8 +376,7 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo, dst.MaximumLength = res; dst.Buffer = RtlAllocateHeap(GetProcessHeap(), 0, res * sizeof(WCHAR)); RtlExpandEnvironmentStrings_U(pEnvironment, &src, &dst, &res); - status = pQuery->QueryRoutine(pQuery->Name, pInfo->Type, dst.Buffer, - dst.Length, pContext, pQuery->EntryContext); + status = pQuery->QueryRoutine(pQuery->Name, REG_SZ, dst.Buffer, res, pContext, pQuery->EntryContext); RtlFreeHeap(GetProcessHeap(), 0, dst.Buffer); } else /* REG_MULTI_SZ */ diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 2bd77290ab9..e1ca45b9320 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -2863,7 +2863,7 @@ static struct query_reg_values_test query_reg_values_tests[] = /* DELETE deletes the value after reading it */ { {{ query_routine, RTL_QUERY_REGISTRY_DELETE, (WCHAR*)L"WindowsDrive" }}, - STATUS_SUCCESS, 1, WINE_TODO_TYPE | WINE_TODO_SIZE, REG_SZ, L"C:" + STATUS_SUCCESS, 1, 0, REG_SZ, L"C:" }, { {{ query_routine, 0, (WCHAR*)L"I don't exist", NULL, REG_SZ, (WCHAR*)L"Some default" }},
1
0
0
0
Alex Henrie : ntdll: Don't write partial strings with RTL_QUERY_REGISTRY_DIRECT.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 7dad7e87a9d08b367bc6b5416b0df7711c3e6e35 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7dad7e87a9d08b367bc6b5416b0df7…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Thu Jun 20 23:16:19 2024 -0600 ntdll: Don't write partial strings with RTL_QUERY_REGISTRY_DIRECT. The new tests revealed only one case where too-small buffers were not already being handled correctly. --- dlls/ntdll/reg.c | 3 ++- dlls/ntdll/tests/reg.c | 54 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c index 137bd63c0a8..a70f95a6807 100644 --- a/dlls/ntdll/reg.c +++ b/dlls/ntdll/reg.c @@ -327,7 +327,8 @@ static NTSTATUS RTL_ReportRegistryValue(PKEY_VALUE_FULL_INFORMATION pInfo, str->Buffer = RtlAllocateHeap(GetProcessHeap(), 0, len); str->MaximumLength = len; } - len = min(len, str->MaximumLength); + else if (str->MaximumLength < len) + return STATUS_BUFFER_TOO_SMALL; len -= sizeof(WCHAR); memcpy(str->Buffer, ((CHAR*)pInfo) + pInfo->DataOffset, len); str->Buffer[len / sizeof(WCHAR)] = 0; diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index ca30eabcb9c..2bd77290ab9 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -2624,7 +2624,8 @@ static NTSTATUS WINAPI query_routine(const WCHAR *value_name, ULONG value_type, return STATUS_SUCCESS; } -static UNICODE_STRING query_reg_values_direct_str; +static WCHAR query_reg_values_direct_str_buf[32]; +static UNICODE_STRING query_reg_values_direct_str = {0, 0, query_reg_values_direct_str_buf}; static ULONG query_reg_values_direct_int; @@ -2689,16 +2690,25 @@ static struct query_reg_values_test query_reg_values_tests[] = }, { {{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"WindowsDrive", &query_reg_values_direct_str }}, - STATUS_SUCCESS, 0, 0, REG_SZ, L"C:" + STATUS_SUCCESS, 0, 0, REG_NONE, L"C:" + }, + { + {{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"WindowsDrive", &query_reg_values_direct_str }}, + STATUS_SUCCESS, 0, 0, REG_NONE, L"\x2323", 0, 2 * sizeof(WCHAR) }, { {{ NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOEXPAND, (WCHAR*)L"WindowsDrive", &query_reg_values_direct_str }}, - STATUS_SUCCESS, 0, 0, REG_SZ, L"%SYSTEMDRIVE%" + STATUS_SUCCESS, 0, 0, REG_NONE, L"%SYSTEMDRIVE%" + }, + { + {{ NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOEXPAND, (WCHAR*)L"WindowsDrive", + &query_reg_values_direct_str }}, + STATUS_SUCCESS, 0, 0, REG_NONE, L"\x2323", 0, 2 * sizeof(WCHAR) }, { {{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"MeaningOfLife32", &query_reg_values_direct_int }}, - STATUS_SUCCESS, 0, 0, REG_DWORD, (WCHAR*)42 + STATUS_SUCCESS, 0, 0, REG_NONE, (WCHAR*)42 }, { {{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"MeaningOfLife64", &query_reg_values_direct_sized }}, @@ -2724,7 +2734,12 @@ static struct query_reg_values_test query_reg_values_tests[] = { {{ NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOEXPAND, (WCHAR*)L"CapitalsOfEurope", &query_reg_values_direct_str }}, - STATUS_SUCCESS, 0, 0, REG_SZ, L"Brussels\0Paris\0%PATH%\0", sizeof(L"Brussels\0Paris\0%PATH%\0") + STATUS_SUCCESS, 0, 0, REG_NONE, L"Brussels\0Paris\0%PATH%\0", sizeof(L"Brussels\0Paris\0%PATH%\0") + }, + { + {{ NULL, RTL_QUERY_REGISTRY_DIRECT | RTL_QUERY_REGISTRY_NOEXPAND, (WCHAR*)L"CapitalsOfEurope", + &query_reg_values_direct_str }}, + STATUS_SUCCESS, 0, 0, REG_NONE, L"\x2323", 0, 2 * sizeof(WCHAR) }, /* DIRECT with a null buffer crashes on Windows */ /* { @@ -2788,15 +2803,25 @@ static struct query_reg_values_test query_reg_values_tests[] = &query_reg_values_direct_str, REG_SZ, (WCHAR*)L"%SYSTEMDRIVE%" }}, STATUS_SUCCESS, 0, EXPECT_DEFAULT_DATA }, + { + {{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist", + &query_reg_values_direct_str, REG_SZ, (WCHAR*)L"%SYSTEMDRIVE%" }}, + STATUS_SUCCESS, 0, 0, REG_NONE, L"\x2323", 0, 2 * sizeof(WCHAR) + }, { {{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist", &query_reg_values_direct_str, REG_EXPAND_SZ, (WCHAR*)L"%SYSTEMDRIVE%" }}, - STATUS_SUCCESS, 0, WINE_TODO_SIZE | WINE_TODO_DATA, REG_EXPAND_SZ, L"C:" + STATUS_SUCCESS, 0, WINE_TODO_SIZE | WINE_TODO_DATA, REG_NONE, L"C:" + }, + { + {{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist", + &query_reg_values_direct_str, REG_EXPAND_SZ, (WCHAR*)L"%SYSTEMDRIVE%" }}, + STATUS_SUCCESS, 0, WINE_TODO_SIZE, REG_NONE, L"\x2323", 0, 2 * sizeof(WCHAR) }, /* DIRECT with a multi-string default value crashes on Windows */ /* { {{ NULL, RTL_QUERY_REGISTRY_DIRECT, (WCHAR*)L"I don't exist", - &query_reg_values_direct_str, REG_MULTI_SZ, (WCHAR*)L"A\0B\0C\0", sizeof(L"A\0B\0C\0") }}, + &query_reg_values_direct_str, REG_NONE, (WCHAR*)L"A\0B\0C\0", sizeof(L"A\0B\0C\0") }}, STATUS_SUCCESS, EXPECT_DEFAULT_DATA }, */ /* The default value is not used if it is not valid */ @@ -2871,10 +2896,6 @@ static void test_RtlQueryRegistryValues(void) L"Yellow", sizeof(L"Yellow")); ok(status == ERROR_SUCCESS, "Failed to create registry value Color: %lu\n", status); - query_reg_values_direct_str.MaximumLength = 32 * sizeof(WCHAR); - query_reg_values_direct_str.Buffer = pRtlAllocateHeap(GetProcessHeap(), 0, - query_reg_values_direct_str.MaximumLength); - for (i = 0; i < ARRAY_SIZE(query_reg_values_tests); i++) { struct query_reg_values_test *test = &query_reg_values_tests[i]; @@ -2893,9 +2914,14 @@ static void test_RtlQueryRegistryValues(void) query_routine_calls = 0; - query_reg_values_direct_str.Length = query_reg_values_direct_str.MaximumLength - sizeof(WCHAR); + query_reg_values_direct_str.MaximumLength = test->size_limit ? test->size_limit + : sizeof(query_reg_values_direct_str_buf); + if (query_reg_values_direct_str.MaximumLength >= sizeof(WCHAR)) + query_reg_values_direct_str.Length = query_reg_values_direct_str.MaximumLength - sizeof(WCHAR); + else + query_reg_values_direct_str.Length = 0; memset(query_reg_values_direct_str.Buffer, 0x23, query_reg_values_direct_str.Length); - query_reg_values_direct_str.Buffer[query_reg_values_direct_str.Length] = 0; + query_reg_values_direct_str.Buffer[query_reg_values_direct_str.Length / sizeof(WCHAR)] = 0; query_reg_values_direct_int = 1; @@ -2992,8 +3018,6 @@ static void test_RtlQueryRegistryValues(void) status = RegDeleteKeyValueW(HKEY_CURRENT_USER, L"WineTest", L"WindowsDrive"); ok(status == ERROR_FILE_NOT_FOUND, "Registry value WindowsDrive should have been deleted already\n"); - - pRtlFreeHeap(GetProcessHeap(), 0, query_reg_values_direct_str.Buffer); } START_TEST(reg)
1
0
0
0
Elizabeth Figura : ntdll: Do not fill the IOSB in NtFsControlFile() on failure.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 1dee9881e2dfe6a31692aa96aa97dabc8c9de9e2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1dee9881e2dfe6a31692aa96aa97da…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Thu Jun 13 22:26:38 2024 -0500 ntdll: Do not fill the IOSB in NtFsControlFile() on failure. --- dlls/ntdll/unix/file.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index e521dd44686..c128e8aa369 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -6225,14 +6225,12 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap } else { - io->Information = 0; status = STATUS_BUFFER_TOO_SMALL; } break; } case FSCTL_GET_REPARSE_POINT: - io->Information = 0; if (out_buffer && out_size) { FIXME("FSCTL_GET_REPARSE_POINT semi-stub\n"); @@ -6247,7 +6245,6 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap int fd, needs_close; struct stat st; - io->Information = 0; if (out_size >= sizeof(*info)) { status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL ); @@ -6273,7 +6270,7 @@ NTSTATUS WINAPI NtFsControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE ap in_buffer, in_size, out_buffer, out_size ); } - if (status != STATUS_PENDING) io->Status = status; + if (!NT_ERROR(status) && status != STATUS_PENDING) io->Status = status; return status; }
1
0
0
0
Elizabeth Figura : ntdll: Do not fill the IOSB or signal completion on failure in tape_DeviceIoControl().
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 86be09ac0bc87f081a1e8abc7f43ed3e98ffb9c2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/86be09ac0bc87f081a1e8abc7f43ed…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Fri Jun 24 20:38:02 2022 -0500 ntdll: Do not fill the IOSB or signal completion on failure in tape_DeviceIoControl(). We should never fill the IOSB or signal completion for NT_ERROR conditions. --- dlls/ntdll/unix/tape.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/ntdll/unix/tape.c b/dlls/ntdll/unix/tape.c index 48807dbca7a..f513e558898 100644 --- a/dlls/ntdll/unix/tape.c +++ b/dlls/ntdll/unix/tape.c @@ -528,9 +528,8 @@ NTSTATUS tape_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc, TRACE( "%p %s %p %d %p %d %p\n", device, io2str(code), in_buffer, in_size, out_buffer, out_size, io ); - io->Information = 0; - - if ((status = server_get_unix_fd( device, 0, &fd, &needs_close, NULL, NULL ))) goto error; + if ((status = server_get_unix_fd( device, 0, &fd, &needs_close, NULL, NULL ))) + return status; switch (code) { @@ -580,9 +579,11 @@ NTSTATUS tape_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc, if (needs_close) close( fd ); -error: - io->Status = status; - io->Information = sz; - if (event) NtSetEvent( event, NULL ); + if (!NT_ERROR(status)) + { + io->Status = status; + io->Information = sz; + if (event) NtSetEvent( event, NULL ); + } return status; }
1
0
0
0
Elizabeth Figura : ntdll: Do not fill the IOSB or signal completion on failure in serial_DeviceIoControl().
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 98b99b65690bbe7779ed01352f757c41dd9e8a34 URL:
https://gitlab.winehq.org/wine/wine/-/commit/98b99b65690bbe7779ed01352f757c…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Fri Jun 24 20:37:32 2022 -0500 ntdll: Do not fill the IOSB or signal completion on failure in serial_DeviceIoControl(). We should never fill the IOSB or signal completion for NT_ERROR conditions. --- dlls/ntdll/unix/serial.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/dlls/ntdll/unix/serial.c b/dlls/ntdll/unix/serial.c index ea9931d891a..a8abee6eeb6 100644 --- a/dlls/ntdll/unix/serial.c +++ b/dlls/ntdll/unix/serial.c @@ -1261,14 +1261,12 @@ NTSTATUS serial_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE ap return STATUS_NOT_SUPPORTED; } - io->Information = 0; - - if ((status = server_get_unix_fd( device, access, &fd, &needs_close, &type, NULL ))) goto error; + if ((status = server_get_unix_fd( device, access, &fd, &needs_close, &type, NULL ))) + return status; if (type != FD_TYPE_SERIAL) { if (needs_close) close( fd ); - status = STATUS_OBJECT_TYPE_MISMATCH; - goto error; + return STATUS_OBJECT_TYPE_MISMATCH; } switch (code) @@ -1455,11 +1453,15 @@ NTSTATUS serial_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE ap status = STATUS_INVALID_PARAMETER; break; } + if (needs_close) close( fd ); - error: - io->Status = status; - io->Information = sz; - if (event) NtSetEvent(event, NULL); + + if (!NT_ERROR(status)) + { + io->Status = status; + io->Information = sz; + if (event) NtSetEvent(event, NULL); + } return status; }
1
0
0
0
Elizabeth Figura : ntdll: Do not fill the IOSB or signal completion on failure in cdrom_DeviceIoControl().
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 5f76f07bff03dc80453cf742be1fe23781c12d92 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5f76f07bff03dc80453cf742be1fe2…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Fri Jun 24 20:36:30 2022 -0500 ntdll: Do not fill the IOSB or signal completion on failure in cdrom_DeviceIoControl(). Synchronous NT_ERROR conditions should not touch the IOSB or signal completion. --- dlls/ntdll/unix/cdrom.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/dlls/ntdll/unix/cdrom.c b/dlls/ntdll/unix/cdrom.c index 45b61d54d05..427e559968f 100644 --- a/dlls/ntdll/unix/cdrom.c +++ b/dlls/ntdll/unix/cdrom.c @@ -2822,18 +2822,13 @@ NTSTATUS cdrom_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc TRACE( "%p %s %p %d %p %d %p\n", device, iocodex(code), in_buffer, in_size, out_buffer, out_size, io ); - io->Information = 0; - if ((status = server_get_unix_fd( device, 0, &fd, &needs_close, NULL, NULL ))) - { - if (status == STATUS_BAD_DEVICE_TYPE) return status; /* no associated fd */ - goto error; - } + return status; if ((status = CDROM_Open(fd, &dev))) { if (needs_close) close( fd ); - goto error; + return status; } #ifdef __APPLE__ @@ -2847,16 +2842,13 @@ NTSTATUS cdrom_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc * Also for some reason it wants the fd to be closed before we even * open the parent if we're trying to eject the disk. */ - if ((status = get_parent_device( fd, name, sizeof(name) ))) goto error; + if ((status = get_parent_device( fd, name, sizeof(name) ))) return status; if (code == IOCTL_STORAGE_EJECT_MEDIA) NtClose( device ); if (needs_close) close( fd ); TRACE("opening parent %s\n", name ); if ((fd = open( name, O_RDONLY )) == -1) - { - status = errno_to_status( errno ); - goto error; - } + return errno_to_status( errno ); needs_close = 1; } #endif @@ -3117,13 +3109,14 @@ NTSTATUS cdrom_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc break; default: - if (needs_close) close( fd ); - return STATUS_NOT_SUPPORTED; + status = STATUS_NOT_SUPPORTED; } if (needs_close) close( fd ); - error: - io->Status = status; - io->Information = sz; - if (event) NtSetEvent(event, NULL); + if (!NT_ERROR(status)) + { + io->Status = status; + io->Information = sz; + if (event) NtSetEvent(event, NULL); + } return status; }
1
0
0
0
Elizabeth Figura : ntdll: Remove the redundant filling of the IOSB in NtDeviceIoControlFile().
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 0e928ccaea0c03da28fca2d7356402c6c2357cc9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0e928ccaea0c03da28fca2d7356402…
Author: Elizabeth Figura <zfigura(a)codeweavers.com> Date: Mon Jul 25 19:13:31 2022 -0500 ntdll: Remove the redundant filling of the IOSB in NtDeviceIoControlFile(). --- dlls/ntdll/unix/file.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c index 429f8839ed2..e521dd44686 100644 --- a/dlls/ntdll/unix/file.c +++ b/dlls/ntdll/unix/file.c @@ -6120,7 +6120,6 @@ NTSTATUS WINAPI NtDeviceIoControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUT case FILE_DEVICE_BEEP: case FILE_DEVICE_NETWORK: status = sock_ioctl( handle, event, apc, apc_context, io, code, in_buffer, in_size, out_buffer, out_size ); - if (status != STATUS_NOT_SUPPORTED && status != STATUS_BAD_DEVICE_TYPE) return status; break; case FILE_DEVICE_DISK: case FILE_DEVICE_CD_ROM: @@ -6143,8 +6142,6 @@ NTSTATUS WINAPI NtDeviceIoControlFile( HANDLE handle, HANDLE event, PIO_APC_ROUT if (status == STATUS_NOT_SUPPORTED || status == STATUS_BAD_DEVICE_TYPE) return server_ioctl_file( handle, event, apc, apc_context, io, code, in_buffer, in_size, out_buffer, out_size ); - - if (status != STATUS_PENDING && !NT_ERROR(status)) io->Status = status; return status; }
1
0
0
0
Alexandre Julliard : ntdll: Move the IP string conversion functions to rtlstr.c.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: b2017a48dcb7fca3c0436a7f178649655f91de04 URL:
https://gitlab.winehq.org/wine/wine/-/commit/b2017a48dcb7fca3c0436a7f178649…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 21 11:33:58 2024 +0200 ntdll: Move the IP string conversion functions to rtlstr.c. --- dlls/ntdll/rtl.c | 641 ---------------------------------------------------- dlls/ntdll/rtlstr.c | 605 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 605 insertions(+), 641 deletions(-)
1
0
0
0
Alexandre Julliard : ntdll: Move RtlIsProcessorFeaturePresent implementation to the CPU backends.
by Alexandre Julliard
21 Jun '24
21 Jun '24
Module: wine Branch: master Commit: 0051e102cccee6fd461474324e32da947a9fb963 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0051e102cccee6fd461474324e32da…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 21 11:16:57 2024 +0200 ntdll: Move RtlIsProcessorFeaturePresent implementation to the CPU backends. --- dlls/ntdll/rtl.c | 35 ----------------------------------- dlls/ntdll/signal_arm.c | 9 +++++++++ dlls/ntdll/signal_arm64.c | 30 ++++++++++++++++++++++++++++++ dlls/ntdll/signal_arm64ec.c | 10 ++++++++++ dlls/ntdll/signal_i386.c | 9 +++++++++ dlls/ntdll/signal_x86_64.c | 10 ++++++++++ 6 files changed, 68 insertions(+), 35 deletions(-) diff --git a/dlls/ntdll/rtl.c b/dlls/ntdll/rtl.c index 1288b57f11c..3dff04e52c9 100644 --- a/dlls/ntdll/rtl.c +++ b/dlls/ntdll/rtl.c @@ -34,7 +34,6 @@ #include "wine/exception.h" #include "ntdll_misc.h" #include "in6addr.h" -#include "ddk/ntddk.h" #include "ddk/ntifs.h" WINE_DEFAULT_DEBUG_CHANNEL(ntdll); @@ -1421,40 +1420,6 @@ void WINAPI RtlGetCurrentProcessorNumberEx(PROCESSOR_NUMBER *processor) processor->Reserved = 0; } -/*********************************************************************** - * RtlIsProcessorFeaturePresent [NTDLL.@] - */ -BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) -{ -#ifdef __aarch64__ - static const ULONGLONG arm64_features = - (1ull << PF_COMPARE_EXCHANGE_DOUBLE) | - (1ull << PF_NX_ENABLED) | - (1ull << PF_ARM_VFP_32_REGISTERS_AVAILABLE) | - (1ull << PF_ARM_NEON_INSTRUCTIONS_AVAILABLE) | - (1ull << PF_SECOND_LEVEL_ADDRESS_TRANSLATION) | - (1ull << PF_FASTFAIL_AVAILABLE) | - (1ull << PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE) | - (1ull << PF_ARM_64BIT_LOADSTORE_ATOMIC) | - (1ull << PF_ARM_EXTERNAL_CACHE_AVAILABLE) | - (1ull << PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE) | - (1ull << PF_ARM_V8_INSTRUCTIONS_AVAILABLE) | - (1ull << PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) | - (1ull << PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) | - (1ull << PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE) | - (1ull << PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE) | - (1ull << PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE) | - (1ull << PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE); - - return (feature < PROCESSOR_FEATURE_MAX && (arm64_features & (1ull << feature)) && - user_shared_data->ProcessorFeatures[feature]); -#elif defined _WIN64 - return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature]; -#else - return NtWow64IsProcessorFeaturePresent( feature ); -#endif -} - /*********************************************************************** * RtlInitializeGenericTableAvl (NTDLL.@) */ diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c index aeed022d78f..595eb71a81e 100644 --- a/dlls/ntdll/signal_arm.c +++ b/dlls/ntdll/signal_arm.c @@ -566,6 +566,15 @@ NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, } +/*********************************************************************** + * RtlIsProcessorFeaturePresent [NTDLL.@] + */ +BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) +{ + return NtWow64IsProcessorFeaturePresent( feature ); +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */ diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c index 8b4fea80bb6..0531083ba4e 100644 --- a/dlls/ntdll/signal_arm64.c +++ b/dlls/ntdll/signal_arm64.c @@ -31,6 +31,7 @@ #define WIN32_NO_STATUS #include "windef.h" #include "winternl.h" +#include "ddk/wdm.h" #include "wine/exception.h" #include "ntdll_misc.h" #include "wine/debug.h" @@ -600,6 +601,35 @@ NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, } +/*********************************************************************** + * RtlIsProcessorFeaturePresent [NTDLL.@] + */ +BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) +{ + static const ULONGLONG arm64_features = + (1ull << PF_COMPARE_EXCHANGE_DOUBLE) | + (1ull << PF_NX_ENABLED) | + (1ull << PF_ARM_VFP_32_REGISTERS_AVAILABLE) | + (1ull << PF_ARM_NEON_INSTRUCTIONS_AVAILABLE) | + (1ull << PF_SECOND_LEVEL_ADDRESS_TRANSLATION) | + (1ull << PF_FASTFAIL_AVAILABLE) | + (1ull << PF_ARM_DIVIDE_INSTRUCTION_AVAILABLE) | + (1ull << PF_ARM_64BIT_LOADSTORE_ATOMIC) | + (1ull << PF_ARM_EXTERNAL_CACHE_AVAILABLE) | + (1ull << PF_ARM_FMAC_INSTRUCTIONS_AVAILABLE) | + (1ull << PF_ARM_V8_INSTRUCTIONS_AVAILABLE) | + (1ull << PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) | + (1ull << PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) | + (1ull << PF_ARM_V81_ATOMIC_INSTRUCTIONS_AVAILABLE) | + (1ull << PF_ARM_V82_DP_INSTRUCTIONS_AVAILABLE) | + (1ull << PF_ARM_V83_JSCVT_INSTRUCTIONS_AVAILABLE) | + (1ull << PF_ARM_V83_LRCPC_INSTRUCTIONS_AVAILABLE); + + return (feature < PROCESSOR_FEATURE_MAX && (arm64_features & (1ull << feature)) && + user_shared_data->ProcessorFeatures[feature]); +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */ diff --git a/dlls/ntdll/signal_arm64ec.c b/dlls/ntdll/signal_arm64ec.c index 9fde2a4a715..44b026fc044 100644 --- a/dlls/ntdll/signal_arm64ec.c +++ b/dlls/ntdll/signal_arm64ec.c @@ -28,6 +28,7 @@ #define WIN32_NO_STATUS #include "windef.h" #include "winternl.h" +#include "ddk/wdm.h" #include "wine/exception.h" #include "wine/list.h" #include "ntdll_misc.h" @@ -1204,6 +1205,15 @@ NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, } +/*********************************************************************** + * RtlIsProcessorFeaturePresent [NTDLL.@] + */ +BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) +{ + return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature]; +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */ diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index a6c47f1226b..8f11d19024b 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -461,6 +461,15 @@ NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, } +/*********************************************************************** + * RtlIsProcessorFeaturePresent [NTDLL.@] + */ +BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) +{ + return NtWow64IsProcessorFeaturePresent( feature ); +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */ diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index f491f07282e..0daf27f6850 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -32,6 +32,7 @@ #define WIN32_NO_STATUS #include "windef.h" #include "winternl.h" +#include "ddk/wdm.h" #include "wine/exception.h" #include "wine/list.h" #include "ntdll_misc.h" @@ -802,6 +803,15 @@ NTSTATUS WINAPI RtlGetNativeSystemInformation( SYSTEM_INFORMATION_CLASS class, } +/*********************************************************************** + * RtlIsProcessorFeaturePresent [NTDLL.@] + */ +BOOLEAN WINAPI RtlIsProcessorFeaturePresent( UINT feature ) +{ + return feature < PROCESSOR_FEATURE_MAX && user_shared_data->ProcessorFeatures[feature]; +} + + /************************************************************************* * RtlWalkFrameChain (NTDLL.@) */
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
62
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
Results per page:
10
25
50
100
200