aienux
Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.
Brought by drakestapleton
aienux / crates / aienos-artifact-tool / fixtures / p2_5 / p25wx / probe.S
| 1 | // P2-5 W^X probe: stores to its own code page. Code is mapped EL0 RX, so |
| 2 | // the store must take a permission fault and the kernel must terminate and |
| 3 | // reclaim the task. Reaching SYS_EXIT(0x57) would mean W^X was violated. |
| 4 | .text |
| 5 | .global _start |
| 6 | _start: |
| 7 | adr x9, 0f |
| 8 | 0: str x9, [x9] |
| 9 | mov x0, #0x57 |
| 10 | mov x8, #2 |
| 11 | svc #0 |
| 12 | 1: b 1b |