1761206468

This commit is contained in:
2025-10-23 02:01:08 -06:00
parent 219e53b3d8
commit b48028b96b
7 changed files with 0 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
section .text
global _start
_start:
; The sys_reboot system call has the number 169.
mov rax, 169
; Argument 1: RDI
; Linux REBOOT_MAGIC1 constant
mov rdi, 0xfee1dead
; Argument 2: RSI
; Linux REBOOT_MAGIC2 constant
mov rsi, 0x28121969
; Argument 3: RDX
; LINUX_REBOOT_CMD_HALT constant
mov rdx, 0xcdef0123
; Argument 4: R10
; Zero out the optional fourth argument.
xor r10, r10
; Call the syscall.
syscall
; The program should not reach here.
; Exit with an error code as a fallback.
mov rax, 60
mov rdi, 1
syscall