Charlie demonstrated several system calls needed to complete P0
, with a focus on dealing with file descriptors
Take note that the struct stat
for a file contains a mode
field that specifies file permissions
Use the dup(2)
family to create unnamed pipes on your system
When working with C strings in the kernel, we recommend passing around a pointer and a length pair rather than relying on null-termination
While in userspace a buffer overflow is harmful, in the kernel it can be catastrophic to a system, and in a production environment, devastating to an organization
Note that file descriptors are integers that index into a table of file descriptions.
dup(2)
uses the file descriptor table to connect two file descriptors to each other.
While dup()
takes an fd to duplicate, dup2()
takes a second existing fd to overwrite as the other end of the pipe.
Be sure to submit all patches when you run git send-email
Be sure to locally git am
your patchset on a repo after running git checkout -b test origin/master
. This will do the same thing that we will do to test your patchset.
Be sure to include the DCO with your cover letter.
Watch this video (25m) that gives a brief overview of the who why where and what of linux, and discusses some of the pieces that make up a functioning system and how they fit together.
Watch this video (25m) that explains and demonstrates some of the most common commands used on the commandline that you will want to be familiar with for the rest of the semester.
E0 is due at 11:59PM the day of this lecture (19 September 2023)
See this video for more guidance on how to complete E0.
P0 is due at 11:59PM next Tuesday (26 September 2023)
See this video for more guidance on how to complete P0.