svn commit: r321924 - head/sys/amd64/cloudabi64
Ed Schouten
ed at FreeBSD.org
Wed Aug 2 13:08:11 UTC 2017
Author: ed
Date: Wed Aug 2 13:08:10 2017
New Revision: 321924
URL: https://svnweb.freebsd.org/changeset/base/321924
Log:
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
Modified:
head/sys/amd64/cloudabi64/cloudabi64_sysvec.c
Modified: head/sys/amd64/cloudabi64/cloudabi64_sysvec.c
==============================================================================
--- head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 12:31:03 2017 (r321923)
+++ head/sys/amd64/cloudabi64/cloudabi64_sysvec.c Wed Aug 2 13:08:10 2017 (r321924)
@@ -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,
More information about the svn-src-all
mailing list