diff options
author | Ed Maste <emaste@FreeBSD.org> | 2019-02-06 19:22:15 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2019-02-06 19:22:15 +0000 |
commit | ac979af4511e1790d3fe9ad8a65beda124f21872 (patch) | |
tree | 4448d2e600e3ea1e8517ab50500afcec48761ca5 /sys/riscv/riscv/elf_machdep.c | |
parent | 0235d5e2839de1eccfeadecf8a5dda602f418b31 (diff) | |
download | src-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.c | 2 |
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, |