Re: accessing stacked FPU state in 32-bit SIGFPE handler?

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

 



From: Mikael Pettersson <mikpelinux@xxxxxxxxx>
Date: Sat, 7 May 2016 17:50:32 +0200

> What is the approved way of accessing the stacked FPU state from a
> SIGFPE handler (sigaction + SA_SIGINFO) in a 32-bit process?  I need
> to update parts of that state.
> 
> The third parameter to the handler is a sigcontext pointer, but the
> struct ends just before the stacked fpu_save pointer.  Also, the type
> that fpu_save points to doesn't appear to be defined by glibc's headers.
> 
> I could duplicate the kernel's types (32-bit __siginfo_fpu_t and struct
> rt_signal_frame), but that feels a bit unsafe unless there's a statement
> that they form a de-facto ABI.

You can be sure the on-stack signal saved state layout won't change,
otherwise gdb, exception unwinding, and a host of other things would
break.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux