Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Feb 2019 19:22:15 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343843 - head/sys/riscv/riscv
Message-ID:  <201902061922.x16JMFt8050314@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Wed Feb  6 19:22:15 2019
New Revision: 343843
URL: https://svnweb.freebsd.org/changeset/base/343843

Log:
  riscv: default to non-executable stack
  
  There's no need to worry about potential backwards compatibility issues
  in a brand-new architecture, so avoid stack PROT_EXEC as with arm64.
  
  Discussed with:	br

Modified:
  head/sys/riscv/riscv/elf_machdep.c

Modified: head/sys/riscv/riscv/elf_machdep.c
==============================================================================
--- head/sys/riscv/riscv/elf_machdep.c	Wed Feb  6 18:50:48 2019	(r343842)
+++ head/sys/riscv/riscv/elf_machdep.c	Wed Feb  6 19:22:15 2019	(r343843)
@@ -77,7 +77,7 @@ struct sysentvec elf64_freebsd_sysvec = {
 	.sv_maxuser	= VM_MAXUSER_ADDRESS,
 	.sv_usrstack	= USRSTACK,
 	.sv_psstrings	= PS_STRINGS,
-	.sv_stackprot	= VM_PROT_ALL,
+	.sv_stackprot	= VM_PROT_READ | VM_PROT_WRITE,
 	.sv_copyout_strings	= exec_copyout_strings,
 	.sv_setregs	= exec_setregs,
 	.sv_fixlimit	= NULL,



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