svn commit: r343843 - head/sys/riscv/riscv
Ed Maste
emaste at FreeBSD.org
Wed Feb 6 19:22:16 UTC 2019
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,
More information about the svn-src-all
mailing list