<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Linux is for Lovers</title>
	<atom:link href="http://linuxforlovers.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://linuxforlovers.wordpress.com</link>
	<description>Nulla dies sine LOC</description>
	<lastBuildDate>Wed, 28 Dec 2011 08:52:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='linuxforlovers.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Linux is for Lovers</title>
		<link>http://linuxforlovers.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://linuxforlovers.wordpress.com/osd.xml" title="Linux is for Lovers" />
	<atom:link rel='hub' href='http://linuxforlovers.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Running a shell script with a timeout</title>
		<link>http://linuxforlovers.wordpress.com/2011/12/28/running-a-shell-script-with-a-timeout/</link>
		<comments>http://linuxforlovers.wordpress.com/2011/12/28/running-a-shell-script-with-a-timeout/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 08:49:13 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=127</guid>
		<description><![CDATA[In my line of work, deadlock is always close at hand. Running multithreaded programs through prototype compilers, runtime systems, or simulators (and sometimes all three!), there is always the chance that a bug will trigger a deadlock in some layer of the system. There&#8217;s nothing like setting off a bunch of experiments, going to sleep, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=127&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my line of work, deadlock is always close at hand. Running multithreaded programs through prototype compilers, runtime systems, or simulators (and sometimes all three!), there is always the chance that a bug will trigger a deadlock in some layer of the system. There&#8217;s nothing like setting off a bunch of experiments, going to sleep, and waking up the next morning to find that the first experiment (or, inevitably, the experiment that ran <em>right after</em> I stopped checking on things) deadlocked and prevented everything else from running. After being burned by this particular variant of Murphy&#8217;s Law countless times, I learned to always run benchmarks with a hard timeout. Knowing that my experiments won&#8217;t hang forever is honestly right up there with fancy foam mattresses in terms of helping me sleep at night.</p>
<p>I looked around and couldn&#8217;t find any standard Unix commands or shell trickery that did what I wanted, so I wrote a little Python script called <code>timeout.py</code> (<a href="https://gist.github.com/1526975">available via github</a>) some years ago. Unbeknownst to me, in late 2008 GNU coreutils added a <code>timeout</code> program (<a href="http://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html">documentation here</a>) that is now available on many Unix systems. The basic idea behind <code>timeout.py</code> and GNU&#8217;s <code>timeout</code> is the same: run a command with a specified timeout, and 1) exit when the command exits normally or 2) send a signal to the command when the timeout expires.</p>
<p><code>timeout.py</code> works by setting a <code>SIGALRM</code> signal to be delivered at the desired timeout period, and then forking a new child process to run the specified command. The <code>SIGALRM</code> handler then sends a specified signal (<code>SIGKILL</code> by default) to the child process.</p>
<p>One useful feature that I added to <code>timeout.py</code> (that GNU <code>timeout</code> doesn&#8217;t have) is the ability to place the child process in its own process group; when the timeout expires a signal is sent to the entire process group. This is helpful for cleaning up multiprocess programs. <a href="http://parsec.cs.princeton.edu/">PARSEC</a>&#8216;s script for launching benchmarks (<code>parsecmgmt</code>), in particular, forks a bunch of processes to run a benchmark, and killing the top-level <code>parsecmgmt</code> process will <em>not</em> kill the actual benchmark process which lives a few layers deeper.</p>
<p><code>timeout.py</code> is written in Python, so it&#8217;s easy to modify. Its functionality is also exported via a Python module called <code>TimerTask</code> that wraps the functionality of Python&#8217;s standard <a href="http://docs.python.org/library/subprocess.html#popen-constructor"><code>subprocess.Popen()</code></a> call. One caveat with using the <code>TimerTask</code> module is that, since it uses <code>SIGALRM</code>, it may interfere with other uses of <code>SIGALRM</code> in client code.  In particular, you can&#8217;t have multiple simultaneous <code>TimerTask</code>s, each with their own timeouts. <code>TimerTask</code> tries to be safe and raises an exception if there&#8217;s an existing <code>SIGALRM</code> handler, but a better approach would be to fork a new child process to run each <code>TimerTask</code>. Maybe I&#8217;ll add this someday.</p>
<p><code>timeout.py</code> is Unix-only due to the use of, e.g., the <code>SIGALRM</code> signal and the <code>preexec_fn</code> argument to <code>subprocess.Popen()</code>. The source code is available under a GPLv3 license at <a href="https://gist.github.com/1526975">https://gist.github.com/1526975</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/127/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/127/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/127/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=127&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2011/12/28/running-a-shell-script-with-a-timeout/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>
	</item>
		<item>
		<title>New Computer Architecture/Compilers Conference Map</title>
		<link>http://linuxforlovers.wordpress.com/2011/03/30/new-computer-architecturecompilers-conference-map/</link>
		<comments>http://linuxforlovers.wordpress.com/2011/03/30/new-computer-architecturecompilers-conference-map/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 16:14:22 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=115</guid>
		<description><![CDATA[The Computer Architecture/Compilers Conference Map is an indispensable tool in designing a research agenda that has high impact (on your/your adviser&#8217;s travel budget). It&#8217;s a Google Maps mash-up that plots upcoming conference deadlines on a world map, so you can decide where you&#8217;d like to travel and then go about doing some research to get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=115&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://abstract.cs.washington.edu/~devietti/archmap.php">Computer Architecture/Compilers Conference Map</a> is an indispensable tool in designing a research agenda that has high impact (on your/your adviser&#8217;s travel budget). It&#8217;s a Google Maps mash-up that plots upcoming conference deadlines on a world map, so you can decide where you&#8217;d like to travel and then go about doing some research to get you there. Ah, the scientific method at work!</p>
<p>Previous editions of this site used a manually-maintained database of conference information but this was growing tedious so I decided to help out the <a href="http://www.cs.washington.edu/homes/kstrauss">site</a> <a href="http://www.cs.washington.edu/homes/luisceze">creators</a> by automating this process. The general idea was to scrape <a href="http://www.wikicfp.com">WikiCFP</a> for calls for papers of various conferences of interest, parse that information and then feed it into the mash-up. Pretty standard Web 2.0/SOA/AJAX/circa-2004 stuff, but this is 2011 so it&#8217;s even easier now!</p>
<p>Indeed, there were only 2 slightly tricky parts. The first was that WikiCFP doesn&#8217;t run a proper web service for obtaining conference information, so this has to be extracted in a somewhat precarious manner from their HTML pages. The second issue is that the <a href="http://en.wikipedia.org/wiki/Same_origin_policy">same-origin policy</a> prevents this work from happening entirely on the client-side. I would have preferred a solution involving only client-side javascript to keep the design simple and to make it easier for others to see all of the code. But this was not to be: a client script served up by www.cs.washington.edu cannot, try as it might, make requests to www.wikicfp.com. After some wheel-spinning, I decided to take the easy way out and do the cross-domain stuff on the server, via PHP.</p>
<p>When you hit the page, the server script sends a search query to wikicfp.com and parses the resulting HTML webpage (using the fantastic <a href="http://simplehtmldom.sourceforge.net/index.htm">simplehtmldom library</a>). This gives a list of upcoming conferences with their deadlines and locations. The server script packages all of this information into JSON format and sends it in a script to the client. The client then uses Google&#8217;s <a href="http://code.google.com/apis/maps/documentation/javascript/">Geocoding Javascript API</a> to figure out where the conference is and add a marker to the mash-up.</p>
<p>Unfortunately, the search results from wikicfp.com do not contain links to the actual conference websites, only to the WikiCFP call for papers pages. It&#8217;s nice to have direct links to the conference sites, but doing so would involve another HTML request for <em>each</em> conference  displayed, and each request was taking nearly a second to complete (the initial search request also takes about a second). The simplest thing to code up is to perform these requests serially, but with 8 or more conferences to display on the page at once, that&#8217;s several seconds of valuable researcher time spent <em>waiting</em> to see where the  international conferences are, instead of <em>doing</em> the research necessary to attend these conferences. I shudder to think at the lost productivity this would entail.</p>
<p>So, these requests must be done in parallel. The solution I chose was to send the page to the client with links only to the WikiCFP pages. Then, Javascript on the client makes asynchronous requests to the server to fetch the direct conference links, and the client script sneakily rewrites the links while the user is looking at the page. To resolve the direct conference links, the initial page includes the WikiCFP eventId for each conference.  There&#8217;s a &#8220;web service&#8221; (if 40 lines of PHP can qualify as such) on the server that, given such an eventid, fetches the appropriate call for papers page from wikicfp.com, extracts the link to the main conference site, and then returns that link bundled up in JSON format.</p>
<p>Some unscientific benchmarking on my home machine reveals that the initial page load takes about a second, and fetching each direct conference link takes 700-900ms, but the latency of these additional requests is overlapped. So, if you load the page and <em>immediately</em> scroll down and click on one of the conference links at the bottom (or in the map pop-ups) you&#8217;ll go to wikicfp.com. But if you can wait a second (literally) you&#8217;ll get the direct conference link. It is humanly possible to trigger this behavior (it took me about 10 tries), but not by any reasonable usage pattern. However, others looking to re-mash this mash-up be warned!</p>
<p>In the future I&#8217;d like to get the initial page load time down as well.  Since I&#8217;ve already used the parallelism silver bullet, I suspect it&#8217;s time for caching to make an appearance&#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/115/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/115/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/115/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=115&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2011/03/30/new-computer-architecturecompilers-conference-map/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>
	</item>
		<item>
		<title>RCDC data posted</title>
		<link>http://linuxforlovers.wordpress.com/2011/02/01/rcdc-data-posted/</link>
		<comments>http://linuxforlovers.wordpress.com/2011/02/01/rcdc-data-posted/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 21:00:17 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[simulation]]></category>
		<category><![CDATA[rcdc]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=101</guid>
		<description><![CDATA[Just a small note: we&#8217;ve posted the data from the RCDC paper on Tableau Public.  Tableau is a Seattle start-up with an awesome data visualization tool that I currently use for all my data graphing needs.  I&#8217;ve found that it lets me get to that magical place of data analysis where I can answer questions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=101&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a small note: we&#8217;ve posted the data from the <a href="http://www.cs.washington.edu/homes/devietti/index.html#rcdc">RCDC paper</a> on <a href="http://public.tableausoftware.com/views/RCDCARelaxedConsistencyDeterministicComputer/Fig7OverallPerformance?:embed=yes&amp;:toolbar=yes&amp;:tabs=yes">Tableau Public</a>.  <a href="http://www.tableau.com">Tableau</a> is a Seattle start-up with an awesome data visualization tool that I currently use for all my data graphing needs.  I&#8217;ve found that it lets me get to that magical place of data analysis where I can answer questions almost as quickly as I can ask (a future version of Tableau will likely answer questions <em>faster</em> than I can ask, and then I will be out of a job).  Tableau Public provides free data hosting, and a nice interactive web interface to the data.</p>
<p>To moderate that blatant sales pitch, I will add that I actually used Tableau to make all the graphs in the paper.  Making publication-quality graphs is, unfortunately, clearly not what Tableau was designed to do.  It was a somewhat painful process but produced (to my eye) decent results in the end.</p>
<p>For all the graphs in the paper, you can see our exact performance numbers (no more zooming in on the PDF and interpolating with a ruler, as I have occasionally had to do), see the data points behind the averages, and download the data to crunch for yourself.  It&#8217;s like we&#8217;ve got interactive graphs in our paper (but with one level of indirection).  If you find this useful in some way, shoot me an email or a comment!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/101/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/101/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/101/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=101&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2011/02/01/rcdc-data-posted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>
	</item>
		<item>
		<title>RCDC simulator release notes</title>
		<link>http://linuxforlovers.wordpress.com/2011/01/27/rcdc-simulator-release-notes/</link>
		<comments>http://linuxforlovers.wordpress.com/2011/01/27/rcdc-simulator-release-notes/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 17:59:22 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[simulation]]></category>
		<category><![CDATA[rcdc]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=97</guid>
		<description><![CDATA[RCDC simulator README<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=97&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post describes how to install, use and modify the simulator for <a href="http://www.cs.washington.edu/homes/devietti/index.html#rcdc">our ASPLOS paper on RCDC</a>.  Source code is <a href="http://sampa.cs.washington.edu/sampa/Deterministic_MultiProcessing_(DMP)#RCDC_Simulator_Source_Code_and_Data">available here</a>.</p>
<h3>Library Dependences</h3>
<p>The simulator requires v1.40 of the Boost C++ libraries.</p>
<h3>Installation</h3>
<p>You&#8217;ll need an installation of Intel&#8217;s <a href="http://www.pintool.org/">Pin binary instrumentation tool</a>.  Extract the RCDCsim tarball into the <code>PIN_INSTALL_DIR/source/tools/</code> directory, where <code>PIN_INSTALL_DIR</code> is the top-level directory where Pin is installed.</p>
<p>From the <code>PIN_INSTALL_DIR/source/tools/rcdcsim/</code> directory, run <code>make</code> to build the simulator.  You can then run <code>make run-unittests</code> to run the included unit tests, and <code>make test-time</code> to run the <code>ls</code> program under the simulator as a simple integration test that everything works.  The Makefile also has a target for running parsec benchmarks, though you will need to edit some paths before this will work.</p>
<h3>High-level Simulator Structure</h3>
<p>The simulator is structured into multiple processes that communicate through FIFOs.  The <em>frontend</em> (frontend.cpp, PinCallbacks.cpp) is a pintool that instruments every thread in the target program to generate events (e.g. memory accesses).  These events are funneled, via a lock-free queue, into an I/O thread that pushes these events into the frontend FIFO.  The use of a single queue for all program threads maintains causality order (e.g. between a lock release and acquire), which makes the backend simulator easier to write in some cases.</p>
<p>To have valid comparisons across simulation configurations, the configurations should see the same event stream.  For example, to compare performance of RCDC with nondeterministic execution, the two configurations should be fed the same event stream.  Thus, events are broadcast to multiple other FIFOs via the <em>pipefork</em> program (pipefork.cpp), which simply copies events from the frontend FIFO to a number of simulator FIFOs.  Each simulation then runs in its own process, reading events from its own FIFO.</p>
<p>The important simulator files are:</p>
<ul>
<li>SimulatorThread.cpp: contains the simulator&#8217;s main(); receives incoming events and sends them to the MultiCacheSimulator</li>
<li>MultiCacheSimulator.hpp: creates the cores and manages all system-wide state, like shared caches</li>
<li>SMPCache.hpp: manages per-core state, such as that core&#8217;s private cache hierarchy</li>
<li>HierarchicalCache.hpp: models a single cache; these can be chained together into arbitrarily deep cache hierarchies</li>
</ul>
<h3>Design Decisions</h3>
<p>I decided to adopt a multi-process design in this pintool because I was tired of 1) tracking down concurrency bugs in my multi-threaded Pin instrumentation (the irony of which, as a concurrency researcher, is not lost on me), and 2) not being able to use gdb on my pintool (despite the Pin manual&#8217;s attestations that this is in fact possible).  These two features combined are particularly unhelpful.  Alternatively, keeping the simulator proper in its own single-threaded process means that the &#8220;untrusted&#8221; multi-threaded code is kept to a minimum, and that the simulator is very gdb-friendly.  The simulator can even be written in a completely different language: I mean, isn&#8217;t it about time we started writing architecture simulators in Haskell?</p>
<p>However, there is a downside to the multi-process design in that there is not really much feedback from the simulator to the event generator.  There is back-pressure via the FIFOs, but RCDC&#8217;s execution model in particular requires finer-grained control.  RCDC sometimes requires events for a specific simulated processor <em>P</em> (say, if all other processors are waiting for <em>P</em> to hit its quantum boundary) to make forward progress.  In a situation like this, the simulator has no way to say to the event generator: &#8220;stall everyone other than <em>P</em>&#8220;.  Instead, the simulator must constantly accept events, buffering them locally until enough events for <em>P</em> arrive to let <em>P</em> finish its quantum, which lets all processors make progress again &#8211; which allows the buffered events to be processed.  This buffering is currently done with per-processor buffers, which has the side effect of destroying the nice causality-ordering of incoming events, so causality has to be reconstructed in the simulator.</p>
<p>This was generally not a problem in the experiments we ran, but it did occasionally lead to out-of-memory crashes.  Execution models that do not pause processors would not, however, suffer from this issue.</p>
<h3>License and Acknowledgments</h3>
<p>All the simulator code is licensed under GPLv3 (except for some stuff I stole from SESC which is GPLv2, and the lockfree queue which is under the Boost Public License).  Many thanks to <a href="http://tim.klingt.org">Tim Blechmann</a> for the lockfree queue, and the <a href="http://sesc.sourceforge.net/">SESC</a> developers for the code of an earlier version of this simulator.</p>
<h3>Version History</h3>
<p>version 0 (27 Jan 2011): initial release<br />
version 1 (7 Nov 2011): added missing header file</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=97&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2011/01/27/rcdc-simulator-release-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>
	</item>
		<item>
		<title>&#8220;jumpy&#8221; jQuery slide animations</title>
		<link>http://linuxforlovers.wordpress.com/2010/11/18/jumpy-jquery-slide-animations/</link>
		<comments>http://linuxforlovers.wordpress.com/2010/11/18/jumpy-jquery-slide-animations/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 12:01:52 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=86</guid>
		<description><![CDATA[I recently decided to add paper abstracts to my academic website, to allow people to get a quick overview of a paper without downloading the whole thing.  I wanted these abstracts to be hidden at first, and then revealed by clicking on a link.  The perfect excuse to dabble in a bit of Javascript, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=86&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently decided to add paper abstracts to my academic website, to allow people to get a quick overview of a paper without downloading the whole thing.  I wanted these abstracts to be hidden at first, and then revealed by clicking on a link.  The perfect excuse to dabble in a bit of Javascript, and whip something up in an hour or two, right?</p>
<p>With Google-given example code I was indeed able to get something basic working pretty quickly that made the entire abstract either visible or not, by twiddling the <code>display</code> CSS property.  Then I started thinking: what would it take to have the abstract appear with a &#8220;slide in&#8221; animation, instead of just suddenly becoming visible?</p>
<p>Well, at least I had good intentions to start.</p>
<p>After many hours of fumbling, I got something pretty decent working with jQuery.  The only issue was that the animation was a bit &#8220;jumpy&#8221; at the end.  This weirdness persisted across all the browsers I tried (Firefox and Chrome on Linux, and Firefox and IE on Windows).  Many of the examples I found on the internet were for sliding in fixed-height content, but I couldn&#8217;t specify the height of each abstract in advance, since they were all of different lengths (i.e., word counts).</p>
<p>My desperate mind turned to thoughts of hacking at the jQuery code, and then, slightly more plausibly, rendering the text invisibly in the background, reading its height via Javascript and recording it in CSS, and then making the text <code>display: none;</code> again.  I was setting in on coding this solution (which I still think would have been a lot of fun, despite its patent horribleness) when I discovered <a href="http://api.jquery.com/slideToggle/#comment-76397516">this comment</a> on the jQuery documentation page for slideToggle().  Turns out I just needed to set the <em>width</em> of the content (which was fixed for my page), and that would add enough constraints to the layout to allow browsers to render the animation smoothly.</p>
<p>It was all of a 1-line CSS fix in the end.</p>
<p>p.s. You can see the &#8220;jumpiness&#8221; that results when the div being animated doesn&#8217;t have a width constraint in <a href="http://www.cs.washington.edu/homes/devietti/etc/jquery-slide-demo.html" target="_blank">this example I put together</a>.  There&#8217;s also a demo of the fixed code.  Curiously, an explicit width on some parent div (which I&#8217;d had all along) is not sufficient to force the smooth animation of a child; the child itself needs a width (or height).  This code uses jQuery 1.4.3.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=86&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2010/11/18/jumpy-jquery-slide-animations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>
	</item>
		<item>
		<title>installing ubuntu karmic server on bochs</title>
		<link>http://linuxforlovers.wordpress.com/2010/02/06/installing-ubuntu-karmic-server-on-bochs/</link>
		<comments>http://linuxforlovers.wordpress.com/2010/02/06/installing-ubuntu-karmic-server-on-bochs/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 02:30:41 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[simulation]]></category>
		<category><![CDATA[bochs]]></category>
		<category><![CDATA[qemu]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=70</guid>
		<description><![CDATA[I recently decided to try using the x86 emulator bochs for some of my architecture research, as bochs seems to have a well-structured code base highly amenable to hacking.  I also considered using qemu, but qemu&#8217;s design was ultimately not a great fit for the do-1-insn-at-a-time model of an architecture simulator.  Instead, qemu is designed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=70&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently decided to try using the x86 emulator <a href="http://bochs.sourceforge.net/">bochs</a> for some of my architecture research, as bochs seems to have a well-structured code base highly amenable to hacking.  I also considered using <a href="http://www.qemu.org">qemu</a>, but qemu&#8217;s design was ultimately not a great fit for the do-1-insn-at-a-time model of an architecture simulator.  Instead, qemu is designed to run a bunch of instructions (really fast) instead of stopping precisely after each one.  For the record, I was using bochs from CVS as of 2 Feb 2010 (bochs 2.4.2 was the latest release at the time) and qemu 0.12.2.</p>
<p>Next came the supposedly easy part: create a disk image with Linux on it (I wanted to use Ubuntu Karmic Server) and  start simulating.</p>
<p>It turns out that running the Ubuntu installer in bochs is a real pain.  Not only is it slow, but I encountered an assertion failure (in bochs) during the disk partition step of the installation.  It turned out that this was due to some funkiness in the bochs plugin system (which is based on dynamically-linked libraries); switching to static linking finally got me past the assertion failure.  After that adventure I had some kind of boot loader corruption that caused the virtual machine to fail to boot.  Don&#8217;t even ask about getting networking to work (it still doesn&#8217;t), or why the terminal occasionally looks like the picture below.</p>
<div id="attachment_71" class="wp-caption aligncenter" style="width: 310px"><a href="http://linuxforlovers.files.wordpress.com/2010/02/bochs-funky-terminal.png"><img class="size-medium wp-image-71 " title="graphical corruption of the terminal in bochs" src="http://linuxforlovers.files.wordpress.com/2010/02/bochs-funky-terminal.png?w=300&#038;h=187" alt="graphical corruption of the terminal in bochs" width="300" height="187" /></a><p class="wp-caption-text">graphical corruption of the terminal in bochs.</p></div>
<p>Ultimately, I found some success when configuring bochs with the command listed below (everything should be on 1 line):</p>
<pre>./configure --enable-sb16 \
  --enable-ne2000 \
  --enable-all-optimizations \
  --enable-cpu-level=6 \
  --enable-x86-64 \
  --enable-sse=2 \
  --enable-pci \
  --enable-acpi \
  --enable-usb \
  --enable-usb-ohci \
  --enable-show-ips \
  --enable-clgd54xx \
  --enable-pci \
  --enable-smp \
  --enable-debugger \
  --enable-disasm</pre>
<p>An alternative approach is to use <code>debootstrap</code> to setup a chroot Linux installation, and then copy that installation onto the virtual hard disk, as <a href="http://www.ugrad.physics.mcgill.ca/wiki/index.php/Preparing_a_Debian_disk_image_for_Bochs">outlined here</a>.  However, this is a pretty involved procedure, debootstrap with Ubuntu didn&#8217;t install any kernels for me, and installing the boot loader also seemed tricky.</p>
<p>Contrast these circuitous approaches with qemu, which is very fast (even without using KVM acceleration) and installed Ubuntu without a hitch on the first try.  With networking.  And a nice virtual monitor via VNC.  All straight out of the box.  qemu+kvm might even be fast enough to compile code inside the VM, which would ensure that the right headers, libraries, etc are used (otherwise you can always just mount the virtual drive as a regular filesystem and use <code>cp</code> from the host machine).  qemu is everything I could ask for &#8212; if only its codebase was more in tune with what I wanted to do!</p>
<h3>The Best of Both Worlds</h3>
<p>It took me a while to realize that I could have my bochs and qemu it, too, as both emulators can read and write a common virtual disk format: it&#8217;s called &#8220;raw&#8221; for qemu and &#8220;flat&#8221; for bochs.  Essentially, it just uses a single regular file as the virtual disk.  The only trick is that you have to create the virtual disk using bochs&#8217; <code>bximage</code> program; if it&#8217;s created with qemu&#8217;s corresponding <code>qemu-img</code> program then bochs won&#8217;t recognize the virtual disk for some reason.</p>
<p>With this hybrid approach, I can boot the disk using qemu for installing the OS, interactively setting things up via the commandline, downloading packages from the internet and so on, and then reboot into bochs to run simulations.  It gives me the excellent speed and hardware emulation of qemu, with the more-natural-for-simulation interface of bochs.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/70/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/70/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/70/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=70&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2010/02/06/installing-ubuntu-karmic-server-on-bochs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>

		<media:content url="http://linuxforlovers.files.wordpress.com/2010/02/bochs-funky-terminal.png?w=300" medium="image">
			<media:title type="html">graphical corruption of the terminal in bochs</media:title>
		</media:content>
	</item>
		<item>
		<title>thunderbird to (hosted) gmail</title>
		<link>http://linuxforlovers.wordpress.com/2009/11/10/thunderbird-to-hosted-gmail/</link>
		<comments>http://linuxforlovers.wordpress.com/2009/11/10/thunderbird-to-hosted-gmail/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 04:19:24 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[thunderbird]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=65</guid>
		<description><![CDATA[My school (UW) recently allowed students to switch their school email accounts over to one of 2 providers: Google (via gmail) or Microsoft (via Outlook Web Access).  Feeling the inexorable pull of the cloud, I decided to take the plunge and switch to gmail, but one thing held me back.  I have used Thunderbird for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=65&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My school (<a href="http://www.washington.edu">UW</a>) recently allowed students to switch their school email accounts over to one of 2 providers: Google (via gmail) or Microsoft (via Outlook Web Access).  Feeling the inexorable pull of the cloud, I decided to take the plunge and switch to gmail, but one thing held me back.  I have used Thunderbird for a few years now and have accumulated roughly 1GB of archived messages that are generally unimportant but occasionally vital.  I&#8217;ve also espoused <a href="http://lifehacker.com/182318/empty-your-inbox-with-the-trusted-trio">Lifehacker&#8217;s Trusted Trio</a> email organization system and so many of the emails in my archive are tagged for easier organization.</p>
<p>I&#8217;d like to have this email archive searchable from gmail.  And I would really like to have all those tags I&#8217;ve accumulated over the years show up as gmail &#8220;labels&#8221;.  Fortunately, this isn&#8217;t too difficult thanks to the following:<span id="more-65"></span></p>
<ol>
<li> Thunderbird stores message tags in a special <code>X-Mozilla-Keys</code> header in the email message itself.  So it&#8217;s easy to recover the tags by parsing the email.</li>
<li>Google provides an <a href="http://code.google.com/apis/apps/email_migration/developers_guide_protocol.html">email migration API</a> for uploading messages into some hosted Google Apps gmail accounts.  Unfortunately, &#8220;This API  is only available to Google Apps Premier, Education, and Partner Edition domains, and cannot be used for migration into Google Apps Standard Edition email or Gmail accounts&#8221; sayeth the Google.  You also have to have your Google Apps administrator enable email migration by end users &#8211; be default, only administrators can migrate email.</li>
</ol>
<p>There are a few other nice thing about using the migration API (as opposed to just copying the emails from one IMAP folder to another).  One is that time/date information is preserved.  With an IMAP copy, emails all appear to have arrived on the day that the copy was made.  Also, metadata can be preserved (e.g. messages flagged &#8220;Important&#8221; in your mail client can be translated into &#8220;starred&#8221; messages in gmail).  Overall, your/my obsessive-compulsive side will be much happier if you can use the migration API.</p>
<h2>tbird2gmail.py</h2>
<p>So, I wrote a little Python <span style="text-decoration:line-through;">script</span> program that uses the Google email migration API to upload a bunch of emails from Thunderbird (or any ol&#8217; mbox file, but it only understands how to read &#8220;tags&#8221; set by Thunderbird) into a hosted gmail account.</p>
<h3>installation</h3>
<p>You&#8217;ll need:</p>
<ol>
<li> the <a href="http://code.google.com/p/gdata-python-client/downloads/list">Google Python API</a> (I used version 2.0.4)</li>
<li>the <a href="http://www.cs.washington.edu/homes/devietti/tbird2gmail/tbird2gmail.py">actual python script</a> (for the curious, a darcs repository is <a href="http://www.cs.washington.edu/homes/devietti/tbird2gmail/">also available</a>)</li>
</ol>
<h3>usage</h3>
<p>You need to ensure that Python can find the code in the Google Python API.  The simplest way is to set your PYTHONPATH environment variable to include the root directory of the API files.  For example, if you extract the Google API files into the same directory as the tbird2gmail.py script, any you&#8217;re using bash, you can run everything with:</p>
<p><code>PYTHONPATH=$PYTHONPATH:gdata-2.0.4 python tbird2gmail.py arguments...</code></p>
<p>The tbird2gmail script works by taking a series of mbox files as command line arguments, and uploads their contents to the specified hosted gmail account.  You need to provide your login information (email address and password).  One particularly useful feature is to specify (via the <code>--label</code> command line flag) a label to be applied to all uploaded messages.  In case the upload fails for some reason (see below) it is easy to find all the emails that were part of the upload, so you can e.g. delete them and try again.</p>
<h3>caveats</h3>
<p>I used this script to upload roughly 30,000 emails (about 1GB in size) into my UW gmail account.  Emails are uploaded in batches of configurable size; I found that when using a batch size any larger than about 2MB, the gmail server would get overwhelmed and close the connection.  So I shrunk the batch size, added a delay in between batch sends, and the thing ran happily all night. The theoretical maximum batch size allowed by the Google API is 32MB.</p>
<p>This is definitely a hack; the Google API docs say that the server should return a 503 error when it becomes overworked, but in practice I found this was not triggered reliably before the connection was simply terminated.</p>
<p>This script <strong>should not be used</strong> if the underlying mbox files can be modified by another application.  Doing so could result in a corrupted mailbox file, costing you all your mail!  So close down your mail client before uploading any email.</p>
<p>Gmail will also reject mail that does not conform to the RFC822 specification.  I had a few emails that were missing proper <code>Date:</code> headers, and others that had invalid attachments (generally  bounce messages).  tbird2gmail will log these failed emails into a new mbox file, where you can edit them and then try uploading again.  The failure reason returned from the Google server is stored in a special <code>X-Tbird2gmail-Upload-Failure-Reason</code> header in the message itself.  You can read more about what these failure codes look like at <a href="http://code.google.com/apis/gdata/docs/2.0/reference.html#HTTPStatusCodes">http://code.google.com/apis/gdata/docs/2.0/reference.html#HTTPStatusCodes</a>.</p>
<p><strong>Update (3 May 2010):</strong> <a href="http://www.cs.washington.edu/homes/lglenden/">Lisa</a>, another grad student here at UW, has written some python scripts for migrating mbox files into Google Apps that don&#8217;t depend on the now-deprecated interface in the Google Python libraries; just pure Python 2.6.  You can find the scripts <a href="http://hyperion.cs.washington.edu/projects/gmailmigrate/wiki/">here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=65&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2009/11/10/thunderbird-to-hosted-gmail/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>
	</item>
		<item>
		<title>powerpoint+flash interaction</title>
		<link>http://linuxforlovers.wordpress.com/2009/04/17/powerpointflash-interaction/</link>
		<comments>http://linuxforlovers.wordpress.com/2009/04/17/powerpointflash-interaction/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 07:57:04 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[flash + powerpoint]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[powerpoint]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=38</guid>
		<description><![CDATA[One of the cool things I learned about Powerpoint the other day is that it&#8217;s possible to create interactions between an embedded Flash movie and the presentation itself.  This allows you to coordinate animations across the movie and the slide, e.g. to have a mouse click sometimes advance the slide and sometimes trigger some action [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=38&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One of the cool things I learned about Powerpoint the other day is that it&#8217;s possible to create interactions between an embedded Flash movie and the presentation itself.  This allows you to coordinate animations across the movie and the slide, e.g. to have a mouse click sometimes advance the slide and sometimes trigger some action in the movie.</p>
<p>The reason all this works is because you can do function calls up from the Flash movie, through the ActiveX container and into VBA code attached to the Powerpoint presentation.   You can also call down from Powerpoint into Flash in a similar manner, though I haven&#8217;t experimented with this.</p>
<h3>The Easy Part</h3>
<p>Perhaps surprisingly, writing the code is the easy part.  The Visual Basic code attached to the Powerpoint slide looks like this:</p>
<p><pre class="brush: vb;">

Private Sub ShockwaveFlash1_FlashCall(ByVal request As String)
  'request looks like:
  '&lt;invoke name=&quot;foo&quot; returntype=&quot;xml&quot;&gt;&lt;arguments&gt;&lt;/arguments&gt;&lt;/invoke&gt;;
  If InStr(request, &quot;gotoNextSlide&quot;) &gt; 0 Then
    ActivePresentation.SlideShowWindow.View.Next
  ElseIf InStr(request, &quot;gotoPrevSlide&quot;) &gt; 0 Then
    ActivePresentation.SlideShowWindow.View.Previous
  End If
End Sub

</pre></p>
<p><code>ShockwaveFlash1</code> is the name of the ActiveX control for the Flash movie.  If you only have one of these on a slide, this will be its name.  But if you have more than one, the names will be <code>ShockwaveFlash2</code> and so on.  </p>
<p>In ActionScript land, the code that calls out of the Flash movie looks like this:</p>
<p><pre class="brush: jscript;">

import flash.external.ExternalInterface;

if ( ExternalInterface.available ) {
   ExternalInterface.call( &quot;gotoNextSlide&quot; );
}

</pre></p>
<h3>The Hard Part</h3>
<p>Unfortunately, this code won&#8217;t do anything out of the box.</p>
<p>This is because of <a href="http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&amp;file=00000347.html">the Flash player security model</a>, with which I became overly familiar over the course of this project.  There are several different security sandboxes in which a Flash movie can potentially be running.  In order for <code>ExternalInterface</code> function calls to work, the movie needs to be, sensibly, in the most trusted sandbox: the LOCAL_TRUSTED sandbox. Fortunately, a movie can check what sandbox it&#8217;s running in with the following code:</p>
<p><pre class="brush: jscript;">
import flash.system.Security;
trace( Security.sandboxType );
</pre></p>
<p>If you run a Flash movie in the standalone Flash player, it runs with LOCAL_TRUSTED privileges.  However, if you run that same movie via an ActiveX control in Powerpoint, the default security settings put it in the LOCAL_WITH_NETWORK sandbox, which is <em>insufficiently</em> privileged to allow Powerpoint-Flash interaction to work.  Instead, things will fail silently.  And no amount of tinkering with Powerpoint&#8217;s security settings (trusting ActiveX content, macros, etc.) will fix things.  After much anguish, I discovered that you have to talk directly to the Flash runtime to get a movie into the LOCAL_TRUSTED sandbox when running inside an ActiveX control.</p>
<p>There are several ways of telling the Flash runtime to put a particular movie in the LOCAL_TRUSTED sandbox, all of them documented at the Adobe link above.  Probably the easiest way is via <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html">the Flash Security Settings Manager gui</a>: it&#8217;s a Flash applet that runs in your browser to control your local Flash settings &#8211; spooky!  You can decide to trust particular .swf files, or directories, or even the Powerpoint executable itself which will automatically trust all movies that are included in Powerpoint slides.  I&#8217;ve <a href="http://linuxforlovers.wordpress.com/2009/03/15/dmp-asplos-presentation-readme/">blogged previously</a> about how to do this, but there are a few tricky parts I haven&#8217;t covered before.</p>
<p>If you&#8217;re embedding Flash movies into Powerpoint (as opposed to just linking to the movies), then you <em>have to</em> trust the Powerpoint binary, as the Flash movies don&#8217;t have a real filesystem location &#8211; if you check where an embedded movie lives via <code>root.loaderInfo.url</code> you will get the path to the Powerpoint binary.  Trusting the Powerpoint binary is a hack that allows the movie, indirectly, to be trusted as well.  Trusting Powerpoint will also enable non-embedded Flash movies to run in the LOCAL_TRUSTED sandbox.</p>
<p>If your Powerpoint slides just link to the Flash movies, then you can have finer-grained control over security, but of course you have to ensure the links are always valid or the movies won&#8217;t work.</p>
<h3>Other security considerations</h3>
<p>Getting the Flash player security settings right was definitely the trickiest part, because they&#8217;re a bit out of the way and not terribly popular topics of conversation according to Google.  But to make Powerpoint and Flash play nice together you also need to (clearly) enable macros in Powerpoint and allow ActiveX controls to run.  ActiveX controls don&#8217;t need any special treatment however: they can run in Safe Mode with privileges that prompt you before they are enabled with &#8220;minimal restrictions&#8221;.  I never saw a prompt, because I don&#8217;t think the Flash ActiveX control requires any special privileges.</p>
<p>Once you get the security settings resolved things work great.  It is highly unlikely, however, that things will work out-of-the-box if you move the presentation to a new computer, due to the default security settings.  But once you get things integrated, you get the power of Flash for doing complicated animations with the ease of Powerpoint for the simple stuff.  Pretty much the best of both worlds!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=38&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2009/04/17/powerpointflash-interaction/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>
	</item>
		<item>
		<title>Sharing Amazon Elastic Block Store among multiple instances</title>
		<link>http://linuxforlovers.wordpress.com/2009/04/11/sharing-amazon-elastic-block-store-among-multiple-instances/</link>
		<comments>http://linuxforlovers.wordpress.com/2009/04/11/sharing-amazon-elastic-block-store-among-multiple-instances/#comments</comments>
		<pubDate>Sat, 11 Apr 2009 06:34:55 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=42</guid>
		<description><![CDATA[Editor&#8217;s Note: This whole rigmarole is unnecessary now that you can boot from EBS-backed AMIs that can have essentially unbounded size.  But this trick was fun while it lasted! I love Amazon&#8217;s Elastic Compute Cloud, and have been using it to run research experiments without having to worry about multiplexing computing resources among other members [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=42&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Editor&#8217;s Note</strong>: This whole rigmarole is unnecessary now that you can <a href="http://aws.typepad.com/aws/2009/12/new-amazon-ec2-feature-boot-from-elastic-block-store.html">boot from EBS-backed AMIs</a> that can have essentially unbounded size.  But this trick was fun while it lasted!</p>
<p>I love Amazon&#8217;s <a href="http://aws.amazon.com/ec2/">Elastic Compute Cloud</a>, and have been using it to run research experiments without having to worry about multiplexing computing resources among other members of my research group.  No running <em>top</em> after I login to make sure I&#8217;m not stepping on someone else&#8217;s experiments:  I launch an instance and I get it all to myself.</p>
<p>Sharing storage across instances, however, is tricky.  For my purposes, having a read-only copy distributed among my instances is sufficient; of course adding read/write access makes things substantially trickier.  Yet even given that I was fine with read-only access, none of the solutions that immediately came to mind were satisfactory:</p>
<ol>
<li>Put everything in the root partition of my instance.  Every instance launched will have this same image, which is great.  The problem is that the root partition is just 10GB and doesn&#8217;t seem to be able to be increased.  Also, bundling up an instance is quite slow, making updates painful.</li>
<li>You can get copious amounts of ephemeral storage via /mnt on each instance, but this doesn&#8217;t persist across the lifetime of an instance.  I could download a tarball from S3 and extract it to /mnt every time when I launch an instance, but this seems very hackish.</li>
<li>You can get persistent network storage in the form of the Elastic Block Store, but this can only be attached to one instance at a time.  Doh!</li>
<li>You can run NFS or GFS or whatever you want on your instances after you launch them, but this seems like a lot of work.  I&#8217;m supposed to be working on research, after all.</li>
</ol>
<p>What I really wanted was the ability to mount an EBS volume read-only on multiple instances.  Since things are read-only, there won&#8217;t be any consistency issues but, still, Amazon doesn&#8217;t support this.  Until I discovered a hack to make it possible, using EBS snapshots.</p>
<p>The basic idea is to have a master EBS volume <em>V</em> that you want to replicate with read-only copies across a number of instances.  Upon bootup, each instance makes a snapshot of <em>V</em> and then its own personal volume <em>Vp</em> based on that snapshot.  Each instance can then attach the volume <em>Vp</em> and voila &#8211; we&#8217;ve got our data replicated across our instances.  No fancy network filesystem or S3 hacks necessary.</p>
<p>What makes all this go is that EBS snapshots are very fast (because they&#8217;re lazily constructed).  My master volume V is 10GB in size, and about 7GB full at the moment.  And this whole take-a-snapshot-and-mount-it routine takes less than 10 seconds.  After I&#8217;m done with an instance, I have it throw away the snapshot and volume <em>Vp</em> to save space.  But since snapshots are built on diffs, having a bunch of snapshots doesn&#8217;t take up much room in S3 (i.e. cost much money) anyway.  Ultimately, EBS is doing exactly what I would want to provide a high performance read-only version of the volume: lazy creation of snapshots makes replication fast, and each snapshot volume functions as a cache to increase read bandwidth.  And all this without any extra engineering on my part!</p>
<p>I put together some Python scripts (with the help of the excellent <a href="http://code.google.com/p/boto/">Boto library</a>) to automate this read-only replication of an EBS volume.  All you have to do is edit some parameters in ec2lib.py and then link these scripts into your distro&#8217;s boot/shutdown routines; this code is designed to be run from the instance itself.  <a href="http://www.cs.washington.edu/homes/devietti/code/ebs-readonly-0.1.tar.gz">The code is available</a> under the MIT license (like Boto itself).  The repository includes a copy of Boto 1.7a to keep things self-contained.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=42&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2009/04/11/sharing-amazon-elastic-block-store-among-multiple-instances/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>
	</item>
		<item>
		<title>Lockfox version 0.1 released</title>
		<link>http://linuxforlovers.wordpress.com/2009/03/20/lockfox-version-01-released/</link>
		<comments>http://linuxforlovers.wordpress.com/2009/03/20/lockfox-version-01-released/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 04:51:24 +0000</pubDate>
		<dc:creator>Joe Devietti</dc:creator>
				<category><![CDATA[lockfox]]></category>

		<guid isPermaLink="false">http://linuxforlovers.wordpress.com/?p=29</guid>
		<description><![CDATA[The first beta version of the Lockfox Firefox extension has been posted to addons.mozilla.org!  I developed this with Rohit Chaudhri as our class project for Yoshi Kohno&#8216;s graduate course in computer security at the University of Washington.  I&#8217;ll use this blog to talk about the development of Lockfox and interact with its (eventual) users.  Right [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=29&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The first beta version of the Lockfox Firefox extension has been posted to <a href="https://addons.mozilla.org/en-US/firefox/addon/11150">addons.mozilla.org</a>!  I developed this with <a href="http://change.washington.edu/people/rohit">Rohit Chaudhri</a> as our class project for <a href="http://www.cs.washington.edu/homes/yoshi/">Yoshi Kohno</a>&#8216;s <a href="http://www.cs.washington.edu/education/courses/cse564/08au/">graduate course in computer security</a> at the University of Washington.  I&#8217;ll use this blog to talk about the development of Lockfox and interact with its (eventual) users.  Right now it&#8217;s just an experimental addon (so it&#8217;s kinda hard to find) but hopefully it will soon pass AMO&#8217;s code review and be listed as a trusted, public addon!</p>
<h3>How Lockfox works</h3>
<p>Lockfox works in a manner similar to the SSH known_hosts database, but instead of remembering an association between<em> public keys</em> and <em>domain names</em>, Lockfox remembers an association between a <em>password</em> submitted on a web form and the <em>domain</em> to which that password was submitted.  For added privacy, Lockfox stores only the SHA1 hash of the password, not the password itself.  Lockfox monitors all password submissions and checks on each submission if a remembered (hashed) password is being submitted to a new, unknown domain.  Lockfox prompts the user with a dialog to ensure that the user wants to submit their password to a new domain.  If the user authorizes the submission, Lockfox forges a new trusted association between the password and the new domain.  Otherwise, Lockfox redirects the user to the old, trusted domain.</p>
<p>For additional security, Lockfox also remembers any SSL certificate information available for the site to which a password is submitted. If this certificate information changes unexpectedly for some password submission, Lockfox requires the user to authorize the submission.  The intuition here is exactly the same as that behind SSH&#8217;s known_hosts database: an unexpectedly changed SSL certificate likely indicates a man-in-the-middle attack.</p>
<h3>Why Lockfox (hopefully) works</h3>
<p>The intuition behind Lockfox is that a password is generally used only with a very limited set of domains &#8211; if a password gets sent to a different domain, it is likely that a phishing attack is taking place.   Lockfox has a number of advantages compared to existing anti-phishing techniques:</p>
<ul>
<li>Lockfox works entirely locally, building up a custom set of associations for each user without any global coordination or public key infrastructure.  There&#8217;s no blacklist to be broadcast or constantly updated.</li>
<li>By remembering a set of trusted associations between passwords and web sites, Lockfox builds up a custom set of associations for each user.  This is, in a sense, a per-user whitelist: it has the advantages of a whitelist (shorter to specify, default action is to be secure) but without the disadvantage of maintaining a whitelist that works for all users.</li>
<li>Lockfox is able to detect and prevent phishing attacks at exactly the moment that they occur, which will hopefully result in an effective form of user education about how to detect and avoid phishing sites.</li>
</ul>
<p>To be fair, there are some disadvantages to Lockfox&#8217;s approach, too:</p>
<ul>
<li>If a user recycles a password between multiple sites, the user will receive a Lockfox warning for each new site.  This may annoy the user enough to make them disable Lockfox altogether.  To try to ameliorate this, Lockfox can optionally, at installation time, import passwords (and their corresponding web sites) that are remembered by Firefox as &#8220;trusted&#8221;.  So if you&#8217;ve built up a large set of remembered passwords with Firefox, Lockfox can automatically trust those sites that you, implicitly, already trust.</li>
<li>Lockfox works only for passwords, and not for other information a user may want protected, such as credit card numbers, social security numbers, etc.</li>
</ul>
<p>Ultimately, Lockfox is just one more tool for keeping people safe online.  It will work best when combined with existing anti-phishing techniques (such as those already built-in to Firefox).</p>
<p>Are you using Lockfox?  Thanks for your bravery, and please post any feedback in the comments!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linuxforlovers.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linuxforlovers.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linuxforlovers.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linuxforlovers.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linuxforlovers.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linuxforlovers.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linuxforlovers.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linuxforlovers.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linuxforlovers.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linuxforlovers.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linuxforlovers.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linuxforlovers.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linuxforlovers.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linuxforlovers.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linuxforlovers.wordpress.com&amp;blog=6669795&amp;post=29&amp;subd=linuxforlovers&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linuxforlovers.wordpress.com/2009/03/20/lockfox-version-01-released/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/685692a2d3ae16670b827ea21399a6a1?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linuxforlovers</media:title>
		</media:content>
	</item>
	</channel>
</rss>
