Frankensteins Disk Drive by Chuck Tuffli @BsdcanOrg
Frankensteins Disk Drive by Chuck Tuffli  @BsdcanOrg
Uploaded June 2019 | Updated September 2026, 1 hour ago
Emulated devices in FreeBSD's bhyve hypervisor exist to provide compatibility with older operating systems. But with a few small changes, we can take a Dr. Frankenstein approach and allow the user to dynamically modify their behavior to create something new and beautiful.

Just kidding, the resulting havoc this wreaks on the guest operating system will bring out the villagers with their torches and pitchforks. This talk describes why you would want to do this and an implementation using the NVMe emulation.

There is a programmer's adage that says untested code will not work entirely the way you expect. But how do you test code which handles hardware errors? This presupposes having hardware that misbehaves in predictable and repeatable ways. Since this sort of unicorn does not exist, programmers will often create error injection hooks in the code. But this approach is problematic as the hooks tend to be static, work at cross-purposes with the actual code, and do not have access to user-space libraries and scripting languages that can help simplify the task.

FreeBSD's bhyve hypervisor and its emulated devices offers an alternative approach. To the guest software (a.k.a. the operating system), these appear to be actual hardware when in reality, they are small user-space programs. By adding hooks to the device emulation code, we can allow user defined plug-in's to modify the device behavior and allow better testing of device drivers and the code which relies on them. This talk will describe an experimental plug-in framework for bhyve's NVMe device emulation, example scripts, and the havoc that they can cause.

More Info:
bsdcan.org/2019/schedule/events/1048.en.html
Frankensteins Disk Drive by Chuck TuffliThe state of 3d-printing from OpenBSD by Andrew Hewus FreshBSDCan Friday 2025-06-13:1120Building a Large Scale Threat Intelligence System with OpenBSD Lawrence TeoLLDB FreeBSD Kernel Module Improvement By: ShengYi HungPhilipp Buehler: Vagrant for OpenBSD make installations by the busloads easy   BSDCan 2018BSD Honeypots - Of course it runs on BSD : Michael ShirkWhy rewrite fw_update(8)? By: Andrew Hewus FreshMaster & Minions or the Dream of BSD Automation Using Salt and Python to manage the a BSD CloudRunning your own network using BGP, OSPF and IS-IS on the BSDs By:  Massimiliano Stucchibhyvearm64 CPU and Memory Virtualization on Armv8.0-A by Alexandru EliseiBuilding a security appliance based on FreeBSD by Mariusz Zaborski
BSDCan |

Frankenstein's Disk Drive by Chuck Tuffli

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER