From aaaec2ad93918f6ab73a2f9520ca3a9952d5c9a3 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Mon, 21 Mar 2022 14:26:47 +1100 Subject: [PATCH] declare memory as non-executable jic --- reaper/reaper.asm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/reaper/reaper.asm b/reaper/reaper.asm index b570481..0086a8f 100644 --- a/reaper/reaper.asm +++ b/reaper/reaper.asm @@ -1,5 +1,7 @@ -;;; Compact subhost repear program to merely wait for children to -;;; "reap" them, i.e. let them exit. +;;; This is a "repear" program that merely waits for child processes +;;; to appear and "reap" them, i.e. read their exit status to let them +;;; exit. The program allows an arbitrary first argument that is +;;; indended for identifying the reaper process. format elf64 executable entry main @@ -12,7 +14,6 @@ set: dq -1 ; all bits set ;;; siginfo_t status -- all ignored status: rept 16 { dq 0 } - status$end: ;;; A code segment @@ -67,3 +68,6 @@ clear: stosq mov rdi, rax mov rax, qword 60 syscall ; exit program + +;;; The rest of memory is not executable + segment readable writable -- 2.39.2