From owner-svn-src-stable-11@freebsd.org Fri Aug 11 07:29:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0E245DC848C; Fri, 11 Aug 2017 07:29:52 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB929647A3; Fri, 11 Aug 2017 07:29:51 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v7B7ToTl049572; Fri, 11 Aug 2017 07:29:50 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v7B7ToBI049571; Fri, 11 Aug 2017 07:29:50 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201708110729.v7B7ToBI049571@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Fri, 11 Aug 2017 07:29:50 +0000 (UTC) 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 X-SVN-Group: stable-11 X-SVN-Commit-Author: ed X-SVN-Commit-Paths: stable/11/sys/amd64/cloudabi64 X-SVN-Commit-Revision: 322394 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2017 07:29:52 -0000 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,