CS208, Monday 31 Jan 2022
Today
- Puzzles assignment questions
- Exam questions
- Function-calling in x86_64
Puzzles assignment
- What do you wish you had known when you started this assignment?
- rax, eax, ax, al, ah
- How can you tell a register holds a parameter?
- Look at examples of:
- loop
- if/else
- one-parameter / one-return
- two-parameter / one-return
- void return
- etc.
- Other questions?
Function-calling
- What's up with rbp and rsp?
- Seeing "pass-by-value" in action
- What's the difference between parameter types: char, int, long, char *, int *
- Structs as parameters
Coming up in the second half
- Linux Polkit bug, just for fun
- Debugging C and reverse engineering executables using gdb
- Buffer overflow attacks
- Memory allocation algorithms (how does malloc work?)
- Virtual memory (how can each process think it has 2^64 bytes of memory when the computer only has 2^35?) (that's 32GB, so a pretty expensive machine)
- Concurrency (and its scary implications)
- Network programming