Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Aug 2017 07:29:50 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r322394 - stable/11/sys/amd64/cloudabi64
Message-ID:  <201708110729.v7B7ToBI049571@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Fri Aug 11 07:29:50 2017
New Revision: 322394
URL: https://svnweb.freebsd.org/changeset/base/322394

Log:
  MFC r321924:
  
    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.

Modified:
  stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c
==============================================================================
--- stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c	Fri Aug 11 07:27:55 2017	(r322393)
+++ stable/11/sys/amd64/cloudabi64/cloudabi64_sysvec.c	Fri Aug 11 07:29:50 2017	(r322394)
@@ -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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201708110729.v7B7ToBI049571>