CSCI-4310/6310 Networking In the Linux Kernel Syllabus
Instructor: Buster Holzbauer ()
Office Hours: Amos Eaton 205, by appointment
Submitty: https://submitty.cs.rpi.eduAssignments and lectures will be posted on Submitty. In addition, Submitty will be used for announcements and is a great place to have discussions since some of the bugs we encounter are going to be very difficult to resolve and learning from others' experiences will be invaluable.
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 at RPI, so we will move slower through kernel-specific concepts.
I am working to restructure the course based on feedback from the first run last Fall. 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.
It is likely that 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, but the process has been started and I have been advised to continue running the course as one that meets the comm-intensive requirements. 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. Details about the grading criteria for writing are available here.
The final grade consists of the following categories and weights:
- Course Participation: 10%
- Individual Homework Assignments (Coding/Correctness): 15%
- Individual Homework Assignments (Writeups): 15%
- 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 significant effort, made progress towards learning objectives, and have been participating in the course, you should not end up failing. Additionally students in the 6000-level course cannot earn a grade letter of “D+” or “D”.
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.x.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.18.5 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 will be permitted as long as they do not disrupt the class and participation remains reasonable. It is highly suggested that you have a copy of the source code handy along with a Cscope database that is up to date, or that you mak euse of the Elixir link above.
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.
- Be able to effectively discuss details of the kernel and make judgements about the appropriate level of detail to include.
Schedule: This will be updated as the semester progresses, with topics likely getting more spread out:
All due dates refer to 11:59:59 PM unless otherwise specified.
- Thu 8/30 - Syllabus, Development, Linux History, What is a Kernel?
- Mon 9/3 - NO CLASSES
- Thu 9/6 - Kernel Organization
- Mon 9/10 - Cscope, Kernel Basic Data Structures, POSIX C Socket programming
- Thu 9/13 - System Calls
- Mon 9/17 - Interrupts, Softirqs, Tasklets
- Thu 9/20 - Time, Timers, Timer Interrupts
- Mon 9/24 - In-class Exercise 1 (system call)
- Thu 9/27 - Network Memory Code, The Socket Data Structure, Socket Buffers
- Mon 10/1 - Socket buffers
- Thu 10/4 - skbuff Paging, sysctl, TCP Briefly
- Mon 10/8 - NO CLASSES
- Tue 10/9 - MONDAY SCHEDULE. TCP Reliability
- Thu 10/11 - Flow Control and Congestion Avoidance, The TCP socket, TCP header
- Mon 10/15 - TCP<->Sock/Socket Layer, Control Buffers, TCP Connection State Machine, TCP Retransmission
- Thu 10/18 - In-class Exercise 2 (kernel lists)
- Mon 10/21 - Congestion Avoidance Implementation
- Wed 10/24 - LAST DAY TO DROP
- Thu 10/25 - App<->TCP<->IP Interaction, Important TCP Functions
- Mon 10/29 - Important TCP Functions II
- Thu 11/1 - In-class Exercise 3 (TCP function dissection)
- Mon 11/5 - Oral Presentations of In-class Exercise 3
- Thu 11/8 - UDP, UDP socket, UDP code
- Mon 11/12 - IP Data Structures and Code I
- Thu 11/15 - IP Data Structures and Code II
- Mon 11/19 - IP Data Structures and Code III
- Tue 11/20 - LAST DAY FOR P/NC
- Thu 11/22 - NO CLASSES
- Mon 11/26 - IP Data Structures and Code IV
- Thu 11/29 - IP Data Structures and Code V
- Mon 12/3 - Special Topics 1
- Thu 12/6 - In-Class Time for Project 1 Peer Review
- Mon 12/10 - Special Topics 2
Due dates for the remainder of the semester are as follows (subject to change):
- Mon 10/29 Assignment 2
- Tue 10/30 Peer Review Assignment 2 handed out
- Thu 11/1 Project 1 handed out
- Mon 11/5 Project 1 Teams due
- Thu 11/8 Peer Review Assignment 2 due
- Wed 12/5 Project 1 due
- Mon 12/10 Project 1 peer review due