CSCI-4969/6966 Networking In the Linux Kernel Syllabus
Instructor: Buster Holzbauer ()
Office Hours: Amos Eaton 205, Tuesday and Friday, 2pm-4pm (and by appointment)
Pre-requisites: CSCI-4210 Operating Systems/equivalent, or instructor permission.
Topics: Kernel organization, TCP/IP fundamentals, kernel development process, common kernel macros/data structures, kernel networking data structures, network programming basics, network utilities, more as time allows
Expectations, Classroom Time, Attendance: This is an advanced topics course, so it is expected that you are comfortable with C programming, operating systems concepts, and common data structures. If you are not, it will be your responsiblity to "catch up" if you remain in the course. That being said, it is the only kernel course currently offered here, so we will move slower through kernel-specific concepts.
Since this is a new course, the first time is going to be more of a "pilot". That does not mean we will treat the course more casually, but projects and organization will likely need tuning as the semester progresses. As such, attendance and participation in lecture will be a highly important component of the course. You are expected to regularly attend lecture, ask questions, and participate in in-class discussions.
There will be smaller independent assignments, but the majority of the projects will be team-based. You are not required to work with the same partner each time. All team members are expected to contribute to the assignments, both in code and writeup.
The course is not currently designated as communication-intensive, however we will be experimenting with components that would let us designate is as such in the future. It is possible but not guaranteed for this course to retroactively gain the communication-intensive label. What this means for students is that there will be written work graded both on clarity and quality. You may want to leverage resources such as the Center for Communication Practices (CCP) based in the Folsom Library to help with your writing.
The grading scheme might change slightly but the approximate breakdown is:
- Course Participation: 20%
- Individual Homework Assignments: 20%
- Team Projects (Coding/Correctness): 30%
- Team Projects (Writeups): 30%
I expect to hand out A, A-, B+, B, B-, and F grades. Coursework that would normally be "barely passing", i.e. "C or D quality work" is unacceptable in an advanced options course like this one. That being said, as long as it is apparent you have put in effort, made progress towards learning objectives, and have been participating in the course, you should not end up failing.
The grades may be curved - I will use Rainbow Grades in conjunction with Submitty to report grades and reflect the curve. There will be approximate A, B, and failing boundaries updates as the course progresses.
Late Work Policy: There are no late days in this course, all work is expected to be submitted by the deadlines provided in assignment handouts. If you have a legitimate excuse you should get it approved through Student Experience / your class dean.
Books and Resources: There are many resources out there on kernel development, however very few of them are kept up to date. We will be developing on a 4.4.x kernel, so use caution when looking at older information.Downloads:
- VirtualBox - VM software
- Ubuntu LiveCD - Image for installing OS, your patches must work on Ubuntu 16.04
- Linux Kernel Archives - Official Linux kernels
- Linux 4.9.45 tarball - The version of the kernel your patches must work on.
- Cscope - C browsing tool
- Wireshark - Network traffic analyzer. (In Ubuntu just use apt-get.)
- Kernel Newbies - Entry-level kernel hacking resource
- Elixir - Online browseable kernel code
- "Kernel Analysis-HOWTO" - Old (2003) guide on some Linux (2.4.x!) functions/organization.
- Benvenuti, Christian. Understanding Linux Network Internals: Guided Tour to Networking on Linux. ISBN: 0596002556 - Primarily Layers 2&3 coverage
- Bovet, Daniel P. and Cesati, Marco. Understanding the Linux Kernel, 3rd Edition. ISBN: 0596005652 - Another reference book
- Linux Device Drivers, 3rd Edition - Yet another reference book, good for understanding modules. FREE online!
- Love, Robert. Linux Kernel Development, 3rd Edition. ISBN: 0672329468 - And yet another reference book
Laptop Policy: Laptops are not to be used during lecture except during presentations or in-class programming time. An announcement will be made if it is expected that you bring your laptop to class for a particular lecture. Exceptions to this policy can be discussed with the instructor.
Academic Integrity: While I strongly encourage you to form study groups and work together in learning this material, the course project, homeworks and programming assignments are to be done individually unless otherwise noted by the assignment/project specification. What this means is that you should do whatever is necessary to ensure your work remains your work. If during in the grading process, it is determined that students shared or duplicated work, those students will automatically score a zero for the offense. For a second offense, the student or students involved will fail this course. Each time, a report will be sent to the Dean of Students office which could result in additional disciplinary action. Additionally, undergraduates offenders cannot mentor in the future. In the event a graduate student is caught cheating, that student will fail.
Due to the nature of this course, sometimes we will need to share specific bits of code to ask questions. When in doubt, share less and wait for permission to share more, or consult the instructor directly. You should not share any patch files or completed assignments with peers, except those currently on your team.
Learning Outcomes: Students who have successfully completed this course will:
- Have an understanding of the overall layout of the Linux kernel.
- Be capable of modifying the kernel and communicating changes/testing.
- Have a deeper understanding of the kernel's network subsytem.
- Understand the differences between user and kernel space and how the two interact.
Schedule: This will be updated as the semester progresses:
All due dates refer to 11:59:59 PM unless otherwise specified.
- Thu 8/31 - Syllabus, Development, Linux History, What is a Kernel?
- Mon 9/4 - NO CLASSES
- Thu 9/7 - Kernel Organization
- Mon 9/11 - Cscope, Kernel Basic Data Structures, POSIX C Socket programming
- Wed 9/13 - ADD DEADLINE
- Thu 9/14 - System Calls
- Mon 9/18 - Interrupts, Softirqs, Tasklets, Individual Assignment 1 Due
- Thu 9/21 - Time, Timers, Timer Interrupts
- Mon 9/25 - OSI Model, TCP/IP basics, Kernel Network Flow (high level)
- Thu 9/28 - Network Memory Code, The Socket Data Structure, Socket Buffers
- Mon 10/2 - System calls revisited, Sysctl, TCP Briefly, Individual Assignment 2 Due
- Tue 10/3 - Team Project 1 posted
- Thu 10/5 - TCP Reliability, Flow Control, and Congestion Avoidance
- Fri 10/6 - LAST DAY FOR Team Project 1 Team Choices.
- Mon 10/9 - NO CLASSES, Individual Assignment 2 Peer Reviews Due
- Tue 10/10 - MONDAY SCHEDULE. The TCP socket, TCP header, TCP<->Sock/Socket Layer
- Thu 10/12 - In Class Team Project 1 Work Time
- Mon 10/16 - TCP Connection State Machine, TCP Retransmission,
- Thu 10/19 - TCP State Machines II
- Fri 10/20 - LAST DAY TO DROP
- Mon 10/22 - Important TCP Functions, TCP<->IP Interaction, Team Project 1 Due
- Thu 10/26 - Important TCP Functions II
- Sun 10/29 - LAST DAY FOR Team Project 2 Team Choices.
- Mon 10/30 - UDP, UDP socket, UDP code, Team Project 2 Posted
- Thu 11/2 - IP Data Structures and Code I
- Fri 11/3 - Team Project 1 Peer Reviews/Peer Testing Due
- Mon 11/6 - In Class Team Project 2 Time
- Thu 11/9 - IP Data Structures and Code II
- Mon 11/13 - In Class Team Project 2 Time, Team Project 2 Mid-Report Due
- Thu 11/16 - Project 2 Supplemental Information Lecture
- Mon 11/20 - IP Data Structures and Code III
- Tue 11/21 - LAST DAY FOR P/NC
- Thu 11/23 - NO CLASSES
- Mon 11/27 - In Class Team Project 2 Time
- Thu 11/30 - IP Data Structures and Code IV
- Mon 12/4 - ARP, ARP in the Kernel
- Thu 12/7 - Neighbor Protocol Overview, Neighbour Structure, Team Project 2 Due
- Mon 12/11 - Course Wrap-up Discussion
- Wed 12/13 - Team Project 2 Peer Review (maybe) or Short Course Wrap-up Assignment Due. (no late exceptions)