]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Various fixes to TLS for MIPS.
authorJohn Baldwin <jhb@FreeBSD.org>
Fri, 12 Jun 2020 21:21:18 +0000 (21:21 +0000)
committerJohn Baldwin <jhb@FreeBSD.org>
Fri, 12 Jun 2020 21:21:18 +0000 (21:21 +0000)
commit822d2d6ac94fd32049de39edfe9ac7d596b4a09b
tree294621a1aad1d7a742924d04c58f2163f535974c
parent6fba90f20187a2ebaaa681648e630758b804a5b9
Various fixes to TLS for MIPS.

- Clear the current thread's TLS pointer on exec. Previously the TLS
  pointer (and register) remain unchanged.

- Explicitly clear the TLS pointer when new threads are created.

- Make md_tls_tcb_offset per-process instead of per-thread.

  The layout of the TLS and TCB are identical for all threads in a
  process, it is only the TLS pointer values themselves that vary by
  thread.  This also makes setting md_tls_tcb_offset in
  cpu_set_user_tls() redundant with the setting in exec_setregs(), so
  only set it in exec_setregs().

Submitted by: Alfredo Mazzinghi (1)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D24957
sys/mips/include/proc.h
sys/mips/mips/genassym.c
sys/mips/mips/pm_machdep.c
sys/mips/mips/swtch.S
sys/mips/mips/sys_machdep.c
sys/mips/mips/trap.c
sys/mips/mips/vm_machdep.c