freebsd-skq/sys
Wojciech Macek 054a090d49 PPC64: fix TOC behavior on process initialization
Set stack pointer to correct value after thread's stack pointer restore

Restoring new thread's stack pointer caused stack corruption because
restored stack pointer didn't point to callee (cpu_switch) stack frame but
caller stack frame.

As a result we had mysterious errors in caller function (sched_switch).

Solution: simply set stack pointer to correct value

Also, initialize TOC to a valid pointer once the thread is being
created.

Created by:            Patryk Duda <pdk@semihalf.com>
Submitted by:          Wojciech Macek <wma@semihalf.com>
Obtained from:         Semihalf
Reviewed by:           nwhitehorn
Differential revision: https://reviews.freebsd.org/D13947
Sponsored by:          QCM Technologies
2018-01-18 07:42:51 +00:00
..
amd64 Save and restore guest debug registers. 2018-01-17 23:11:25 +00:00
arm arm: make some use of mallocarray(9). 2018-01-15 21:09:58 +00:00
arm64 arm: make some use of mallocarray(9). 2018-01-15 21:09:58 +00:00
bsm sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cam SPDX: finish tagging sys/cam. 2018-01-16 23:19:57 +00:00
cddl Use the thread's ucred struct when fetching jid or jailname. 2018-01-14 17:55:40 +00:00
compat ndis: make some use of mallocarray(9). 2018-01-15 21:11:38 +00:00
conf Use ln -n instead of -h to allow building the kernel on Linux 2018-01-16 21:43:57 +00:00
contrib libfdt: Update to 1.4.6, switch to using libfdt for overlay support 2018-01-18 04:39:09 +00:00
crypto Revert r327340, as the workaround for rep prefixes followed by .byte 2018-01-17 17:14:19 +00:00
ddb Implement 'domainset', a cpuset based NUMA policy mechanism. This allows 2018-01-12 22:48:23 +00:00
dev bwn(4): Enable, by default, the opt-in support for bhnd(4) introduced in 2018-01-17 22:33:19 +00:00
dts Add a rudimentary PWM driver for the RaspberryPi. 2018-01-14 20:36:21 +00:00
fs Use long for the last argument to VOP_PATHCONF rather than a register_t. 2018-01-17 22:36:58 +00:00
gdb sys/gdb: further adoption of SPDX licensing ID tags. 2017-11-27 15:16:59 +00:00
geom gnop(8): add the ability to set a nop provider's physical path 2018-01-18 05:57:10 +00:00
gnu misc geom and gnu: make some use of mallocarray(9). 2018-01-15 21:23:16 +00:00
i386 Use long for the last argument to VOP_PATHCONF rather than a register_t. 2018-01-17 22:36:58 +00:00
isa On further testing on actual machines with this hardware, we should 2017-12-30 08:16:31 +00:00
kern KDB: restart only CPUs stopped by KDB 2018-01-18 07:38:54 +00:00
kgssapi sys/kgssapi: general adoption of SPDX licensing ID tags. 2017-11-27 15:49:00 +00:00
libkern SPDX: fix wrong license ID tag in libkern. 2017-12-28 01:20:30 +00:00
mips Fix build after r328020. 2018-01-16 06:04:39 +00:00
modules Add a rudimentary PWM driver for the RaspberryPi. 2018-01-14 20:36:21 +00:00
net net*: make some use of mallocarray(9). 2018-01-15 21:21:51 +00:00
net80211 net80211: sanitize input for ieee80211_output() 2017-12-30 00:40:34 +00:00
netgraph netgraph: make some use of mallocarray(9). 2018-01-15 21:19:21 +00:00
netinet Fix a bug related to fast retransmissions. 2018-01-16 21:58:38 +00:00
netinet6 net*: make some use of mallocarray(9). 2018-01-15 21:21:51 +00:00
netipsec Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
netpfil Implement 'domainset', a cpuset based NUMA policy mechanism. This allows 2018-01-12 22:48:23 +00:00
netsmb sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfs Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
nfsclient sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
ofed sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
opencrypto Split crp_buf into a union. 2018-01-16 19:41:18 +00:00
powerpc PPC64: fix TOC behavior on process initialization 2018-01-18 07:42:51 +00:00
riscv Implement NUMA support in uma(9) and malloc(9). Allocations from specific 2018-01-12 23:25:05 +00:00
rpc Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
security Do pass removing some write-only variables from the kernel. 2017-12-25 04:48:39 +00:00
sparc64 Implement NUMA support in uma(9) and malloc(9). Allocations from specific 2018-01-12 23:25:05 +00:00
sys Use long for the last argument to VOP_PATHCONF rather than a register_t. 2018-01-17 22:36:58 +00:00
teken sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
tests
tools embed_mfs: correctly test grep return value 2018-01-03 19:22:10 +00:00
ufs ufs: use mallocarray(9). 2018-01-17 18:18:33 +00:00
vm Move VM_NUMA_ALLOC and DEVICE_NUMA under the single global config option NUMA. 2018-01-14 03:36:03 +00:00
x86 PTI for amd64. 2018-01-17 11:44:21 +00:00
xdr sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
xen sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
Makefile Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00