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] [day] [month] [year] [list]
Date:	Wed, 29 Aug 2007 15:13:22 -0400
From:	Chuck Ebbert <cebbert@...hat.com>
To:	Clark Cooper <clark.cooper@...il.com>
CC:	linux-kernel@...r.kernel.org
Subject: Re: PROBLEM: Caught SIGFPE exceptions aren't reset

On 08/25/2007 01:31 PM, Clark Cooper wrote:
>> Your handler can do this by masking
>>  exceptions, changing the operands of the failed FP instruction,
>> or by changing the PC so that the failed instruction is skipped
>> (your handler may want to emulate the instruction in this case).
> 
> Given the current SIGFPE handling in the kernel, a userland handler
> CAN'T mask the exceptions or clear the exception flags. This is
> demonstrated in my example program where I call both feclearexception
> and fedisableexception in the handler. The reason these don't work is
> that any change you make to these FPU registers is overwritten with
> the saved FPU context on return from the signal handler. Changing the
> PC won't help since the exception flag is still set and unmasked on
> signal return.

Just change the saved FPU context before returning. (It's on the stack
when your handler is running.)
-
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