lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20863.43739.999287.287981@pilspetsen.it.uu.se>
Date:	Tue, 30 Apr 2013 13:28:27 +0200
From:	Mikael Pettersson <mikpe@...uu.se>
To:	"Warlich, Christof" <christof.warlich@...mens.com>
Cc:	Andi Kleen <andi@...stfloor.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: X86 fpu registers in a signal handler's ucontext

Warlich, Christof writes:
 > Andi Kleen <andi@...stfloor.org> writes:
 > > The FP registers are restored lazily, but the state for this is kept in
 > > the kernel.
 > 
 > I'm not sure if I understand "lazily" in this context: Do you mean that FP
 > registers _are_ restored within the kernel, but _not_ from a (possibly modified)
 > ucontext of a userspace signal handler? If so, do you know a reason why the GP
 > registers are so nicely restored from userspace, but not the FP registers?
 >  
 > > One easy way may be to catch the FPU exception too and clear from there?
 > 
 > Hmm - I _do_ catch SIGFPE in my userspace signal handler, but I obviously
 > can't clear the FP exceptions from there. This, together with your answer
 > so far, makes me conclude that there may be no way to achieve my goal from
 > userspace, right :-(?

Write to the fpstate ->mxcsr and ->swd fields in the sigaction handler's uc_mcontext.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