mirror of
https://github.com/SmallPond/MIT6.828_OS.git
synced 2026-04-29 21:31:05 +08:00
LAB 4 IS DONE.
This commit is contained in:
12
lab/user/evilhello.c
Normal file
12
lab/user/evilhello.c
Normal file
@@ -0,0 +1,12 @@
|
||||
// evil hello world -- kernel pointer passed to kernel
|
||||
// kernel should destroy user environment in response
|
||||
|
||||
#include <inc/lib.h>
|
||||
|
||||
void
|
||||
umain(int argc, char **argv)
|
||||
{
|
||||
// try to print the kernel entry point as a string! mua ha ha!
|
||||
sys_cputs((char*)0xf010000c, 100);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user