<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>codemonkey.org.uk</title>
	<atom:link href="http://codemonkey.org.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://codemonkey.org.uk</link>
	<description>Dave Jones' Linux &#38; opensource stuff.</description>
	<lastBuildDate>Tue, 03 Jan 2012 14:52:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>New year, new bugs.</title>
		<link>http://codemonkey.org.uk/2012/01/03/year-bugs/</link>
		<comments>http://codemonkey.org.uk/2012/01/03/year-bugs/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 14:52:48 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Fedora kernel]]></category>

		<guid isPermaLink="false">http://codemonkey.org.uk/?p=308</guid>
		<description><![CDATA[This is how the year begins for the Fedora kernel. Open bugs F15 F16 Rawhide &#160; 394 339 143 (876) To be continued.. New year, new bugs. is a post from: codemonkey.org.uk No related posts.<p><a href="http://codemonkey.org.uk/2012/01/03/year-bugs/">New year, new bugs.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>This is how the year begins for the Fedora kernel.</p>
<table border=1>
<th>Open bugs</th>
<tr>
<td>F15</td>
<td>F16</td>
<td>Rawhide</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>394</td>
<td>339</td>
<td>143</td>
<td>(876)</td>
</tr>
</table>
<p>To be continued..</p>
<p><a href="http://codemonkey.org.uk/2012/01/03/year-bugs/">New year, new bugs.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2012/01/03/year-bugs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hiring for a position on the Fedora kernel team.</title>
		<link>http://codemonkey.org.uk/2011/06/02/hiring-position-fedora-kernel-team/</link>
		<comments>http://codemonkey.org.uk/2011/06/02/hiring-position-fedora-kernel-team/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 17:45:07 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Fedora kernel]]></category>

		<guid isPermaLink="false">http://codemonkey.org.uk/?p=306</guid>
		<description><![CDATA[NOTE: This position has now been filled. The rest of this post is left for posterity only. If you&#8217;re interested in working at Red Hat in some other role, check out jobs.redhat.com and/or send me an email, and I&#8217;ll forward it to the right people. We&#8217;re hiring for a position on the Fedora kernel team [...]<p><a href="http://codemonkey.org.uk/2011/06/02/hiring-position-fedora-kernel-team/">Hiring for a position on the Fedora kernel team.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



Related posts:<ol><li><a href='http://codemonkey.org.uk/2011/06/01/red-star-kernel/' rel='bookmark' title='Permanent Link: Red Star kernel.'>Red Star kernel.</a> <small>Over the long weekend, I downloaded a copy of Red...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><strong>NOTE: This position has now been filled. The rest of this post is left for posterity only.  If you&#8217;re interested in working at Red Hat in some other role, check out <a href="http://jobs.redhat.com">jobs.redhat.com</a> and/or send me an email, and I&#8217;ll forward it to the right people.<br />
</strong><br />
We&#8217;re hiring for a position on the Fedora kernel team again.<br />
If you are interested, email me a CV (davej at redhat) and we&#8217;ll see where things go. (we don&#8217;t have a posting on jobs.redhat.com yet)</p>
<p>Some of the tasks of the job include (but are not limited to):<br />
* diagnosing incoming bugs from users<br />
* backporting fixes from Linus&#8217; latest tree to Fedora<br />
* for bugs unfixed in Linus&#8217; tree, work on fixing them, with the upstream maintainers.<br />
* interacting with the -stable team to make sure those same fixes go there.<br />
* helping keep Fedora on the cutting edge of kernel development by pushing new releases</p>
<p>Hiring distribution kernel maintainers is never easy.  It is a job that requires knowledge of the various parts of the kernel. A generalist as opposed to a specialist. The bugs you&#8217;re staring at one day could be completely different the next.</p>
<p>With Fedora things are even harder due to the rapid rate of change upstream. By contrast, a RHEL kernel maintainer could spend time working on a bug for a month without the code underneath him changing.</p>
<p>It&#8217;s a demanding job, with an unrelenting torrent of new things that need fixing / working on. If this doesn&#8217;t dissuade you, you could be just what we&#8217;re looking for!</p>
<p>(oh, and the job doesn&#8217;t involve you having to move to Boston. Though if you wanted to I&#8217;m sure we could help make that happen).</p>
<p><a href="http://codemonkey.org.uk/2011/06/02/hiring-position-fedora-kernel-team/">Hiring for a position on the Fedora kernel team.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>Related posts:<ol><li><a href='http://codemonkey.org.uk/2011/06/01/red-star-kernel/' rel='bookmark' title='Permanent Link: Red Star kernel.'>Red Star kernel.</a> <small>Over the long weekend, I downloaded a copy of Red...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2011/06/02/hiring-position-fedora-kernel-team/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Red Star kernel.</title>
		<link>http://codemonkey.org.uk/2011/06/01/red-star-kernel/</link>
		<comments>http://codemonkey.org.uk/2011/06/01/red-star-kernel/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 17:42:22 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Fedora kernel]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[north korea]]></category>
		<category><![CDATA[red star]]></category>

		<guid isPermaLink="false">http://codemonkey.org.uk/?p=304</guid>
		<description><![CDATA[Over the long weekend, I downloaded a copy of Red Star Linux, the official operating system of North Korea. Because license violations seem to be part of the Juche idea, there&#8217;s no known source code online, so proper analysis of what goes into it is difficult. The rpm headers alone reveal quite a lot of [...]<p><a href="http://codemonkey.org.uk/2011/06/01/red-star-kernel/">Red Star kernel.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>Over the long weekend, I downloaded a copy of <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Red_Star_Linux">Red Star Linux</A>, the official operating system of North Korea.<br />
Because license violations seem to be part of the Juche idea, there&#8217;s no known source code online, so proper analysis of what goes into it is difficult.</p>
<p>The rpm headers alone reveal quite a lot of interesting information though.<br />
It seems that Red Star is forked from a version of Fedora somewhere around the Fedora 10 or 11 timeframe.</p>
<p>Here&#8217;s the changelog embedded in the kernel rpm..<br />
<code><br />
* Fri Mar 27 14:00:00 2009 Jong Song Jin<br />
- patched linux-2.6.25-drivers-video.patch(for video capture saa7134 onboard driver)</p>
<p>* Mon Mar 16 14:00:00 2009 An Jin<br />
- change machanism for pci device information.</p>
<p>* Thu Feb 19 13:00:00 2009 Kim Yong Gwang<br />
- change system halt to poweroff for x86 architecture</p>
<p>* Wed Jan  7 13:00:00 2009 Kim Jong Chol<br />
- fixed the 8250 serial driver for modem.</p>
<p>* Fri Nov 28 13:00:00 2008 Kim Se Hyok<br />
- apply tuxonice hibernate patch for Software Suspend 2</p>
<p>* Mon Nov 10 13:00:00 2008 Kim Chol Guk<br />
- apply jipsam algorithm</p>
<p>* Mon Nov 10 13:00:00 2008 Kim Yong Gwang<br />
- change 16 from 8 max count of the loop device</p>
<p>* Sat Aug  2 14:00:00 2008 Kim Yong Gwang<br />
- implement the usb filtering through user authentification</p>
<p>* Wed Jul 23 14:00:00 2008 Kim Chol Guk<br />
- Implement koreanize<br />
- sata harddriver<br />
- apply bootsplash</p>
<p>* Wed Apr 30 14:00:00 2008 Dave Airlie <airlied@redhat.com> 2.6.25-14<br />
- fix radeon fast-user-switch oops + i915 breadcrumb oops<br />
</code></p>
<p>Some interesting things here.<br />
- All changelog timestamps are on the hour. Suggesting they&#8217;ve been sanitised, or generated from another source. All 374 changelog entries had been munged in this way, including the ones from the original Fedora release.<br />
- No email addresses for the changelog entries (no surprise)<br />
- The actual changelogs are quite cryptic.  &#8220;change machanism for pci device information.&#8221;  why?<br />
- &#8216;fixed the 8250 serial driver for modem.&#8217;  wtf ?<br />
- They decided tuxonice is the way forward for hibernation.  Perhaps it works better on dear leaders laptop.<br />
- &#8216;apply jipsam algorithm&#8217;. This is a crypto module that isn&#8217;t in mainline (and apparently doesn&#8217;t exist outside North Korea). I bet it&#8217;s good though. No backdoor master keys or anything similar.<br />
- &#8216;implement the usb filtering through user authentification&#8217;.<br />
  What does that even mean ?</p>
<p>Browsing through the rest of the distribution, a lot of packages are renamed.  OpenOffice became UriOffice. Gimp became ImageProcessor. Wine became CrossWin2.0.</p>
<p>It also comes with AntiVirus 2.0. Which comes with a rtscan.ko kernel module, which judging by the symbols it uses, does some magic with jprobes to hook various functions for on-open scanning.</p>
<p>Another curious thing, is that throughout the distro whenever you do see an email address or hostname, it has a .kp TLD, that never seem to resolve. I&#8217;m assuming that the DNS servers in North Korea show different results if you&#8217;re in North Korea or not.</p>
<p><a href="http://codemonkey.org.uk/2011/06/01/red-star-kernel/">Red Star kernel.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2011/06/01/red-star-kernel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 years of x86info.</title>
		<link>http://codemonkey.org.uk/2011/02/26/10-years-x86info/</link>
		<comments>http://codemonkey.org.uk/2011/02/26/10-years-x86info/#comments</comments>
		<pubDate>Sat, 26 Feb 2011 18:06:03 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[x86info]]></category>

		<guid isPermaLink="false">http://codemonkey.org.uk/?p=301</guid>
		<description><![CDATA[On Mon Feb 26 2001, I committed the first version of x86info to CVS on sourceforge. The actual coding of that first version had happened during the week or so prior. The project began after seeing the program &#8216;cpuid&#8217; by Phil Karn. I had sent a few patches to Phil but never got any reply, [...]<p><a href="http://codemonkey.org.uk/2011/02/26/10-years-x86info/">10 years of x86info.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>On Mon Feb 26 2001, I committed the first version of x86info to CVS on sourceforge.  The actual coding of that first version had happened during the week or so prior.</p>
<p>The project began after seeing the program &#8216;cpuid&#8217; by Phil Karn.  I had sent a few patches to Phil but never got any reply, and no new release of cpuid appeared until months later (not including my patches).  As I ended up forking more and more of the code, I decided to push it out as &#8216;x86info&#8217; for the first time.  Phil did a few more releases, up until 2002, when the program was abandoned.</p>
<p>Over the years, x86info has seen 739 commits from at least 19 contributors (some patches written by others were committed in the CVS days without correct attribution).  The bulk of the commits were unsurprisingly mine.</p>
<p>The commit rate year by year is interesting.</p>
<p>2001 197<br />
2002 119<br />
2003 88<br />
2004 17<br />
2005 37<br />
2006 46<br />
2007 34<br />
2008 74<br />
2009 65<br />
2010 27<br />
2011 54</p>
<p>2003 was when I got hired at Red Hat, and the Fedora kernel pretty much became my life. 2004 I was doing RHEL4 too. The drop-off around that time is significant, and doesn&#8217;t recover until several years later.<br />
This year seems to be off to a good start <img src='http://codemonkey.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>x86info has been ported to Solaris and FreeBSD, and at one time, even to Microsoft Windows. That support was ultimately removed due to the number of invasive ifdefs present.  The various ports sometimes get broken due to lack of testing during development time, but afaik they are available in &#8216;ports&#8217; with whatever fixes need to be present.</p>
<p>Asides from the Linux kernel, this is the oldest project I&#8217;m involved in that is still seeing development.</p>
<p><a href="http://codemonkey.org.uk/2011/02/26/10-years-x86info/">10 years of x86info.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2011/02/26/10-years-x86info/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Winter NAMM 2011.</title>
		<link>http://codemonkey.org.uk/2011/01/19/winter-namm-2011/</link>
		<comments>http://codemonkey.org.uk/2011/01/19/winter-namm-2011/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 01:06:34 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codemonkey.org.uk/?p=299</guid>
		<description><![CDATA[I took some time off this last week to travel to Anaheim,CA. Most people go there to go to Disneyland. I had other plans. Thanks to some friends, I managed to blag my way into the NAMM show. Even though I was on vacation, and there solely to take in the latest and greatest in [...]<p><a href="http://codemonkey.org.uk/2011/01/19/winter-namm-2011/">Winter NAMM 2011.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>I took some time off this last week to travel to Anaheim,CA.  Most people go there to go to Disneyland. I had other plans. Thanks to some friends, I managed to blag my way into the <a href="http://www.namm.org">NAMM</a> show.</p>
<p>Even though I was on vacation, and there solely to take in the latest and greatest in musical instruments, I was curious to find out just how much stuff is running Linux.  Most of the manufacturers I spoke with wouldn&#8217;t tell me anything (and appeared quite puzzled that I&#8217;d even care).  The only obvious ones were from manufacturers I already knew about (like the Muse receptor, Korg&#8217;s etc..)</p>
<p>There was one revealing moment however that I found amusing.  In 1979, the <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Fairlight_CMI">Fairlight CMI</a> was *the* sampling synth.  Back then, its lightpen input device must have seemed like something from the future. (Here&#8217;s <a href="http://www.youtube.com/watch?v=n6QsusDS_8A">Quincy Jones demoing it</a>).   Anyway.. Fairlight instruments have returned, and created a retro style reproduction of the original CMI. One of my friends managed to capture <a href="http://fdiskc.com/syn/namm/2011/Fairlight_CMI-30A_linux.html">a photograph of it when the synth UI crashed</a>. Yup, looks like Ubuntu to me.</p>
<p>There&#8217;s really no escape from Linux. It&#8217;s everywhere you look.</p>
<p>I returned last night refreshed from time off from daily work, but also inspired in many ways by new things, and new people I met. Escaping the frozen wasteland of Boston for the sunnier climate did wonders for my general mood too. As draining as the whole experience was, I&#8217;m sure I&#8217;ll be going back next year.</p>
<p>(For those who care about any of the other things I saw there, I took <a href="http://attacksustain.com/photos/2011-Winter-NAMM">a bunch of photographs</a> too).</p>
<p><a href="http://codemonkey.org.uk/2011/01/19/winter-namm-2011/">Winter NAMM 2011.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2011/01/19/winter-namm-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>System call fuzzing continued.</title>
		<link>http://codemonkey.org.uk/2010/12/15/system-call-fuzzing-continued/</link>
		<comments>http://codemonkey.org.uk/2010/12/15/system-call-fuzzing-continued/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 19:03:25 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codemonkey.org.uk/?p=297</guid>
		<description><![CDATA[Work is ongoing on the system call fuzzer I wrote about last month. Since I initially talked about it, it&#8217;s found a few more bugs. CVE-2010-4256: Pipe fcntl local denial of service. The inode struct in the kernel contains this union.. union { struct pipe_inode_info *i_pipe; struct block_device *i_bdev; struct cdev *i_cdev; }; A missing [...]<p><a href="http://codemonkey.org.uk/2010/12/15/system-call-fuzzing-continued/">System call fuzzing continued.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>Work is ongoing on the system call fuzzer I wrote about <a href="http://codemonkey.org.uk/2010/11/09/system-call-abuse/">last month</a>.  Since I initially talked about it, it&#8217;s found a few more bugs.</p>
<p><a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-4256">CVE-2010-4256</a>: Pipe fcntl local denial of service.<br />
The inode struct in the kernel contains this union..<br />
<code><br />
        union {<br />
                struct pipe_inode_info  *i_pipe;<br />
                struct block_device     *i_bdev;<br />
                struct cdev             *i_cdev;<br />
        };<br />
</code></p>
<p>A missing &#8220;is this a pipe&#8221; check in pipe_fcntl allowed a user to perform pipe ioctl&#8217;s on inodes that were not pipes. (ie, block/char devs).  Things blew up pretty quickly.</p>
<p><a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-4347">CVE-2010-4347: Incorrect sysfs permissions</a><br />
One of the things the fuzzer does is to pass random file descriptors to syscalls that expect them.  At first, it generated a few itself on startup by creating a bunch of files.  I changed this to open any files that were readable/writable from sysfs, procfs and /dev.  It prints out what it managed to open on startup.  I immediately noticed something that stood out like a sore thumb.<br />
/sys/kernel/debug/acpi/custom_method was world writable.  As this file allows a user to upload new ACPI tables to the kernel, this is a fairly obvious local root. Thankfully debugfs isn&#8217;t mounted by default on most systems.<br />
This discovery prompted a further investigation into S_IWUGO users in the kernel, which led to a slew of fixes (mostly in the staging tree). A patch is also pending to checkpatch.pl to warn about any new additions, as exporting a file from the kernel with this mode is nearly always a bad idea.</p>
<p>There&#8217;s still a lot more work to do, mostly annotating each and every system call.<br />
An annotated syscall looks like <a href="http://git.codemonkey.org.uk/?p=trinity.git;a=blob;f=syscalls/fcntl.h;h=e45aa1d9bab34795cbb34aa5471c5a26463f3f07;hb=HEAD">this</a>.  It&#8217;s time consuming to read through every syscall and add every possible argument, so right now there are only a dozen or so (out of ~300) fully annotated syscalls. I suspect more kernel bugs to be found as coverage increases.</p>
<p>After lwn picked up on my last post, I got a number of interesting mails, some offering more suggestions for improvements.  One interesting mail I got was from Tavis Ormandy at google, who has been working on <a href="http://code.google.com/p/iknowthis">a similar tool</a>.  We&#8217;ve taken some different design decisions which has meant that both tools may pick up on different bugs, so I don&#8217;t think either is really a replacement for the other.  I&#8217;ve definitely found it inspirational to read through a &#8216;competing&#8217; tool though. Worth checking out if you found my fuzzer interesting at all.</p>
<p>Finally, I changed the name of the project. There were a number of other syscall fuzzers out there all called &#8216;scrashme&#8217;.  To differentiate, mine is now named &#8216;Trinity&#8217;. (Cloning information at <a href="http://codemonkey.org.uk/2010/11/09/system-call-abuse/">original post</a> has been updated).  I chose the name after rat-holing on wikipedia for several hours, reading about <a href="https://secure.wikimedia.org/wikipedia/en/wiki/Trinity_%28nuclear_test%29">nuclear tests</a>. I always liked the Oppenheimer quote &#8220;Now I am become Death, the destroyer of worlds&#8221;. For a project that intentionally attempts to destroy, it seemed fitting.</p>
<p>Now, back to annotating..</p>
<p><a href="http://codemonkey.org.uk/2010/12/15/system-call-fuzzing-continued/">System call fuzzing continued.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2010/12/15/system-call-fuzzing-continued/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Musings on suspend &amp; resume regressions.</title>
		<link>http://codemonkey.org.uk/2010/12/01/musings-suspend-resume-regressions/</link>
		<comments>http://codemonkey.org.uk/2010/12/01/musings-suspend-resume-regressions/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 00:19:17 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codemonkey.org.uk/?p=294</guid>
		<description><![CDATA[Suspend/Resume support on Linux has come a long way over the last few years. In the early Fedora releases, we explicitly didn&#8217;t support it, because we knew just how bad things were. When we added the initial support to Fedora (circa FC4 or 5 iirc), we had tested it on a bunch of laptops we [...]<p><a href="http://codemonkey.org.uk/2010/12/01/musings-suspend-resume-regressions/">Musings on suspend &#038; resume regressions.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>Suspend/Resume support on Linux has come a long way over the last few years.  In the early Fedora releases, we explicitly didn&#8217;t support it, because we knew just how bad things were.  When we added the initial support to Fedora (circa FC4 or 5 iirc), we had tested it on a bunch of laptops we had in the office (which translated to: &#8220;omg, so many thinkpad models&#8221; + a handful of outliers). After the initial release, obviously more users started expecting it to work on more varied hardware, which over time has been a mixed bag of success/misery.</p>
<p>One common thing throughout all of this though, has been the problem of regressions. Someone who had suspend/resume on Fedora work out of the box on one Fedora release, expects it to work just as well if not better on the next release.</p>
<p>A common refrain from users who see regressions like this is &#8220;suspend still works in Windows after I apply updates&#8221;.<br />
The big difference of course is that these other operating systems aren&#8217;t on six month release cycles, with a kernel that&#8217;s still seeing <a href="http://www.linuxfoundation.org/docs/lf_linux_kernel_development_2010.pdf">huge rate of change</a> every 12 weeks.</p>
<p>But the nature of suspend/resume itself is an incredibly fragile process on any operating system.<br />
I&#8217;ve seen both Windows and OS X fail to resume after installing updates and/or third party drivers. I.e., as soon as something is introduced that wasn&#8217;t the &#8216;tested gold master&#8217;  configuration.  It turns out that it&#8217;s a really, really tough problem to support every possible hardware platform out there, even if you&#8217;re a huge company like Microsoft, or if you&#8217;re a company that controls the hardware you run on, like Apple.</p>
<p>The big problem with diagnosing problems with suspend/resume though is that they typically need a developer with hands-on access to the machine in question. Short of cornering Matthew Garrett at a conference though, the only options are back and forth via email/bugzilla, which isn&#8217;t necessarily the most optimal way to debug things. Additionally, the <a href="https://fedoraproject.org/wiki/KernelCommonProblems#Suspend.2FResume_failure">methods for diagnosing suspend/resume failures</a> are still kinda in the dark ages.</p>
<p>Five years ago, things were pretty hopeless. Today, they aren&#8217;t great but they&#8217;re a lot better. Maybe in another five years things will be robust enough that we can take it for granted as a feature that always works. I personally feel that they have to for features like aggressive runtime power management to become more prevalent.</p>
<p><a href="http://codemonkey.org.uk/2010/12/01/musings-suspend-resume-regressions/">Musings on suspend &#038; resume regressions.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2010/12/01/musings-suspend-resume-regressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>chasing a heisenbug.</title>
		<link>http://codemonkey.org.uk/2010/11/17/chasing-heisenbug/</link>
		<comments>http://codemonkey.org.uk/2010/11/17/chasing-heisenbug/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 02:49:19 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codemonkey.org.uk/?p=292</guid>
		<description><![CDATA[I&#8217;ve spent the last three days tearing out what little hair I have. For a while now (since circa 2.6.36rc6&#8242;s release) I haven&#8217;t been able to boot a more recent kernel on my laptop. It&#8217;s been one of those things I&#8217;ve been meaning to dig into for a while, but what with kernel summit, plumbers [...]<p><a href="http://codemonkey.org.uk/2010/11/17/chasing-heisenbug/">chasing a heisenbug.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the last three days tearing out what little hair I have.<br />
For a while now (since circa 2.6.36rc6&#8242;s release) I haven&#8217;t been able to boot a more recent kernel on my laptop.<br />
It&#8217;s been one of those things I&#8217;ve been meaning to dig into for a while, but what with kernel summit, plumbers conf, and being distracted with <a href="http://codemonkey.org.uk/2010/11/09/system-call-abuse/">other projects</a>, I back-burnered it for a while, hoping that someone would magically fix it while I did something else.</p>
<p>With the syscall fuzzer running out of things to break in 2.6.36, it became more pressing to move the laptop onto something more recent, which meant I had to track it down.  Initially I suspected kernel bug.  It froze during booting just after initializing usb, printing two messages about disabling interrupts. I bisected it using a bunch of old rpm&#8217;s from koji, and found the exact kernel version that it broke on.  During that day, a bunch of acpi patches got merged, so I figured one of those was to blame.  Hours and hours of bisecting/compiling/rebooting later, bisect told me lies.<br />
Linus pointed out that maybe one of my assumptions was incorrect. Perhaps 2.6.36rc6 which I marked as &#8216;good&#8217; was broken too. So I did a local compile of the kernel that was working fine as an rpm, and sure enough it was also broken.</p>
<p>I checked the compiler version. Hadn&#8217;t changed.  Then it dawned on me that maybe there was something in the initramfs that was breaking.  I diffed a working vs broken initramfs, and got a ton of &#8216;Binary files foo differs&#8217; messages, but nothing in the dracut scripts themselves. My thought at this point: something that got updated during f14 broke initramfs&#8217;s, and the version that I created my rc6 kernel from was made using an earlier toolset.  To test this prognosis, I regenerated the working initramfs with the current tools, rebooted, and sure enough.. boom.</p>
<p>At this point I had dozens of possible suspect packages.  I ended up doing a complete f14 reinstall. Booted a test kernel just fine. yum updated to current. boom.  Now I knew for sure I was on the right path.  I reinstalled again. Then went through a painful cycle of..</p>
<p>update one package<br />
remove and then install kernel package (thus regenerating the initramfs)<br />
reboot</p>
<p>hours later&#8230; I was fully updated, and everything works fine.</p>
<p>I have no idea why the bug isn&#8217;t manifesting now. I have this nagging feeling it&#8217;ll be back at some point.<br />
(This blog entry is mostly to remind myself what happened in case it does rear its head again).</p>
<p>Some days I hate computers.</p>
<p><a href="http://codemonkey.org.uk/2010/11/17/chasing-heisenbug/">chasing a heisenbug.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2010/11/17/chasing-heisenbug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>system call abuse.</title>
		<link>http://codemonkey.org.uk/2010/11/09/system-call-abuse/</link>
		<comments>http://codemonkey.org.uk/2010/11/09/system-call-abuse/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 19:40:13 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://codemonkey.org.uk/?p=290</guid>
		<description><![CDATA[Long time no blog. For a while I&#8217;ve been working on a system call fuzzing tool. A really long time ago, Kurt Garloff wrote one, which I added some improvements to, which just blasted random crap in every register, and called random calls. After it triggered some really stupid bugs which got fixed pretty quickly, [...]<p><a href="http://codemonkey.org.uk/2010/11/09/system-call-abuse/">system call abuse.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>Long time no blog.</p>
<p>For a while I&#8217;ve been working on a system call fuzzing tool. A really long time ago, Kurt Garloff wrote one, which I added some improvements to, which just blasted random crap in every register, and called random calls. After it triggered some really stupid bugs which got fixed pretty quickly, it rarely found anything again. Sometimes when a new syscall was added, someone would miss something, and it would trigger some new bug, but for the most part every call just -EINVAL&#8217;d immediately.</p>
<p>So I started exploring the idea of writing a tool that instead of passing random junk, actually passed semi sensible data. If the first thing a syscall does is check if a value is between 0 and 3, then passing rand() % 3 is going to get us further into the function than it would if we had just passed rand() unmasked.  There are a bunch of other things that can be done too. If a syscall expects a file descriptor, pass one. If it expects an address of a structure, pass it realistic looking addresses (kernel addresses, userspace addresses, &#8216;weird&#8217; looking addresses).</p>
<p>The new tool <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=63bfd7384b119409685a17d5c58f0b56e5dc03da">just found its first real bug</a>.  If perf is running, and mprotect is being fuzzed, then we get an oops. Oops indeed.</p>
<p>I suspect it&#8217;ll find some more bugs over time as I add more twists on &#8216;random&#8217; data. I already have a bunch of ideas that I want to implement (some are listed in the TODO).  Seeing a bunch of people at the kernel summit / plumbers conf last week gave me a whole bunch more ideas too.</p>
<p>The git tree for the tool is at git://git.codemonkey.org.uk/trinity.git<br />
(<a href="http://git.codemonkey.org.uk/?p=trinity.git;a=summary">gitweb</a>)<br />
Snapshot tarballs are at <a href="http://codemonkey.org.uk/projects/trinity/">http://codemonkey.org.uk/projects/trinity/</a></p>
<p><a href="http://codemonkey.org.uk/2010/11/09/system-call-abuse/">system call abuse.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2010/11/09/system-call-abuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SELinux on low memory systems.</title>
		<link>http://codemonkey.org.uk/2010/07/29/selinux-memory-systems/</link>
		<comments>http://codemonkey.org.uk/2010/07/29/selinux-memory-systems/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 01:15:22 +0000</pubDate>
		<dc:creator>davej</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[selinux]]></category>

		<guid isPermaLink="false">http://www.codemonkey.org.uk/?p=288</guid>
		<description><![CDATA[My router is a pretty underpowered machine. It has 512MB of RAM, and its &#8216;disk&#8217; is a 2GB flash card on a CF to ATA adaptor (read as: really slow). But given its job is just routing packets 99% of the time, neither of these deficiencies are an issue. Asides from one problem. Every time [...]<p><a href="http://codemonkey.org.uk/2010/07/29/selinux-memory-systems/">SELinux on low memory systems.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>My router is a pretty underpowered machine. It has 512MB of RAM, and its &#8216;disk&#8217; is a 2GB flash card on a CF to ATA adaptor (read as: really slow). But given its job is just routing packets 99% of the time, neither of these deficiencies are an issue.</p>
<p>Asides from one problem.  Every time I did a yum update that pulled in an selinux policy update, it would consistently exhaust all the ram in the machine. I filed a bug on this,  and as usual, Dan Walsh dropped some selinux knowledge that I had no idea about.</p>
<blockquote><p>
You can customize the bzip block size and &#8220;small&#8221; flag via<br />
/etc/selinux/semanage.conf. After applying you can add entries like these to<br />
your /etc/selinux/semanage.conf to trade off memory vs disk space (block size)<br />
and to trade off memory vs runtime (small):</p>
<p>bzip-blocksize=4<br />
bzip-small=true</p>
<p>You can also disable bzip compression altogether for your module store<br />
via:<br />
bzip-blocksize=0
</p></blockquote>
<p>Since I put that first tweak in place, it&#8217;s survived several policy updates without a hiccup.</p>
<p><a href="http://codemonkey.org.uk/2010/07/29/selinux-memory-systems/">SELinux on low memory systems.</a> is a post from: <a href="http://codemonkey.org.uk">codemonkey.org.uk</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://codemonkey.org.uk/2010/07/29/selinux-memory-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

