CSCI-4310/6310 Networking In the Linux Kernel Syllabus
Instructor: Jasmine Plum [she/her] ()
TA: Vaishnavi Neema ()
- Instructor: Amos Eaton 205 by appointment
- TA: Amos Eaton 127, Wednesday 10-noon
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 designated as communication-intensive. 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 Comm+D 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 18.04
- Linux Kernel Archives - Official Linux kernels
- Linux 4.19.68 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 make use 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/29 - Syllabus, Development, Linux History, What is a Kernel?
- Mon 9/2 - NO CLASSES
- Tue 9/3 - MONDAY SCHEDULE Kernel Organization
- Thu 9/5 - Cscope, Kernel Basic Data Structures, POSIX C Socket programming
- Mon 9/9 - System Calls
- Thu 9/12 - Interrupts, Softirqs, Tasklets
- Mon 9/16 - Time, Timers, Timer Interrupts
- Thu 9/19 - In-class Exercise 1 (system call / lists)
- Mon 9/23 - In-class Exercise 1 (system call / lists) continued
- Thu 9/26 - Network Memory Code, The Socket Data Structure, Socket Buffers
- Mon 9/30 - Socket buffers
- Thu 10/3 - skbuff Paging, sysctl, TCP Briefly
- Mon 10/7 - TCP Reliability
- Thu 10/10 - Flow Control and Congestion Avoidance, The TCP socket, TCP header
- Mon 10/14 - NO CLASSES
- Thu 10/17 - TCP<->Sock/Socket Layer, Control Buffers, TCP Connection State Machine, TCP Retransmission
- Mon 10/21 - More Congestion Avoidance Implementation / Misc. TCP
- Thu 10/24 - Team In-class Project 1 (TCP function dissection)
- Mon 10/28 - Team In-class Project 1 (TCP function dissection) continued
- Thu 10/31 - Oral Presentations of In-class Project 1
- Mon 11/4 - Oral Presentations of In-class Project 1 continued
- Thu 11/7 - Oral Presentations of In-class Project 1 continued
- Mon 11/11 - UDP, UDP socket, UDP code
- Thu 11/14 - (optional attendance) In-class time for Project 2
- Mon 11/18 - IP Data Structures and Code I
- Thu 11/21 - IP Data Structures and Code II
- Mon 11/25 - IP Data Structures and Code III
- Thu 11/28 - NO CLASSES
- Mon 12/2 - NO CLASSES (Snow Day)
- Thu 12/5 - IP Data Structures and Code IV, In Class Exercise 2
- Mon 12/9 - IP Data Structures and Code V / Course Evals
Due dates for the remainder of the semester are as follows (subject to change):