On 1/22/21 9:51 AM, Jacek Caban wrote:
NtSetContextThread, unlike NtContinue, should not set nonvolatile registers.
Signed-off-by: Jacek Caban jacek@codeweavers.com
dlls/ntdll/unix/server.c | 2 +- dlls/ntdll/unix/signal_arm.c | 18 +++++++++++++----- dlls/ntdll/unix/signal_arm64.c | 20 ++++++++++++++------ dlls/ntdll/unix/signal_i386.c | 14 +++++++++++++- dlls/ntdll/unix/signal_x86_64.c | 15 ++++++++++++++- dlls/ntdll/unix/unix_private.h | 1 + 6 files changed, 56 insertions(+), 14 deletions(-)
Just to clarify—our NtSetContextThread does set nonvolatile registers, and continues to do so after this series. Is that incorrect behaviour?
Also:
diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index db09d7759da..fe581cca7b2 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -726,7 +726,7 @@ NTSTATUS WINAPI NtContinue( CONTEXT *context, BOOLEAN alertable ) status = server_select( NULL, 0, SELECT_INTERRUPTIBLE | SELECT_ALERTABLE, 0, NULL, NULL, &apc ); if (status == STATUS_USER_APC) invoke_apc( context, &apc ); }
- return NtSetContextThread( GetCurrentThread(), context );
- signal_set_cpu_context( context );
}
Would it be simpler just to move NtContinue() to signal_*.c instead?
One further question regarding this patch series / patch 0017: I assume you're also planning to also change NtContinue() to use the syscall exit code instead of set_full_cpu_context()?