<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2019F_Lecture_21</id>
	<title>Operating Systems 2019F Lecture 21 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Operating_Systems_2019F_Lecture_21"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2019F_Lecture_21&amp;action=history"/>
	<updated>2026-05-18T20:02:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2019F_Lecture_21&amp;diff=22543&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  The video from the lecture given on November 22, 2019 [https://homeostasis.scs.carleton.ca/~soma/os-2019f/lectures/comp3000-2019f-lec21-20191122.m4v is now availabl...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Operating_Systems_2019F_Lecture_21&amp;diff=22543&amp;oldid=prev"/>
		<updated>2020-03-20T02:10:51Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  The video from the lecture given on November 22, 2019 [https://homeostasis.scs.carleton.ca/~soma/os-2019f/lectures/comp3000-2019f-lec21-20191122.m4v is now availabl...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
The video from the lecture given on November 22, 2019 [https://homeostasis.scs.carleton.ca/~soma/os-2019f/lectures/comp3000-2019f-lec21-20191122.m4v is now available].&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 21&lt;br /&gt;
----------&lt;br /&gt;
&lt;br /&gt;
questions about the assignment?&lt;br /&gt;
assignment 3 due sunday evening&lt;br /&gt;
&lt;br /&gt;
please do course evaluations!&lt;br /&gt;
&lt;br /&gt;
A lot of problems, weird errors come from running out of disk space.&lt;br /&gt;
&lt;br /&gt;
To clean up a disk, you&amp;#039;ll probably have to deal with logs (esp. if you have something like the kernel printing lots and lots of messages)&lt;br /&gt;
&lt;br /&gt;
But...logs aren&amp;#039;t just text files&lt;br /&gt;
* old style log files are text files&lt;br /&gt;
* systemd introduced binary logs (similar to Windows)&lt;br /&gt;
&lt;br /&gt;
So you may need to delete both&lt;br /&gt;
&lt;br /&gt;
To delete text log files&lt;br /&gt;
* if it has a number at the end (and is or is not compressed), you can just&lt;br /&gt;
  delete it&lt;br /&gt;
* but if it doesn&amp;#039;t have a number at the end, you&amp;#039;ll have to delete *and* have the logging program close and reopen their log file&lt;br /&gt;
   - say, by sending SIGHUP or just killing and restarting the process, or just reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Key idea of Linux kernel rootkit&lt;br /&gt;
* load kernel module&lt;br /&gt;
* module patches system call table so custom code is run&lt;br /&gt;
* custom syscall code does bad things, then calls real system call&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the kernel processes a system call, it looks up the system call handler in a system call table&lt;br /&gt;
  * system call 5 =&amp;gt; 5th function in table&lt;br /&gt;
&lt;br /&gt;
To change what system call is made, you patch the table&lt;br /&gt;
&lt;br /&gt;
You could try patching the entire system call handler, but that is much harder and in general not feasible from a module&lt;br /&gt;
&lt;br /&gt;
Kernel developers know bad guys want to mess with the system call table&lt;br /&gt;
 - so there are protections in place that have to be circumvented&lt;br /&gt;
 - main protection: table is marked read only&lt;br /&gt;
 - so you have to get around this&lt;br /&gt;
&lt;br /&gt;
If you do even the slightest thing wrong, you&amp;#039;ll corrupt the kernel&lt;br /&gt;
so, you may need to reboot for every time you try new code&lt;br /&gt;
 - you can&amp;#039;t decide whether an old bug is messing up your new code or not,&lt;br /&gt;
   unless you reboot&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Contrast this with eBPF and trace&lt;br /&gt;
 - did you ever have to reboot?&lt;br /&gt;
&lt;br /&gt;
note the safety/functionality tradeoff&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Assignment 4 will not be graded by the TAs, it will be on cuLearn&lt;br /&gt;
 - but general questions will be posted as will be solutions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>