CSCI-4310/6310 Networking In the Linux Kernel Syllabus
Instructor: Jasmine Plum [she/her] ()
TA: Ming Lu ()
Office Hours:
- Instructor: by appointment
- TA: Wed 1:30p-3:30p, Thu 6p-7p (all times Eastern/US)
Submitty: https://submitty.cs.rpi.edu
Assignments and link to MediaSite (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.
Due to COVID-19 we will not be having live lectures. Adapting to the online situation has taken most of my attention, so the schedule may change as the course progresses. I received some great feedback last Fall, but it may be difficult to incorporate some of it. Some class sessions may still be designated for group work instead of lecture, and the TA and I may "drop in" on groups that are active at that time. Logistics are still up in the air, I'm not sure how viable this will be.
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 to help with your writing. Details about the grading criteria for writing are available here.
Grading:
The final grade consists of the following categories and weights:
- Individual Homework Assignments (Coding/Correctness): 15%
- Individual Homework Assignments (Writeups): 20%
- Team Projects (Coding/Correctness): 30%
- Team Projects (Writeups): 35%
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 5.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 20.04
- Linux Kernel Archives - Official Linux kernels
- Linux 5.8.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
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.
- Mon 8/31 - Syllabus/Online Intro, Development, Linux History, What is a Kernel?
- Thu 9/3 - Kernel Organization
- Mon 9/7 - NO CLASSES
- Tue 9/8 - MONDAY SCHEDULE Cscope, Kernel Basic Data Structures, POSIX C Socket programming
- Thu 9/10 - System Calls
- Mon 9/14 - "In-Class" Exercise (System Calls)
- Thu 9/17 - Interrupts, Softirqs, Tasklets
- Mon 9/21 - Time, Timers, Timer Interrupts
- Thu 9/24 - Network Memory Code, The Socket Data Structure, Socket Buffers
- Mon 9/28 - "In-Class" Exercise (Kernel Lists)
- Thu 10/1 - Socket buffers
- Mon 10/5 - skbuff Paging, sysctl, TCP Briefly
- Thu 10/8 - TCP Reliability
- Mon 10/12 - NO CLASSES
- Thu 10/15 - Flow Control and Congestion Avoidance, The TCP socket, TCP header
- Mon 10/19 - TCP<->Sock/Socket Layer, Control Buffers, TCP Connection State Machine, TCP Retransmission
- Thu 10/22 - More Congestion Avoidance Implementation / Misc. TCP
- Mon 10/26 - Time for Project 1
- Thu 10/29 - Time for Project 1
- Mon 11/2 - Project 1 Uploads / Peer Review
- Thu 11/5 - Project 1 Uploads (cont'd) / Peer Review (cont'd)
- Mon 11/9 - Project 1 Uploads (cont'd) / Peer Review (cont'd)
- Thu 11/12 - UDP, UDP socket, UDP code
- Mon 11/16 - Time for Project 2
- Thu 11/19 - "In-Class" Exercise (Sysctl)
- Mon 11/23 - Time for Project 2
- Mon 11/30 - IP Data Structures and Code I
- Thu 12/3 - IP Data Structures and Code II
- Mon 12/7 - IP Data Structures and Code III
- Thu 12/10 - IP Data Structures and Code IV / Wrap-up
Due dates for the remainder of the semester are as follows (subject to change), time is 11:59:59 PM EST unless otherwise specified:
- Assignment 0: Fri 9/11
- In-Class Assignment 1: Tue 9/15
- Assignment 1: Fri 9/25
- In-Class Assignment 2: Tue 9/29
- Peer Review of Assignment 1: Thu 10/1
- Assignment 2: Thu 10/15
- Peer Review of Assignment 2: Sun 10/25
- Project 1*: Sun 11/1
- Peer Review of Project 1*: Tue 11/10
- Project 2: Fri 12/4
- Peer Review of Project 2: Thu 12/10