summaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu/os.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/cpu/os.c')
-rw-r--r--arch/sandbox/cpu/os.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c
index bb075042ad..9fbcb9ef92 100644
--- a/arch/sandbox/cpu/os.c
+++ b/arch/sandbox/cpu/os.c
@@ -146,7 +146,8 @@ void *os_malloc(size_t length)
int page_size = getpagesize();
hdr = mmap(NULL, length + page_size,
- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ PROT_READ | PROT_WRITE | PROT_EXEC,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (hdr == MAP_FAILED)
return NULL;
hdr->length = length;