interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / crates / aienos-artifact-tool / fixtures / p2_7 / p27kwrite / probe.S

20 lines · 942 bytes Raw Blame History
1// PI5-7 cut 3 kernel-write probe: AArch64 EL0, position independent, no relocations. It stores one 64-bit word
2// to a kernel address (KADDR: by default 0x2000000, inside the kernel heap of the Raspberry Pi 5 image, which is
3// 0x261000-0x4261000 and nearly all free at this point: a store that wrongly succeeded would not corrupt live
4// data, it would only show). The kernel maps its memory EL1-only in the task's table, so the store must take a
5// permission fault from EL0 (ESR_EL1.EC 0x24, WnR 1, FAR = KADDR), the task is terminated and reclaimed and the
6// kernel keeps running. Reaching SYS_EXIT(0x57) would mean the store succeeded.
7// Assemble with: as --defsym KADDR=<address> (assemble.sh does).
8 .ifndef KADDR
9 .set KADDR, 0x2000000
10 .endif
11 .text
12 .global _start
13_start:
14 ldr x9, =KADDR
15 movz x10, #0xdead
16 str x10, [x9]
17 mov x0, #0x57
18 mov x8, #2
19 svc #0
201: b 1b