RSSAmplifier

Blog

despair labs

Recent content on despair labs

despairlabs.comRSS feed ↗298 posts

Latest posts

The unreasonable cost of conference presentation

Six months ago I gave the most important conference talk of my life. You might never see it.

What people said about an OpenZFS bug

A few days ago I wrote about a OpenZFS bug I found and why it went unnoticed . It generated a surprising amount of chatter (at least for me!) which I found quite interesting, and did actually help clarify my thinking on a few things.

An (almost) catastrophic OpenZFS bug and the humans that made it (and Rust is here too)

A couple of weeks ago I fixed a nasty bug in this function in OpenZFS:

fsync() after open() is an elaborate no-op

I have spent the last couple of years of my life trying to make sense of fsync() and bringing OpenZFS up to code. I’ve read a lot of horror stories about this apparently-simple syscall in that time, usually written by people who tried very hard to get it right but ended up losing data in different ways. I hesitate to say I enjoy reading these things, because they usually start with some…

We should improve libzfs somewhat

OpenZFS has some extremely nice tools and you can do a lot with them, but they start to struggle once you need to do more complicated things with your storage, or scale your OpenZFS installation out to tens or hundreds of pools, or use it as a component of a larger product. That’s usually when people turn up looking for better ways to “program” OpenZFS, and it’s usually not long before they’re…

OpenZFS deduplication is good now and you shouldn't use it

OpenZFS 2.3.0 will be released any day now , and it includes the new “Fast Dedup” feature. My team at Klara spent many months in 2023 and 2024 working on it, and we reckon it’s pretty good, a huge step up from the old dedup as well as being a solid base for further improvements. 
 I’ve been watching various forums and mailing lists since it was announced, and the thing I kept seeing was…

A few nice things in OpenZFS 2.3

OpenZFS 2.3.0-rc1 was just tagged. This was the first full development cycle I was involved in and there’s lots I’m excited about beyond the headline items. Here’s a few less obvious things that I think are very nice! 
 
 Better userspace debugging 
 Better task queue stats 
 The endless kernel update treadmill 
 Linux IO submission rewrite 
 Credit where it’s due…

I'm speaking at BSDCan 2024

In a couple of days I’ll back on a plane, taking the travelling circus to BSDCan 2024 in Ottawa. 
 I’ll be presenting two sessions: 
 
 Why fsync() on OpenZFS can’t fail, and what happens when it does , which despite having exactly the same title as my AsiaBSDCon 2024 presentation , is actually more like the sequel. Then, we were making fsync() block instead of returning…

I'm speaking at AsiaBSDCon 2024

AsiaBSDCon 2024 starts next week in Taipei, and I’ll be there! 
 I’ll be presenting two sessions (working titles): 
 
 Dirty deals: the story of a data corruption bug in OpenZFS , on last year’s exciting (apparent) data corruption bug and its resolution. The talk is probably going to be mostly a rehash of the blog post, but that’s ok; not everyone has heard…

quiz: a tool for rapid OpenZFS development

My preferred programming style is highly interactive and exploratory, which requires a fast edit-compile-test cycle. But then a year ago I started working on OpenZFS , which is a big chunk of kernel code. Kernel code means developing on either real hardware or a VM, which tend to be awkward to get real code on to, and then, being kernel code, it’s pretty easy to crash, wedge or otherwise…

A data corruption bug in OpenZFS?

The Thanksgiving long weekend (23-26 November) in 2023 was an interesting one for OpenZFS, that I managed to land myself in the middle of. The short version of events is that an apparent silent data corruption bug was discovered, which is kind of the worst case scenario for a data storage system. 
 It was a pretty intense few days for me, initially one of a few people looking into the bug, and…

The Rust I used to know

I don’t remember where I first heard about Rust, but I know it was a long time ago, likely back in 2012. 
 At the time, I was the unofficial project lead and heavy contributor to Pioneer , a space exploration game in the spirit of Frontier: Elite II . I had landed here in my usual way, spending my free time bouncing from open-source project to open-source project, messing with whatever…

GOOD COMPUTER: Boards

2022-01-16 20:04 
 last couple of weeks I tried my hand at designing a board for GOOD COMPUTER. had to resist the urge to add features and just stick with what I know. they arrived today, the five I ordered and siz bonuses. exciting! 




 
 



 
 2022-01-16 20:05 
 starting assembly. I ordered parts to fill them this week but totally forgot…

GOOD COMPUTER: FAT32

2022-01-12 20:05 
 back in 2020 I had some time at home (!) so I built a little computer. this year I’ve also had some time at home (!) so I pulled it back out and started work on an SD card driver 




 
 



 
 2022-01-12 20:36 
 as is usual for small embedded devices, SD cards mostly do the right thing for whatever bus they’re on…

io_uring is not an event system

I’ve been hearing about io_uring on and off for the last couple of years. Its a relatively new technology in Linux to allow high-performance IO with very few overheads. 
 Whenever its been mentioned, its usually been presented as a new alternative to select , poll and epoll . This led me to believe that it was just the next iteration of those facilities, which is to say, another facility…

