cs140e-24win/labs/13-ss-equiv/README.md at main · dddrrreee/cs140e-24win
The entire lab (part1 + part 2) will be building a wildly useful trick for ruthlessly detecting subtle operating system mistakes. It will prove invaluable next week when we do virtual memory --- a topic that has extremely hard-to-track-down bugs if you just use "normal" testing of running programs and checking print statements and exit codes. Today you'll build the pieces for the final step on thursday. There's not much code, we build it up in small pieces, and it tests itself, so that's a nice improvement over some labs. Goals: Here you'll learn how to read and write the user-level registers from kernel mode using the ldm and stm idiom in an easy-to-test and examine way. You'll also write the code to read and write other mode registers. You'll use these as a basis for writing process and exception switching code. Two files: Test harness: 0-user-sp-lr.c. You don't have to implement anything, though you should definitely insert assertions or print statements if things act weirdly! All c
Single step equivalance checking NOTE: You can set just the cpsr mode using a register e.g., r0 via the msr assembly instruction with the _c modifier: msr cpsr_c, r0 You can see an example of where we use msr in libpi/staff-start.S prefetch_flush(r) expects a register r it can trash. Usually you want a caller-saved that isn't in use.*** For part 0: you can assume mode_get_lr_sp_asm is not called for USER mode. We'll have a seperate routine for that. Initially we were going to do today's lab in one shot, but we'll split it across two labs so that: People can check off from last week…
saved by
related reading
- The "Basics" | Putting the "You" in CPUcpu.land
- Assessing Claude Mythos Preview’s cybersecurity capabilities \ Anthropicred.anthropic.com
- Write your Own Virtual Machinejmeiners.com
- Intro - Putting the "You" in CPUcpu.land
- Writing an OS in Rustos.phil-opp.com
- /dev/null: Anti-Cheat Kernel Driverleagueoflegends.com
- The little book about OS developmentlittleosbook.github.io
- Zenbleedlock.cmpxchg8b.com
- OS 202 Class Notescs.nyu.edu
- User Mode Linux HOWTO - The Linux Kernel documentationkernel.org
- Linux in a Pixel Shader - A RISC-V Emulator for VRChatblog.pimaker.at
- The Linux Kernel Module Programming Guidesysprog21.github.io