Building your own DragonFly

Mixed in with the other documentation on the DragonFly website is a “how to build a release” explanation.  I use it every time there’s a new DragonFly version.  If you were wanting to build a DragonFly ISO/IMG with changes or different preinstalled dports, I’ve added some notes about what’s relevant for non-release building.

We used to have “GUI” releases of DragonFly which were based on the nrelease process installing pkgsrc packages and adding some configuration files.  It doesn’t happen now mostly because nobody has had the time to reconfigure for dports; if you were looking for a project this weekend, may I suggest…?

Half billion tries for a HAMMER2 bug

I’m pulling a quote off of IRC to show some of the testing on HAMMER2, specifically as the background for this commit:

14:22 <@dillon_> ^^^ hammer2 bug, could reproduce it around once a day doing a continuous rm -rf on hardlinked snapshots. reproduced about once every 500 million directory entries or so

I am somewhat tickled by the notion that you might have a problem after deleting half a billion directory entries.

CPU bug hardening added to DragonFly

Matthew Dillon’s added some patches to DragonFly related to securing floating point state, following similar work in OpenBSD.  There isn’t a reported catchy-name issue to match it, like Spectre/Meltdown – yet.

(If anyone has a good link to the similar OpenBSD commits, please share; I did not find them on a cursory search.)

Update: the fix is now in 5.2 and an update is recommended.

mkinitrd out, initrd in

There was an optional ‘make initrd’ step in the DragonFly build process, where you can create a small binary to use for mounting encrypted root drives.

Aaron LI has removed mkinitrd in favor of ‘make initrd’, which builds a separate binary to use in exactly those situations.  See the commit message for more detail.  It incidentally creates a ‘/rescue’ directory and works as a rescue ramdisk, similar to other BSDs, if you should ever need it.  (See updated MOTD for details)

CVE-2018-8897 fix in, more Spectre fixes for DragonFly

A recent and new CPU bug, CVE-2018-8897, is fixed in DragonFly.  THis applies to both Intel and AMD processors.  I’m happy to see that the CERT page lists equal notification timing for a whole lot of operating systems, rather than the few that heard about Spectre/Meltdown early.

Following that topic, Matthew Dillon has “fleshed out” Spectre mitigations, and his commit message details the current state.  The sysctl ‘machdep.spectre_mitigation’ will tell you what’s set at any given point.

Update: update.