- C Books
- The C Programming Language (2nd edition) Kernighan, Ritchie, awesome and useful book on C programming, written by the guys who invented it.
- Advanced Programming in the UNIX Environment (2nd Edition) Stevens, Rago, the absolute bible on C programming in the Unix environment
- Expert C Programming Peter Van der Linden, a great book on advanced C programming
- C Links
- Some Linux kernel programming rules, extracted from my
experiences hacking the Linux kernel and finding bugs in it.
- Never call a blocking function (e.g. a function that may call sched()) with interrupt disabled or spin_lock held, or you risk deadlock. A typical mistake is to assume kmalloc() never blocks; it can. You need the GFP_ATOMIC flag for a non-blocking kmalloc().
- Never directly dereference a user-provided pointer in kernel; use "paranoid" functions (e.g. copy_from_user) to access them instead.
- Memory allocation can fail, so you must carefully check the returns of *alloc() functions against NULL.
- Don't simply call panic() for trivial errors, because panic() panics your entire kernel! A particular bad thing to do is to panic() whenever kmalloc() returns NULL.
- When you return from a function due to an error (e.g. kmalloc() returns NULL), don't forget to release resources (e.g. spin_lock, allocated memory) you've acquired.
- Building the Linux kernel
- Debugging the Linux kernel
- Understanding the Linux kernel
- More about Linux
- Linux News
VMWare, Remote Access, etc
Check out Prof. Nieh's W4118 resource page.