bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SSE registers in thread state


From: Samuel Thibault
Subject: Re: SSE registers in thread state
Date: Tue, 20 Jun 2023 11:24:01 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Hello,

Sergey Bugaev, le mar. 20 juin 2023 12:15:23 +0300, a ecrit:
> It seems that gnumach has grown better support for the fancier
> SSE registers in its internal state tracking (i386_fpsave_state /
> i386_xfp_save), but this doesn't seem to be exported to userland.

It enables CR4_OSFXSR, which is enough for userland to be allowed to
handle save/restore.

> (assuming gnumach does things correctly -- otherwise, after any
> context switch).

I believe it does.

> it occurred to me that as far as userland is concerned, the FPU/SEE
> thread state only consists of i386_fp_save & i386_fp_regs, and
> userland simply uses frstor to restore it when sigreturning.

That probably needs to be looked at, indeed.

> I don't know much about SSE and those registers and fxsave/fxrstor and
> xsave/xrstor, but it seems clear enough that this will result in
> string operations breaking after a thread receives a signal

AIUI the problem only happens if one uses SSE (e.g. string operations)
in the signal handler while the interrupted thread uses SSE, thus not
that common (and thus probably why we didn't notice the problem).

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]