[Bug 234539] [PowerPC64] panic: FPU already enabled for thread

[email protected]
Newsgroups gmane.os.freebsd.devel.ppc
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234539

--- Comment #5 from [email protected] ---
A commit references this bug:

Author: luporl
Date: Thu Feb 14 15:15:32 UTC 2019
New revision: 344123
URL: https://svnweb.freebsd.org/changeset/base/344123

Log:
  [PPC64] Fix mismatch between thread flags and MSR

  When sigreturn() restored a thread's context, SRR1 was being restored
  to its previous value, but pcb_flags was not being touched.

  This could cause a mismatch between the thread's MSR and its pcb_flags.
  For instance, when the thread used the FPU for the first time inside
  the signal handler, sigreturn() would clear SRR1, but not pcb_flags.
  Then, the thread would return with the FPU bit cleared in MSR and,
  the next time it tried to use the FPU, it would fail on a KASSERT
  that checked if the FPU was disabled.

  This change clears the FPU bit in both pcb_flags and frame->srr1,
  as the code that restores the context expects to use the FPU trap
  to re-enable it.

  PR:           234539
  Reported by:  sbruno
  Reviewed by:  jhibbits, sbruno
  Differential Revision:        https://reviews.freebsd.org/D19166

Changes:
  head/sys/powerpc/powerpc/exec_machdep.c

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.