[Bug 51996] aarch64: NtGetContextThread/NtSetContextThread on another thread ignores FPU state due to buggy SIGUSR1 handler

WineHQ Bugzilla wine-bugs at winehq.org
Mon Nov 8 05:52:30 CST 2021


https://bugs.winehq.org/show_bug.cgi?id=51996

--- Comment #3 from Jinoh Kang <jinoh.kang.kr at gmail.com> ---
(In reply to Zebediah Figura from comment #2)
> (In reply to Jinoh Kang from comment #1)
> > IMHO a dedicated signal handler on SIGUSR2 to restore full context (used in
> > NtContinue etc.) seems excessive to me. Is there any state on AArch64 that
> > cannot be restored in user mode and may only be modified kernel side?
> 
> Yes. As far as we're aware, it's impossible to restore the *whole* context
> simultaneously, without using privileged instructions like ERET. You need to
> scratch a register to set the instruction pointer.

Thank you for explaining.  Looks like it, and also the stack pointer.
Thankfully FPU has nothing to do with this.

Any chance we would be using sigreturn() directly, though?  On select known
platforms with stable syscall ABI, of course.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list