aboutsummaryrefslogtreecommitdiff
path: root/sys/riscv/riscv/elf_machdep.c
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2019-02-06 19:22:15 +0000
committerEd Maste <emaste@FreeBSD.org>2019-02-06 19:22:15 +0000
commitac979af4511e1790d3fe9ad8a65beda124f21872 (patch)
tree4448d2e600e3ea1e8517ab50500afcec48761ca5 /sys/riscv/riscv/elf_machdep.c
parent0235d5e2839de1eccfeadecf8a5dda602f418b31 (diff)
downloadsrc-ac979af4511e1790d3fe9ad8a65beda124f21872.tar.gz
src-ac979af4511e1790d3fe9ad8a65beda124f21872.zip
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
Notes
Notes: svn path=/head/; revision=343843
Diffstat (limited to 'sys/riscv/riscv/elf_machdep.c')
-rw-r--r--sys/riscv/riscv/elf_machdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c
index 909c91c67a71..d4904b1c2cd9 100644
--- a/sys/riscv/riscv/elf_machdep.c
+++ b/sys/riscv/riscv/elf_machdep.c
@@ -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,