projects
/
rrq
/
overlay-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
df3ccb2
)
declare memory as non-executable jic
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Mon, 21 Mar 2022 03:26:47 +0000
(14:26 +1100)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Mon, 21 Mar 2022 03:26:47 +0000
(14:26 +1100)
reaper/reaper.asm
patch
|
blob
|
history
diff --git
a/reaper/reaper.asm
b/reaper/reaper.asm
index b570481fecae54f9718811f2749287993fee9f49..0086a8f7ee23ad0b1c1ce032f8bb0eabdec7ef4c 100644
(file)
--- 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
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 }
;;; siginfo_t status -- all ignored
status: rept 16 { dq 0 }
-
status$end:
;;; A code segment
status$end:
;;; A code segment
@@
-67,3
+68,6
@@
clear: stosq
mov rdi, rax
mov rax, qword 60
syscall ; exit program
mov rdi, rax
mov rax, qword 60
syscall ; exit program
+
+;;; The rest of memory is not executable
+ segment readable writable