[MIT 6.S081 Fall 2020] Lab: networking
xv6
https://pdos.csail.mit.edu/6.S081/2020/labs/net.htmlRead in Github/* kernel/e1000.c */// struct spinlock e1000_lock;struct spinlock e1000_tx_lock;struct spinlock e1000_rx_lock;/* kernel/e1000.c */void e1000_init(uint32 *xregs) { int i; // initlock(&e1000_lock, "e1000"); initlock(&e1000_tx_lock, "e1000_tx"); initlock(&e1000_rx_lock, "e1000_rx");...}/* kernel/e1000.c */int e1000_transm..
[MIT 6.S081 Fall 2020] Lab: mmap
xv6
https://pdos.csail.mit.edu/6.S081/2020/labs/mmap.htmlRead in GithubMakefile에 mmaptest를 추가한다.# MakefileUPROGS=\... $U/_mmaptest\mmap과 munmap system call에 필요한 선언과 정의들을 추가한다./* kernel/syscall.h */// System call numbers...#define SYS_mmap 22#define SYS_munmap 23/* kernel/syscall.c */...extern uint64 sys_mmap(void);extern uint64 sys_munmap(void);static uint64 (*syscalls[])(void) = {... [SYS_mma..
CVE-2024-0517 (Out of Bounds Write in V8)
1-day
보호되어 있는 글입니다.
[MIT 6.S081 Fall 2020] Lab: file system
xv6
https://pdos.csail.mit.edu/6.S081/2020/labs/fs.htmlRead in GithubLarge filesstruct dinode의 addrs에서 원래 direct block 12개, indirect block 1개였던 것을 direct block 11개, indirect block 2개로 바꿔야 하므로, NDIRECT, struct dinode, struct inode의 정의를 수정한다./* kernel/fs.h */// #define NDIRECT 12#define NDIRECT 11...// On-disk inode structurestruct dinode {... // uint addrs[NDIRECT + 1]; // Data block addresses ..
[MIT 6.S081 Fall 2020] Lab: locks
xv6
https://pdos.csail.mit.edu/6.S081/2020/labs/lock.htmlRead in GithubMemory allocatorkmem을 CPU의 개수(NCPU)만큼의 element들을 갖는 배열로 수정한다./* kernel/kalloc.c */struct { struct spinlock lock; struct run *freelist;} kmem[NCPU];CPU마다 lock name을 다르게 만들어야 하므로, kmem 구조체에 lockname을 추가한다./* kernel/kalloc.c */#define LOCKNAME_MAX 0x10struct { struct spinlock lock; char lockname[LOCKNAME_MAX]; struct ..
h0meb0dy_
'분류 전체보기' 카테고리의 글 목록 (17 Page)