aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/cloudabi64
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2017-08-02 13:08:10 +0000
committerEd Schouten <ed@FreeBSD.org>2017-08-02 13:08:10 +0000
commitc8528475849c32e97b829de851ba00f094848e02 (patch)
tree23d2e2544dcb151956e498a019b2b43855b1b898 /sys/amd64/cloudabi64
parenteb4db65b1875426ece02ec6dd68ea3b34adc81d1 (diff)
downloadsrc-c8528475849c32e97b829de851ba00f094848e02.tar.gz
src-c8528475849c32e97b829de851ba00f094848e02.zip
Keep top page on CloudABI to work around AMD Ryzen stability issues.
Similar to r321899, reduce sv_maxuser by one page inside of CloudABI. This ensures that the stack, the vDSO and any allocations cannot touch the top page of user virtual memory. Considering that CloudABI userspace is completely oblivious to virtual memory layout, don't bother making this conditional based on the CPU of the running system. Reviewed by: kib, truckman Differential Revision: https://reviews.freebsd.org/D11808
Notes
Notes: svn path=/head/; revision=321924
Diffstat (limited to 'sys/amd64/cloudabi64')
-rw-r--r--sys/amd64/cloudabi64/cloudabi64_sysvec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/amd64/cloudabi64/cloudabi64_sysvec.c b/sys/amd64/cloudabi64/cloudabi64_sysvec.c
index 679888bf52ad..90c10a558732 100644
--- a/sys/amd64/cloudabi64/cloudabi64_sysvec.c
+++ b/sys/amd64/cloudabi64/cloudabi64_sysvec.c
@@ -199,7 +199,8 @@ static struct sysentvec cloudabi64_elf_sysvec = {
.sv_coredump = elf64_coredump,
.sv_pagesize = PAGE_SIZE,
.sv_minuser = VM_MIN_ADDRESS,
- .sv_maxuser = VM_MAXUSER_ADDRESS,
+ /* Keep top page reserved to work around AMD Ryzen stability issues. */
+ .sv_maxuser = VM_MAXUSER_ADDRESS - PAGE_SIZE,
.sv_stackprot = VM_PROT_READ | VM_PROT_WRITE,
.sv_copyout_strings = cloudabi64_copyout_strings,
.sv_setregs = cloudabi64_proc_setregs,