CONFIG_DEBUG_SLAB causes random SIGFPE to occur in FP-using processes.
Some debugging (in ProgramCheckException()) gives: SIGFPE fpscr ea0a420b code 30006 ip eac37f0 msr 10d032 SIGFPE fpscr ea0a420b code 30006 ip f351718 msr 10d032 SIGFPE fpscr ee0a460f code 30006 ip e79e2bc msr 210d032 SIGFPE fpscr ea0a420b code 30006 ip f47b578 msr 210d032 SIGFPE fpscr ee0a460f code 30006 ip f51fc50 msr 210d032 SIGFPE fpscr ea0a420b code 30006 ip eed2474 msr 10d032 In each case, we take a SIGFPE with code FPE_FLTRES, because the FPSCR_XX bit is set and unmasked. Looks like fpscr isn't being initialised correctly?
Created attachment 99614 [details] Patch to initialise tsk->thread.fpexc_mode This fixes it but is probably the wrong thing to do since we won't now inherit from our parent. Instead, we should set it correctly for the init task at boot time.
That patch seems to just work around the problem by disabling exceptions. There's still other strangeness.
Created attachment 99623 [details] Patch to set ARCH_MIN_TASKALIGN This is the real fix -- ensure the task_struct remains aligned to 16 bytes even when redzoning is enabled.