GOOD COMPUTER: a modern 80's-style computer

2024-03-30: this post has moved to /presentations/good-computer/ .

GOOD COMPUTER: mk2

2020-08-17 21:16 
 hey look, it’s GOOD COMPUTER mk2. totally rebuilt with an atmega88 after a minor voltage incident took out my remaining 8s. I like the smaller board though its pretty cramped. might receive further layout changes as I try to add peripherals, but for now it’d quite nice! 




 
 



 
 This was once a thread on the bird…

GOOD COMPUTER: XIAO bricked

2020-07-27 21:06 
 lol so I fucked up while getting the XIAO toolchain running and trashed the bootloader. so a new GOOD COMPUTER project begins: just enough JTAG/SWD to reflash the bootloader and make it usable again 




 
 



 
 2020-08-01 18:12 
 “just enough JTAG/SWD” seems too be too much for me. mostly, the chip is not…

GOOD COMPUTER: XIAO

2020-07-24 20:56 
 this is a XIAO, a tiny ARM dev board. gonna do another round of GOOD COMPUTER type work on it. more memory and tiny size are appealing, learning a new instruction set less so. I always like it once I get going though, so we’ll see where we end up 




 
 



 
 2020-07-24 20:57 
 374 pages off we go then…

GOOD COMPUTER: Broken SD module

2020-07-12 13:29 
 started messing with this SD card module. seems it’s not properly SPI compliant, as it’s driving CIPO low even when not selected. I think I found the bug; the buffer on that line has its enable pin tied to ground, so it never stops. gonna try lifting it and tying it to CS instead 




 
 



 
 2020-07-12 14:26 
…

GOOD COMPUTER: Public Service Announcement

2020-07-07 22:02 




 
 



 
 This was once a thread on the bird site. It’s a shame it no longer exists.

GOOD COMPUTER: LCD graphics

2020-07-06 19:44 
 I had an idea 




 
 



 
 2020-07-06 23:31 
 not a real clock, just text layout tests 
 I have several ideas 




 
 



 
 2020-07-07 19:24 
 dropped in this 5x8 font to get 25 chars per line. I love my C64 but really I’ve got limited space and this is quite readable…

GOOD COMPUTER: LED counter

2020-07-05 17:30 
 I used a pair of ‘595 shift registers to hook this up to the SPI bus. it works fine, but needs constantly refreshed and on the bus permanently. if I did it “for real” I’d just drive it with another AVR, but that’s maybe just my software head talking. experiment over for now 
 
 
 
 
 
 This was once a thread on the bird…

GOOD COMPUTER: LCD

2020-07-02 12:30 
 I decided to take a short break and add a LCD screen to GOOD COMPUTER, but it ended up taking a very late night and a morning to get it going. the timing is quite important and there’s not much example code around, so lots of study and experimenting required 




 
 



 
 This was once a thread on the bird site. It’s a…

GOOD COMPUTER: Z-machine

2020-06-22 15:09 
 GOOD COMPUTER continues! 
 I got bored with BASIC, and I’m waiting for parts to arrive, so I started something new: a Z-machine implementation, in AVR assembly, so we can play Zork! 
 https://gitlab.com/good-computer/zap 




 
 



 
 2020-06-22 15:20 
 my typical workspace layout for this stuff, if you’re…

GOOD COMPUTER: BASIC

2020-06-02 12:35 
 I am making a GOOD COMPUTER, my take on a 70/80s-style approach to building a computer! 
 Current focus: the BASIC interpreter 
 Here’s the code and more info: https://gitlab.com/good-computer/basic 




 
 







 
 



 
 2020-06-03 15:47 
 I made a function! it turns out…

GOOD COMPUTER

2020-04-28 20:19 
 I started building a little computer this week. The idea/constraint is: what if we built a late-70s-early-80s-style 8-bit computer in 2020 
 This pic is extremely early, mostly just getting a toolchain and workflow into place 




 
 



 
 2020-05-03 21:16 
 While I wait for some parts to arrive, I’ve been working on…

End times

