From ac979af4511e1790d3fe9ad8a65beda124f21872 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 6 Feb 2019 19:22:15 +0000 Subject: [PATCH] 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 --- sys/riscv/riscv/elf_machdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,