flak rss random

iPad Air review

Very early thoughts. Upgraded from the iPad 4 because that was too heavy. Almost went with the new iPad Mini, but reading magazines is a primary use case for me and I wanted something that more closely matched a real magazine in size. Also, the Mini isn’t shipping yet while the Air is sitting on my lap.

more...

Posted 05 Nov 2013 21:40 by tedu Updated: 14 Nov 2013 15:33
Tagged: gadget review

almost original original links

Once upon a time, Google Reader shut down, and everybody scrambled to write a replacement. I didn’t actually use Reader or any RSS reader, but writing one seemed like a great idea. I’m quickly learning to regret that decision.

Let’s consider just one terribly difficult task, extracting the link to a post. Maybe the <id> element?

<id>tag:blogger.com,1999:blog-4341554630550651649.post-8843802384533935675</id>

That doesn’t look very clickable, but nobody said it should be, so let’s move on. Maybe it’s one of the aptly named <link> elements?

<link rel="replies" type="application/atom+xml" href="http://blog.cryptographyengineering.com/feeds/8843802384533935675/comments/default" title="Post Comments" />
<link rel="replies" type="text/html" href="http://blog.cryptographyengineering.com/2013/10/lets-audit-truecrypt.html#comment-form" title="65 Comments" />
<link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/4341554630550651649/posts/default/8843802384533935675?v=2" />
<link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/4341554630550651649/posts/default/8843802384533935675?v=2" />
<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/AFewThoughtsOnCryptographicEngineering/~3/R0_NjwyIhqI/lets-audit-truecrypt.html" title="Let's audit Truecrypt!" />

That last one looks promising, but it’s also kind of fucked up. Can’t I just get a normal link? Oh, here we go:

<feedburner:origLink>http://blog.cryptographyengineering.com/2013/10/lets-audit-truecrypt.html</feedburner:origLink>

Hurray! But, but, but... Nooooo, what’s this?

<feedburner:origLink>http://feedproxy.google.com/~r/AFewThoughtsOnCryptographicEngineering/~3/EIOZbNuZhXc/lets-audit-truecrypt.html</feedburner:origLink>

WTF Google? Why are there two original links? What definition of original are we using here?

(To be clear, and for even more added bonus fun, the second origLink element only shows up sometimes. Welcome to the cloud. Why be correct when you can be available?)

Posted 04 Nov 2013 04:24 by tedu Updated: 09 Apr 2022 21:28
Tagged: bugs software web

potential thread startup race condition

As per Old New Thing, a thread can start running before the function that creates it returns. The same bug can exist in a program running on OpenBSD. (The bug is not in the thread library, but the program that calls it.) Here’s a bit of code from the body of rthread.c:pthread_create.

        _spinlock(&_thread_lock);
        LIST_INSERT_HEAD(&_thread_list, thread, threads);
        _spinunlock(&_thread_lock);

        /* we're going to be multi-threaded real soon now */
        __isthreaded = 1;
        rc = __tfork_thread(&param, sizeof(param), _rthread_start, thread);
        if (rc != -1) {
                /* success */
                *threadp = thread;
                return (0);
        }

Notice that we have to put the newly allocated thread structure in the thread list before the thread itself exists, otherwise we’d be subject to the race ourselves.

The old pthread regress tests had several examples of exactly this bug because they were written against a cooperative multithreaded library. Finding and fixing those was just a little bonus fun I had while trying to track down early bugs in rthreads.

Posted 26 Oct 2013 00:19 by tedu Updated: 26 Oct 2013 00:34
Tagged: c openbsd programming

printf null in the wild

What happens when you call cprintf("name: %s\n", NULL); in C? If you’re running Apple iOS, something like this:

safari screenshot

Posted 16 Oct 2013 04:37 by tedu Updated: 18 Feb 2014 07:20
Tagged: bugs c programming

Brother HL-3170CDW printer review

I bought a new printer, the Brother HL-3170CDW (sometimes stylized HL3170CDW, as on Amazon). It’s a small office color laser, with all the doodads (wireless, ethernet, duplex, color). I didn’t really need it, the HL-2070N black and white printer I’ve had for several years now was working fine, but every once in a while I wondered if I’d find use for a color printer. Maybe I was making due with B&W because that’s all that was available, and having a color printer would unleash a creative blast of fancy greeting cards. I mulled it over for a few years, but then the price briefly hit $170 on Amazon. Done.

more...

Posted 10 Oct 2013 22:27 by tedu Updated: 10 Oct 2013 22:27
Tagged: gadget review

surprise gift from Amazon

Amazon has a trade-in program where they buy back electronics (and books, etc.) and give you store credit. If the item isn’t in good enough condition, they’ll return it to you. About two weeks ago, I sent in a Canon camcorder I never really used. Got a credit. Then today I received a package from Amazon. The magic camera elves in Kentucky (where the Amazon trade-in depot is located) turned my camcorder into a Canon DSLR camera. The box even included the camcorder packing slip I printed out and sent with the first package.

I assume the traded in DSLR was found wanting in some respect and on its way home when my packing slip and address got shuffled into the mix. I would forward it on its way, but the only address I have is my address. If it had a lens, maybe I could even use it for a while, but alas it’s only the body. Guess I’ll just stick it in the corner for a while until somebody asks for it.

Posted 08 Oct 2013 22:17 by tedu Updated: 08 Oct 2013 22:17
Tagged: mailfail rants

OpenBSD is a screw

Reflecting on a metaphor I made the other day. There’s a saying, “When all you have is a hammer, everything looks like a nail.” Thinking about some new users’ experiences with OpenBSD, I think OpenBSD is a lot like a screw, whereas Linux/OS X is a nail. First, they serve roughly the same purpose. They are, from a distance, roughly the same size and shape. You can even drive a screw into wood using a hammer, though it will be a frustrating experience (especially if it’s a machine screw). Once you learn to use the right tools, however, screws are also easy to work with, and maybe a better choice if what you’re looking for is a secure fastener (though I may be biased). OpenBSD generally follows the same POSIX standard as other unix flavors, so lots of things will be similar, but there are differences as well and ignoring them is not recommended.

Posted 16 Sep 2013 21:50 by tedu Updated: 16 Sep 2013 21:50
Tagged: openbsd software

can't get there from here

A personal followup of sorts regarding Bay Area public transit and its solutions. I’m trying to get from the SFO airport to Facebook headquarters. My friend suggests Uber, seriously and repeatedly. Just for giggles, I inquire with the Google Maps what my options are. Take BART to another BART to Caltrain to a bus and hoof it on foot from there. All told, about as fast as the Oregon Trail and with a total fare cost probably approaching my plane ticket. How do people live like this? (How did I live like that?)

Related: A Walking Tour of Silicon Valley.

Posted 20 Aug 2013 04:14 by tedu Updated: 06 Mar 2014 04:27
Tagged: rants

Snowden changed everything

“Occam’s Razor is pre-Snowden thinking. Like 9/11, Snowden changed everything.” - tptacek

Posted 03 Aug 2013 19:57 by tedu Updated: 03 Oct 2014 18:27
Tagged: quote

strict posix nonconformance

Some thoughts on what it means to be POSIX compliant and why OpenBSD deliberately fails to comply in some cases. For background, I think the POSIX standard is a bit ridiculous, but that’s more about the absurdities one encounters when super strictly interpreting a standards document. This is more about refusing to follow along with even a more even handed interpretation.

more...

Posted 02 Aug 2013 19:56 by tedu Updated: 21 Apr 2022 08:33
Tagged: c openbsd programming security