Like most (all?) desktops, elementary OS has a date & time widget. You click it and it shows calendar stuff. Mine currently looks like this: 




 

 
 
 The elementary OS date widget, showing the month and two events for the day 
 




 (The world clocks are not standard; that’s something else I’m working on, but I’ll…

Tile windows

As I said before , I spend most much of my life in terminal windows, being a sysadmin or a programmer or anything else like that. So naturally, where my terminal windows are positioned on the screen is kind of a big deal to me. 
 Back when I ran XFCE, I got used to using its keyboard shortcuts to position windows. They were pretty simple: you could tap keys to make a window use the left half,…

Switching to elementary OS

So I’m switching from macOS to elementary OS . 
 Why am I doing this? History time! 
 Long ago, when I was small, I received a Commodore 64 for my 9th birthday. It started as a toy, but became the main thing I spent my time on right up until I was 18. Its where I learned my trade: hardware, operating systems, programming. It’s also at least partially responsible for my poor…

A talk about Consul

2024-03-30: this post has moved to /presentations/consul/ .

U 2 can U2F (linux.conf.au 2017)

2024-03-30: this post has moved to /presentations/u2f/ .

CompCon 2016 in review

From 1-3 October 2016 I was at CompCon Australia 2016, a technical conference aimed at tertiary computing students. I had a great time, in ways I didn’t expect. I’m currently on the flight home and thought I should write down a few thoughts while its still fresh in my mind. 
 
Setup
 
 
 Its not a conference that I’d ever heard of before, and even if I had I…

A br1ef h1st0ry of P@sswords (CompCon 2016)

2024-03-30: this post has moved to /presentations/passwords/ .

U 2 can U2F (YAPC::NA 2016)

2024-03-30: this post has moved to /presentations/u2f-l/ .

Secret level

Secret level huh? How hard can it be… 




 
 



 Not too hard once you study the numbers for a while. If it had had instructions it’d probably been about equivalent to one of the mid-game levels. 






New release of salada, my JMAP server

New release of salada, my JMAP server. CRUD methods for Calendar, CalendarEvent and Mailbox objects and a massive pile of internal cleanup and tooling to make adding new object types trivial. 
 Next up, some actual logic! 
 robn/salada

I was happy with this one

I was happy with this one 






An evening of programming puzzles...

Settling in for an evening of programming puzzles… 






Fastmail is a SSRF target

Nicolas Grégoire’s excellent presentation from AppSecEU 2015 on various terrifying SSRF exploits. 
 I was thrillied to see Fastmail, and particularly Hopscotch (my image proxy), mentioned as potential targets, but then not actually feature in any of the exploits presented. I hope that means nothing of interest was found! 
 Interestingly, I did discover after reading it that Hopscotch…

OAuth+SASL needs a username

If you’re going to provide OAuth access to your non-web protocols (eg XOAUTH, OAUTHBEARER, etc to IMAP, SMTP, whatever) then you need to give me a way to convert an access token into a username. 
 By design, the standard OAuth handshake yields a token at the end. Nothing more. You do not get any identity information, and you can’t assume anything because in a multi-user system (eg…

OAuth for libsasl2

Success! With this you can configure Postfix (or any other thing that uses libsasl2) to OAuth to Google’s SMTP server. Coming soon to a near you :) 
 robn/sasl2-oauth 
 For those interested, I wrote a quickstart for getting it running with Postfix: https://github.com/robn/sasl2-oauth/issues/1

First release of salada, my JMAP server

First release of salada, my JMAP server. Only supports a tiny corner of the API but the data model is there and it should be enough to get you started. 
 Rust is taking some learning but mostly I’m loving it :) 
 [ANN] salada 0.0.1 release - a standalone JMAP server

A JMAP library for Rust

Here’s the start of a fully type-checked JMAP parser/generator in Rust. I’m sure its not good idiomatic Rust yet, but I’m still pretty proud of it. 
 Mostly I like how concise you can make things and still get pretty solid guarantees about the quality of the data you get back from the parser. If the object parses, you know its good and don’t need to do any further…

Pebble cricket: updates

With so much cricket going on at the moment, SixFour has seen quite a bit a work. 
 Some layout tweaks have opened up space at the bottom for anther line of text, which I’m intending to use to show some match details as they come up (boundary, wicket, etc). So far its only showing the current break state. 
 Its got a clock at last! :) 
 There’s also a bunch more defense…

Everybody root

Making things like this excites and terrifies me in equal measure. 
 robn/everybody-root

Pebble cricket: name shortener

I had no choice. Had to make a skanky name shortener for players in minor teams that don&rsquo;t have a short name in the Cricinfo database. &#xA; var shorten = function ( n ) {&#xA; var bits = n . split ( ' ' );&#xA; for ( var i = 0 ; i < bits . length - 1 ; i ++ )&#xA; bits [ i ] = bits [ i ]. substr ( 0 , 1 );&#xA; return bits . join ( '.' );&#xA; };&#xA; &#xA;&#xA;&#xA;&#xA;

Adding XMPP support to nginx

So today I want to tell you about a little side project that I worked on over the Christmas break in between eating, watching cricket and napping. I added XMPP termination and proxy support to nginx. &#xA; This is a big post because I want to cover everything: background, rationale, implementation detail and so on. As I wrote the outline it occurred to me that this would make a really interesting…

Dummy renderer

A small tweak to the Pioneer build system has turned into building a dummy renderer for headless environments (for tools). Very strange to be writing Pioneer code after so many months! &#xA;&#xA;&#xA;&#xA;&#xA;

Broken wire protocol

Always interesting to find weird broken shit in wire protocols. This from a hopscotch debugging session: &#xA; $ curl -I http://www.ibm.com/social-business/us/en/newway/images/email/ipad_image.jpg&#xA;HTTP/1.1 200 OK&#xA;...&#xA;epKe-Alive: timeout=10, max=76&#xA; All other headers are correct. &#xA; So I started poking around a bit: &#xA; $ curl -I…