Skip to content

Commit

Permalink
kernelbase: Send cross process notifications in FlushInstructionCache…
Browse files Browse the repository at this point in the history
… on ARM64.

(cherry picked from commit 9c6fb2b)

CW-Bug-Id: #23951
  • Loading branch information
julliard authored and Paul Gofman committed Jun 21, 2024
1 parent 069b313 commit 9d4635d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
16 changes: 16 additions & 0 deletions dlls/kernelbase/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,22 @@ BOOL WINAPI DECLSPEC_HOTPATCH FlushViewOfFile( const void *base, SIZE_T size )
}


/****************************************************************************
* FlushInstructionCache (kernelbase.@)
*/
BOOL WINAPI DECLSPEC_HOTPATCH FlushInstructionCache( HANDLE process, LPCVOID addr, SIZE_T size )
{
CROSS_PROCESS_WORK_LIST *list;

if ((list = open_cross_process_connection( process )))
{
send_cross_process_notification( list, CrossProcessFlushCache, addr, size, 0 );
close_cross_process_connection( list );
}
return set_ntstatus( NtFlushInstructionCache( process, addr, size ));
}


/***********************************************************************
* GetLargePageMinimum (kernelbase.@)
*/
Expand Down
9 changes: 0 additions & 9 deletions dlls/kernelbase/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -940,15 +940,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH DuplicateHandle( HANDLE source_process, HANDLE sou
}


/****************************************************************************
* FlushInstructionCache (kernelbase.@)
*/
BOOL WINAPI DECLSPEC_HOTPATCH FlushInstructionCache( HANDLE process, LPCVOID addr, SIZE_T size )
{
return set_ntstatus( NtFlushInstructionCache( process, addr, size ));
}


/***********************************************************************
* GetApplicationRestartSettings (kernelbase.@)
*/
Expand Down
1 change: 0 additions & 1 deletion dlls/ntdll/tests/wow64.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@ static void test_cross_process_notifications( HANDLE process, void *ptr )

FlushInstructionCache( process, addr, 0x1234 );
entry = pop_from_work_list( &list->work_list );
todo_wine_if (current_machine == IMAGE_FILE_MACHINE_ARM64)
entry = expect_cross_work_entry( list, entry, CrossProcessFlushCache, addr, 0x1234,
0xcccccccc, 0xcccccccc, 0xcccccccc, 0xcccccccc );
ok( !entry, "not at end of list\n" );
Expand Down

0 comments on commit 9d4635d

Please sign in to comment.