BSD Now

BSD Now

Download on the App Store

BSD Now episodes

  • 166: Pass that UNIX Pipe

    This week on the show, we’re loaded up with great stories ranging from System call fuzzing, a history of UNIX Pipes, speeding up MySQL imports and more. Stay tuned, BSDNow is coming your way right now.

    This episode was brought to you by

    Headlines
    System call fuzzing of OpenBSD amd64 using TriforceAFL (i.e. AFL and QEMU)
    • The NCCGroup did a series of fuzz testing against the OpenBSD syscall interface, during which they found a number of vulnerabilities, we covered this back in the early summer
    • What we didn’t notice, is that they also made the tools they used available.
    • A combination of AFL (American Fuzzy Lop), QEMU, OpenBSD’s FlashRD image generation tool, and the “Triforce” driver
    • The other requirement is “a Linux box as host to run the fuzzer (other fuzzer hosts may work as well, we've only run TriforceAFL from a Linux host, specifically Debian/Ubuntu”
    • It would be interesting to see if someone could get this to run from a BSD host
    • It would also be interesting to run the same tests against the other BSDs
    • ***
      On the Early History and Impact of Unix: the Introduction of Pipes
      • Pipes are something we just take for granted today, but there was a time before pipes (How did anything get done?)
      • Ronda Hauben writes up a great look back at the beginning of UNIX, and specifically at how pipes were born:
      • One of the important developments in Unix was the introduction of pipes. Pipes had been suggested by McIlroy during the early days of creating Unix. Ritchie explains how "the idea, explained one afternoon on a blackboard, intrigued us but failed to ignite any immediate action. There were several objections to the idea as put....What a failure of imagination," he admits.(35) McIlroy concurs, describing how the initial effort to add pipes to Unix occurred about the same time in 1969 that Ritchie, Thompson and Canaday were outlining ideas for a file system. "That was when," he writes, "the simple pipeline as a way to combine programs, with data notationally propagating along a chain of (not necessarily concurrent) filters was articulated."(36) However, pipes weren't implemented in Unix until 1972.

        • We also have a great quote from McIlroy on the day pipes were first introduced:
        • Open Systems! Our Systems! How well those who were there remember the pipe-festooned garret where Unix took form. The excitement of creation drew people to work there amidst the whine of the computer's cool- ing fans, even though almost the same computer ac- cess, could be had from one's office or from home. Those raw quarters saw a procession of memorable events. The advent of software pipes precipitated a day-long orgy of one-liners....As people reveled in the power of functional composition in the large, which is even today unavailable to users of other systems.

          • The paper goes on to talk about the invention of other important tools, such as “grep”, “diff” and more. Well worth your time if you want a glimpse into the history of UNIX
          • ***
            Speeding up MySQL Import on FreeBSD
            • Mark Felder writes a blog post explaining how to speed up MySQL bulk data imports
            • “I was recently tasked with rebuilding a readonly slave database server which only slaves a couple of the available databases. The backup/dump is straightforward and fast, but the restore was being excruciatingly slow. I didn't want to wait a week for this thing to finish, so I had to compile a list of optimizations that would speed up the process. This is the best way to do it on FreeBSD, assuming you're working with InnoDB. Additional optimizations may be required if you're using a different database engine.”
            • “Please note this is assuming no other databases are running on this MySQL instance. Some of these are rather dangerous and you wouldn't want to put other live data at risk.”
            • Most of the changes are meant to be temporary, used on a new server to import a dump of the database, then the settings are to be turned off.
            • Specifically:

              • sync_binlog = 0
              • innodb_flush_log_at_trx_commit = 0
              • innodb-doublewrite = 0
              • He also prepends the following but of SQL before importing the data:

                • set sql_log_bin=0; set autocommit=0; set unique_checks=0; set foreign_key_checks=0;
                • You can also help yourself if your MySQL database lives on ZFS

                  • zfs set recordsize=16k pool/var/db/mysql
                  • zfs set redundant_metadata=most pool/var/db/mysql
                  • Remember, this tuning is ONLY for the initial import, leaving these settings on long term risks losing 5-10 seconds of your data if the server reboots unexpectedly

                    • zfs set sync=disabled pool/var/db/mysql
                    • zfs set logbias=throughput pool/var/db/mysql
                    • ***
                      PostgreSQL and FreeBSD Quick Start
                      • There’s lots of databases to choose from, but Postgres always has a special place on FreeBSD. Today we have a look at a ‘getting started’ guide for those taking the plunge and using it for the first time.
                      • Naturally getting started will look familiar to many, a couple simple “pkg” and “sysrc” commands later, and you’ll be set.
                      • After starting the service (With the “service” command) you’ll be ready to start setting up your postgres instance.
                      • Next up you’ll need to create your initial user/password combo, and a database with access granted to this particular user.
                      • If you plan to enable remote access to this DB server, you’ll need to make some adjustments to one of the .conf files, allowing other IP’s to connect. (If you are hosting something on the same system, this may not be needed)
                      • Now yous should be good to go! Enjoy using your brand new Postgres database. If this is your first rodeo, maybe start with something easy, like Apache or Nginx + Wordpress to try it out.
                      • ***
                        News Roundup
                        OpenBSD vmm hypervisor test drive
                        • As we asked for a week or two ago, someone has taken OpenBSD’s vmm for a test drive, and made a video of it
                        • The command line interface for vmm, vmctl, looks quite easy to use. It takes an approach much closer to some of the bhyve management frameworks, rather than bhyve’s rather confusing set of switches
                        • It also has a config file, the format of which looks very similar to what I designed for bhyveucl, and my first effort to integrate a config file into bhyve itself.
                        • The video also looks at accessing the console, configuring the networking, and doing an OpenBSD install in a fresh VM
                        • Currently vmm only supports running OpenBSD VMs
                        • ***
                          FreeBSD Foundation October 2016 Update
                          • Wow, November is already upon us with the Holidays just around the corner. Before things get lost in the noise we wanted to highlight this update from the FreeBSD foundation.
                          • Before getting into the stories, they helpfully provide a list of upcoming conferences for this fall/winter, which includes a couple of USENIX gatherings, and the Developer Summit / MeetBSD next week.
                          • +The foundation gives us a quick hardware update initially, discussing some of the new ThunderX Cavium servers which are deployed (ARMv8 64Bit) and yes I’m drooling a bit. They also mention that work is ongoing for the RPi3 platform and PINE64.
                          • GNN also has an article reprinted from the FreeBSD journal, talking about the achievement of making it to 11.0 over the span of 23 years now. Of course he mentions that the foundation is open to all, and welcomes donations to continue to keep up this tradition of good work being done.
                          • Deb Goodkin gives us an update on the “Grace Hopper” convention that took place in Houston TX several weeks back. Roughly 14k women in Tech attended, which is a great turnout, and FreeBSD was well represented there.
                          • Next we have a call to potential speakers, don’t forget that there are plenty of places you can help present about FreeBSD, not just at *BSD centered conferences, but the SCALES of the world as well.
                          • We wrap up with a look at EuroBSDCon 2016, quite a nice writeup, again brought to us by Deb at the foundation, and includes a list of some of those recognized for their contributions to FreeBSD.
                          • ***
                            Adhokku – a toy PaaS powered by FreeBSD jails and Ansible
                            • Described as a toy Platform-as-a-Service, Adhokku is an ansible based automated jail creation framework
                            • Based on the concept of Dokku, a single-host open source PaaS for Linux powered by Docker
                            • When you deploy an application using Adhokku, Adhokku creates a new jail on the remote host and provisions it from a fixed clean state using the instructions in the Jailfile in your Git repository. All jails sit behind a reverse proxy that directs traffic to one of them based on the domain name or the IP address in the HTTP request. When a new jail has been provisioned for an application, Adhokku seamlessly reconfigures the reverse proxy to send traffic to it instead of the one currently active for that application.

                              The following instructions show how to get Adhokku and an example application running in a VM on your development machine using Vagrant. This process should require no FreeBSD-specific knowledge, through modifying the Jailfile to customize the application may.

                              • This seems like an interesting project, and it is good to see people developing workflows so users familiar with docker etc, can easily use BSD instead
                              • ***
                                Installing OpenBSD 6.0 on your laptop is really hard (not)
                                • OpenBSD on a laptop? Difficult? Not hardly.
                                • We have a great walkthrough by Keith Burnett, which demonstrates just how easy it can be to get up and running with an XFCE desktop from a fresh OpenBSD installation.
                                • For those curious,this was all done with a Thinkpad X60 and 120GB SSD and OpenBSD 6.0.
                                • He doesn’t really cover the install process itself, that is well covered by the link to the OpenBSD FAQ pages.
                                • Once the system is up and running though, we start with the most important portion, getting working internet access (Via wifi)
                                • Really just a few ‘ifconfig’ commands later and we are in business.
                                • Step 2 was getting the package configuration going. (I’ve never understood why this is still a thing, but no fret, its easy enough to do)
                                • With package repos available, now you can grab the binaries for XFCE and friends with just a few simple “pkg_add” commands
                                • Steps 4-6 are some specific bits to enable XFCE services, and some handy things such as setting doas permissions to get USB mounting working (For graphical mount/unmount)
                                • Lastly, keeping the system updated is important, so we have a nice tutorial on how to do that as well, using a handy “openup” script, which takes some of the guesswork out of it.
                                • Bonus! Steps for doing FDE as also included, which isn’t for everyone, but you may want it
                                • ***
                                  Beastie Bits
                                  • Pi-top with RPi-3 and FreeBSD HEAD
                                  • NetBSD 7.0.2 released
                                  • DragonflyBSD - git: kernel - Fix mmcsd read/write issues
                                  • A char device which implements an Enigma machine (FreeBSD & Linux)
                                  • ***
                                    Feedback/Questions
                                    • Matt - System Monitoring
                                    • Tony - LLVM License
                                    • Ben - Thanks
                                    • David - Write Cache
                                    • Charles - Fonts
                                    • ***
                                      56 min
                                    • 165: Vote4BSD

                                      This week on BSDNow, we’ve got voting news for you (No not that election), a closer look at

                                      This episode was brought to you by

                                      src="/images/2.png" alt="DigitalOcean - Simple Cloud Hosting, Built for Developers" />
                                      href="http://www.tarsnap.com/bsdnow" title="Tarsnap">

                                      Headlines
                                      ARIN 38 involvement, vote!
                                      • Isaac (.Ike) Levy, one of our interview guests from earlier this year, is running for a seat on the 15 person ARIN Advisory Council
                                      • His goal is to represent the entire *BSD community at this important body that makes decisions about how IP addresses are allocated and managed
                                      • Biographies and statements for all of the candidates are available here
                                      • The election ends Friday October 28th
                                      • If elected, Ike will be looking for input from the community
                                      • ***
                                        LibreSSL not just available but default (DragonFlyBSD)
                                        • DragonFly has become the latest BSD to join the growing LibreSSL family. As mentioned a few weeks back, they were in the process of wiring it up as a replacement for OpenSSL.
                                        • With this latest commit, you can now build the entire base and OpenSSL isn’t built at all.
                                        • Congrats, and hopefully more BSDs (and Linux) jump on the bandwagon Compat_43 is gone
                                        • RiP 4.3 Compat support.. Well for DragonFly anyway.
                                        • This commit finally puts out to pasture the 4.3 support, which has been disabled by default in DragonFly for almost 5 years now.
                                        • This is a nice cleanup of their tree, removing more than a thousand lines of code and some of the old cruft still lingering from 4.3.
                                        • ***
                                          Create your first FreeBSD kernel module
                                          • This is an interesting tutorial from Abdelhadi Khiati, who is currently a master's student in AI and robotics
                                          • I have been lucky enough to participate in Google Summer of Code with the FreeBSD foundation. I was amazed by the community surrounding it which was noob friendly and very helpful (Thank you FreeBSD <3)

                                            I wanted to make a starting tutorial for people to write a simple module for kernel before diving inside more complicated kernel shizzle

                                            The kernel module that we will be working on is a simple event handler for the kernel. It will be composed of 2 parts, the event handling function, and the module declaration

                                            The module event handler is a function that handles different events for the module. Like the module being loaded, unloaded or on system shutdown

                                            Now that we have the events handling function ready. We need to declare the moduledata_t to be able to use it inside DECLARE_MODULE macro and load it into the kernel. It has the module name and a pointer to the event handling function

                                            Lastly, we need to declare the module using the DECLARE_MODULE macro. Which has the following structure:

                                            ~~

                                            DECLARE_MODULE(name, moduledata_t data, sub, order);
                                            ~~

                                            name: The module name that will be used in the SYSINIT() call to identify the module.

                                            data: The moduledata_t structure that we already presented.
                                            sub : Since we are using a driver here so the value will be SI_SUB_DRIVERS this argument specify the type of system startup interface.
                                            order : Represents the order of initialization within the subsystem, we will us the SI_ORDER_MIDDLE value here.

                                            • To compile the previous file you need to use a Makefile as following:

                                            • ~~
                                              KMOD=hello
                                              SRCS=module.c
                                              .include
                                              ~~

                                            • We look forward to a future post where more functionality is added to the kernel module

                                            • Installing Windows 10 Under the bhyve Hypervisor.
                                              • Looking for your Bhyve fix? If so, then Trent (Of iohyve fame) has a nice blog post today with a detailed look at how to get Windows 10 up and running in bhyve.
                                              • First up, Trent gives us a nice look back at how far we’ve come in only a single year. Just a year ago, initial support for UEFI was landing, there was no VNC option, leaving us to only serial console goodness. Fast-forward to today and Windows 10 + Bhyve + Vnc is a go.
                                              • He immediately jumps us into the good stuff, talking about what you’ll need to follow along. His tutorial was written on 12-CURRENT, but running 11.0-RELEASE should work as well.
                                              • Of course, he does mention that before starting on this quest, make sure to read the bhyve handbook, specifically check that your CPU is supported. If you are running something without the correct Vt extensions, then your journey will end prematurely in sadness.
                                              • Next up is some of the prep work needed to get your box ready to run VM’s. Loading the kernel module, creating “tap” devices for networking and such are detailed.
                                              • If you are lazy (like me) then you’ll want to copy-n-paste his handy scripts which automate this process for you.
                                              • With the system prepped, we get to the good stuff. You’ll need to install the bhyve-firmware package (which enables UEFI booting) and get your handy Windows 10 ISO.
                                              • From here Trent has helpfully again provided us with handy scripts to both do the bhyve startup, as well as enabling VNC support over a SSH tunnel.
                                              • At this point you are good to go, fire up your VNC client and you should be greeted with the typical Windows “Press any key to boot from CD” message. No, he doesn’t provide instructions on how to install / Use / Like Windows, but we’ll leave that up to you.
                                              • ***
                                                News Roundup
                                                Lumina version 1.1.0 Released
                                                • A new version of Lumina has just landed! 1.1.0 brings with it some important fixes, as well as new utilities that make your desktop computing easier than ever.
                                                • First up, all i18n files have been re-worked, instead of needing to install another package, they are included with the build when WITH_I18N is set.
                                                • A handy new “start-lumina-desktop” command has been added, which makes it easy to get lumina running from your Login Manager or even manually in .xinitrc or the like.
                                                • A bunch of internals related to how it tracks installed Applications and start-menu entries has been re-worked, fixing some memory issues and speeding things up.
                                                • The default “Insight” file-manager has been given an overhaul, which includes some new features like “git” support.
                                                • A new Qt5 “lumina-calculator” has also joined the family, which means not needing to use kcalc or xcalc on TrueOS anymore.
                                                • A nice “TrueOS” specific option has also landed. Specifically now when System Updates are waiting to install at shutdown, Lumina will detect and prompt if you want to install or skip the update. Handy when on the road, or if you don’t have the time to wait for an update to complete.
                                                • ***
                                                  OpenBGPD Large Communities support in –current
                                                  • A blog post from OpenBSD’s Peter Hessler:
                                                  • On Friday, I committed support for Large Communities to OpenBGPD. This is a draft-RFC that I am pretty excited about.

                                                    Back in the early days of The Internet, when routers rode dinosaurs to work and nerds weren't cool, we wanted to signal to our network neighbours certain information about routes. To be fair, we still do. But, back then everyone had 16 bit ASNs, so there was a simple concept called 'communities'. This was a 32bit opaque value, that was traditionally split into two 16bit values. Conveniently, we were able to encode an "us" and a "them", and perform actions based on what our neighbours told us.

                                                    But, 16bits is pretty limiting. There could only be ~65'000 possible networks on The Internet total? Eeek. So, we created 32bit ASNs. 4 billion networks is seen as a quite reasonable limitation. However, you can't really encode a 32bit "us" and a 32bit "them" value into 32bits of total space. Something called "Extended Communities" was invented, but it tries to solve everything except the case of a 32bit ASN signalling to another 32bit ASN.

                                                    Enter Large Communities. This is 3 32bit values. The first one is the "owner" of the namespace. Normally, you would put in your own ASN, or the ASN that you wish to signal. The second two 32bit values are opaque and only have meaning from the originating operator, but normally people will use "myasn":"verb":"noun" Or "myasn":"noun":"verb". Either way, it fits very nicely.

                                                    Having previously ran a 32bit ASN, it became quickly obvious the lack of suitable communities was a critical problem. It was even the way to request an "old style" 16bit ASN from RIPE, "I need to use communities". Even the ability to say "do this to that ASN" was ugly, since you couldn't really communicate who the community was supposed to matter to. Clearly, we The Internet Community screwed up by not addressing this need earlier.

                                                    OpenBGPD in OpenBSD -current has support for Large Communities, and this will be available in the 6.1 release and later. This was based partially on a patch from Job Snijders, thanks!

                                                    First look at the renewed CTL High Availability implementation in FreeBSD
                                                    • Following up on a previous post about making a high availability dual head storage controller, the new post looks at using FreeBSD’s CTL HA implementation, and FreeBSD 11.0 to do that:
                                                    • This enhancement looks extremely important for the BeaST storage system as implementation of high available native ALUA in FreeBSD can potentially replace the BeaST arbitration mechanism (“Arbitrator”), which is completely described in the papers on the BeaST project page

                                                      ALUA in storage world terminology means Asymmetric Logical Unit Assignment. In simple words this set of technologies allows a host to access any LUN via both controllers of a storage system

                                                      As I still do not have any real hardware drive-enclosures, we will use Oracle Virtual Box and iSCSI protocol. I have already deployed this environment for the BeaST development, so we can use the similar, yet more simplified template for the renewed CTL HA testing purpose.

                                                      • If anyone has access to hardware of this nature (a storage shelf with 2 heads connected to it), that they could lend the author to help validate the design on real hardware, that would be most helpful.
                                                      • > We will run two storage controllers (ctrl-a, ctrl-b) and a host (cln-1). A virtual SAS drive (da0) of 256 MB is configured as “shareable” in Virtual Media Manager and simultaneously connected with both storage controllers
                                                      • The basic settings are applied to both controllers
                                                      • One interesting setting is:

                                                      • kern.cam.ctl.ha_role – configures default role for the node. So ctrl-a is set as 0 (primary node), ctrl-b – 1 (secondary node). The role also can be specified on per-LUN basis which allows to distribute LUNs over both controllers evenly.

                                                        Note, kern.cam.ctl.ha_id and kern.cam.ctl.ha_mode are read-only parameters and must be set only via the /boot/loader.conf file.

                                                      • Once kern.cam.ctl.ha_peer is set, and the peers connect to each other, the log messages should reflect this:

                                                        • CTL: HA link status changed from 0 to 1
                                                        • CTL: HA link status changed from 1 to 2
                                                        • The link states can be: 0 – not configured, 1 – configured but not established and 2 – established

                                                          • Then ctld is configured to export /dev/da0 on each of the controllers
                                                          • Then the client is booted, and uses iscsid to connect to each of the exposed targets
                                                          • sysctl kern.iscsi.fail_on_disconnection=1 on the client is needed to drop connection with one of the controllers in case of its failure

                                                            As we know that da0 and da1 on the client are the same drive, we can put them under multipathing control: gmultipath create -A HA /dev/da0 /dev/da1

                                                            • The document them shows a file being copied continuously to simulate load. Because the multipath is configured in ‘active/active’ mode, the traffic is split between the two controllers
                                                            • Then the secondary controller is turned off, and iscsi disconnects that path, and gmultipath adapts and sends all of the traffic over the primary path.
                                                            • When the secondary node is brought back up, but the primary is taken down, traffic stops
                                                            • The console on the client is filled with errors: “Logical unit not accessible, asymmetric access state transition”
                                                            • The ctl(4) man page explains:
                                                            • > If there is no primary node (both nodes are secondary, or secondary node has no connection to primary one), secondary node(s) report Transitioning state.
                                                              > Therefore, it looks like a “normal” behavior of CTL HA cluster in a case of disaster and loss of the primary node. It also means that a very lucky administrator can restore the failed primary controller before timeouts are elapsed.
                                                            • If the primary is down, the secondary needs to be promoted by some other process (CARP maybe?): sysctl kern.cam.ctl.ha_role=0
                                                            • Then traffic follows again
                                                            • This is a very interesting look at this new feature, and I hope to see more about it in the future
                                                            • ***
                                                              Is SPF Simply Too Hard for Application Developers?
                                                              • Peter Hansteen asks an interesting question:
                                                              • The Sender Policy Framework (SPF) is unloved by some, because it conflicts with some long-established SMTP email use cases. But is it also just too hard to understand and to use correctly for application developers?

                                                                • He tells a story about trying to file his Norwegian taxes, and running into a bug
                                                                • Then in August 2016, I tried to report a bug via the contact form at Altinn.no, the main tax authorities web site.

                                                                  The report in itself was fairly trivial: The SMS alert I had just received about an invoice for taxes due contained one date, which turned out to be my birth date rather than the invoice due date. Not a major issue, but potentially confusing to the recipient until you actually log in and download the invoice as PDF and read the actual due date and other specifics.

                                                                  The next time I checked my mail at bsdly.net, I found this bounce:

                                                                  [email protected]: SMTP error from remote mail server after RCPT TO:: host mx.isp.as2116.net [193.75.104.7]: 550 5.7.23 SPF validation failed

                                                                  which means that somebody, somewhere tried to send a message to [email protected], but the message could not be delivered because the sending machine did not match the published SPF data for the sender domain.

                                                                  What happened is actually quite clear even from the part quoted above: the host mx.isp.as2116.net [193.75.104.7] tried to deliver mail on my behalf (I received the bounce, remember), and since I have no agreement for mail delivery with the owners and operators of that host, it is not in bsdly.net's SPF record either, and the delivery fails.

                                                                  • After having a bunch of other problems, he finally gets a message back from the tax authority support staff:
                                                                  • It looks like you have Sender Policy Framework (SPF) enabled on your mailserver, It is a known weakness of our contact form that mailervers with SPF are not supported.

                                                                    The obvious answer should be, as you will agree if you're still reading: The form's developer should place the user's email address in the Reply-To: field, and send the message as its own, valid local user. That would solve the problem.

                                                                    Yes, I'm well aware that SPF also breaks traditional forwarding of the type generally used by mailing lists and a few other use cases. Just how afraid should we be when those same developers come to do battle with the followup specifications such as DKIM and (shudder) the full DMARC specification?

                                                                    Beastie Bits
                                                                    • Looking for a very part-time SysAdmin

                                                                    • If anyone wants to build the latest nodejs on OpenBSD...

                                                                    • IBM considers donating Power8 servers to OpenBSD

                                                                    • Install and configure DNS server in FreeBSD

                                                                    • bhyve vulnerability in FreeBSD 11.0

                                                                    • Feedback/Questions
                                                                      • Larry - Pkg Issue
                                                                      • Larry - Followup
                                                                      • Jason - TrueOS
                                                                      • Matias - ZFS HALP!
                                                                      • Robroy - User/Group
                                                                      • ***
                                                                        1 hr 13 min
                                                                      • 164: Virtualized COW / PI?

                                                                        This week on the show, we’ve got all sorts of goodies to discuss. Starting with, vmm, vkernels, raspberry pi and much more! Some iX folks are visiting from out of

                                                                        This episode was brought to you by

                                                                        href="http://www.digitalocean.com/" title="DigitalOcean">
                                                                        href="http://www.tarsnap.com/bsdnow" title="Tarsnap">

                                                                        Headlines
                                                                        vmm enabled
                                                                        • VMM, the OpenBSD hypervisor, has been imported into current
                                                                        • It has similar hardware requirements to bhyve, a Intel Nehalem or newer CPU with the hardware virtualization features enabled in the BIOS
                                                                        • AMD support has not been started yet
                                                                        • OpenBSD is the only supported guest
                                                                        • It would be interesting to hear from viewers that have tried it, and hear how it does, and what still needs more work
                                                                        • ***
                                                                          vkernels go COW
                                                                          • The DragonflyBSD feature, vkernels, has gained a new Copy-On-Write functionality
                                                                          • Disk images can now be mounted RO or RW, but changes will not be written back to the image file
                                                                          • This allows multiple vkernels to share the same disk image
                                                                          • “Note that when the vkernel operates on an image in this mode, modifications will eat up system memory and swap, so the user should be cognizant of the use-case. Still, the flexibility of being able to mount the image R+W should not be underestimated.”
                                                                          • This is another feature we’d love to hear from viewers that have tried it out.
                                                                          • ***
                                                                            Basic support for the RPI3 has landed in FreeBSD-CURRENT
                                                                            • The long awaited bits to allow FreeBSD to boot on the Raspberry Pi 3 have landed
                                                                            • There is still a bit of work to be done, some of the as mentioned in Oleksandr’s blog post:
                                                                            • Raspberry Pi support in HEAD
                                                                            • “Raspberry Pi 3 limited support was committed to HEAD. Most of drivers should work with upstream dtb, RNG requires attention because callout mode seems to be broken and there is no IRQ in upstream device tree file. SMP is work in progress. There are some compatibility issue with VCHIQ driver due to some assumptions that are true only for ARM platform. “

                                                                              • This is exciting work. No HDMI support (yet), so if you plan on trying this out make sure you have your USB->Serial adapter cables ready to go.
                                                                              • Full Instructions to get started with your RPI 3 can be found on the FreeBSD Wiki
                                                                              • Relatively soon, I imagine there will be a RaspBSD build for the RPI3 to make it easier to get started
                                                                              • Eventually there will be official FreeBSD images as well
                                                                              • ***
                                                                                OpenBSD switches softraid crypto from PKCS5 PBKDF2 to bcrypt PBKDF.
                                                                                • After the discussion a few weeks ago when a user wrote a tool to brute force their forgotten OpenBSD Full Disk Encryption password (from a password list of possible variations of their password), it was discovered that OpenBSD defaulted to using just 8192 iterations of PKCSv5 for the key derivation function with a SHA1-HMAC
                                                                                • The number of iterations can be manually controlled by the user when creating the softraid volume
                                                                                • By comparison, FreeBSDs GELI full disk encryption used a benchmark to pick a number of iterations that would take more than 2 seconds to complete, generally resulting in a number of iterations over 1 million on most modern hardware. The algorithm is based on a SHA512-HMAC
                                                                                • However, inefficiency in the implementation of PKCSv5 in GELI resulted in the implementation being 50% slower than some other implementations, meaning the effective security was only about 1 second per attempt, rather than the intended 2 seconds. The improved PKCSv5 implementation is out for review currently.
                                                                                • This commit to OpenBSD changes the default key derivation function to be based on bcrypt and a SHA512-HMAC instead.
                                                                                • OpenBSD also now uses a benchmark to pick a number of of iterations that will take approximately 1 second per attempt
                                                                                • “One weakness of PBKDF2 is that while its number of iterations can be adjusted to make it take an arbitrarily large amount of computing time, it can be implemented with a small circuit and very little RAM, which makes brute-force attacks using application-specific integrated circuits or graphics processing units relatively cheap. The bcrypt key derivation function requires a larger amount of RAM (but still not tunable separately, i. e. fixed for a given amount of CPU time) and is slightly stronger against such attacks, while the more modern scrypt key derivation function can use arbitrarily large amounts of memory and is therefore more resistant to ASIC and GPU attacks.”
                                                                                • The upgrade to the bcrypt, which has proven to be quite resistant to cracking by GPUs is a significant enhancement to OpenBSDs encrypted softraid feature
                                                                                • ***
                                                                                  Interview - Josh Paetzel - email@email / @bsdunix4ever
                                                                                  • MeetBSD
                                                                                  • ZFS Panel
                                                                                  • FreeNAS - graceful network reload
                                                                                  • Pxeboot
                                                                                  • ***
                                                                                    News Roundup
                                                                                    EC2's most dangerous feature
                                                                                    • Colin Percival, FreeBSD’s unofficial EC2 maintainer, has published a blog post about “EC2's most dangerous feature”
                                                                                    • “As a FreeBSD developer — and someone who writes in C — I believe strongly in the idea of "tools, not policy". If you want to shoot yourself in the foot, I'll help you deliver the bullet to your foot as efficiently and reliably as possible. UNIX has always been built around the idea that systems administrators are better equipped to figure out what they want than the developers of the OS, and it's almost impossible to prevent foot-shooting without also limiting useful functionality. The most powerful tools are inevitably dangerous, and often the best solution is to simply ensure that they come with sufficient warning labels attached; but occasionally I see tools which not only lack important warning labels, but are also designed in a way which makes them far more dangerous than necessary. Such a case is IAM Roles for Amazon EC2.”
                                                                                    • “A review for readers unfamiliar with this feature: Amazon IAM (Identity and Access Management) is a service which allows for the creation of access credentials which are limited in scope; for example, you can have keys which can read objects from Amazon S3 but cannot write any objects. IAM Roles for EC2 are a mechanism for automatically creating such credentials and distributing them to EC2 instances; you specify a policy and launch an EC2 instance with that Role attached, and magic happens making time-limited credentials available via the EC2 instance metadata. This simplifies the task of creating and distributing credentials and is very convenient; I use it in my FreeBSD AMI Builder AMI, for example. Despite being convenient, there are two rather scary problems with this feature which severely limit the situations where I'd recommend using it.”
                                                                                    • “The first problem is one of configuration: The language used to specify IAM Policies is not sufficient to allow for EC2 instances to be properly limited in their powers. For example, suppose you want to allow EC2 instances to create, attach, detach, and delete Elastic Block Store volumes automatically — useful if you want to have filesystems automatically scaling up and down depending on the amount of data which they contain. The obvious way to do this is would be to "tag" the volumes belonging to an EC2 instance and provide a Role which can only act on volumes tagged to the instance where the Role was provided; while the second part of this (limiting actions to tagged volumes) seems to be possible, there is no way to require specific API call parameters on all permitted CreateVolume calls, as would be necessary to require that a tag is applied to any new volumes being created by the instance.”
                                                                                    • “As problematic as the configuration is, a far larger problem with IAM Roles for Amazon EC2 is access control — or, to be more precise, the lack thereof. As I mentioned earlier, IAM Role credentials are exposed to EC2 instances via the EC2 instance metadata system: In other words, they're available from http://169.254.169.254/. (I presume that the "EC2ws" HTTP server which responds is running in another Xen domain on the same physical hardware, but that implementation detail is unimportant.) This makes the credentials easy for programs to obtain... unfortunately, too easy for programs to obtain. UNIX is designed as a multi-user operating system, with multiple users and groups and permission flags and often even more sophisticated ACLs — but there are very few systems which control the ability to make outgoing HTTP requests. We write software which relies on privilege separation to reduce the likelihood that a bug will result in a full system compromise; but if a process which is running as user nobody and chrooted into /var/empty is still able to fetch AWS keys which can read every one of the objects you have stored in S3, do you really have any meaningful privilege separation? To borrow a phrase from Ted Unangst, the way that IAM Roles expose credentials to EC2 instances makes them a very effective exploit mitigation mitigation technique.”
                                                                                    • “To make it worse, exposing credentials — and other metadata, for that matter — via HTTP is completely unnecessary. EC2 runs on Xen, which already has a perfectly good key-value data store for conveying metadata between the host and guest instances. It would be absolutely trivial for Amazon to place EC2 metadata, including IAM credentials, into XenStore; and almost as trivial for EC2 instances to expose XenStore as a filesystem to which standard UNIX permissions could be applied, providing IAM Role credentials with the full range of access control functionality which UNIX affords to files stored on disk. Of course, there is a lot of code out there which relies on fetching EC2 instance metadata over HTTP, and trivial or not it would still take time to write code for pushing EC2 metadata into XenStore and exposing it via a filesystem inside instances; so even if someone at AWS reads this blog post and immediately says "hey, we should fix this", I'm sure we'll be stuck with the problems in IAM Roles for years to come.”
                                                                                    • “So consider this a warning label: IAM Roles for EC2 may seem like a gun which you can use to efficiently and reliably shoot yourself in the foot; but in fact it's more like a gun which is difficult to aim and might be fired by someone on the other side of the room snapping his fingers. Handle with care!”
                                                                                    • ***
                                                                                      Open-source storage that doesn't suck? Our man tries to break TrueNAS
                                                                                      • The storage reviewer over at TheRegister got their hands on a TrueNAS and gave it a try
                                                                                      • “Data storage is difficult, and ZFS-based storage doubly so. There's a lot of money to be made if you can do storage right, so it's uncommon to see a storage company with an open-source model deliver storage that doesn't suck.”
                                                                                      • “To become TrueNAS, FreeNAS's code is feature-frozen and tested rigorously. Bleeding-edge development continues with FreeNAS, and FreeNAS comes with far fewer guarantees than does TrueNAS.”
                                                                                      • “iXsystems provided a Z20 hybrid storage array. The Z20 is a dual-controller, SAS-based, high-availability, hybrid storage array. The testing unit came with a 2x 10GbE NIC per controller and retails around US$24k. The unit shipped with 10x 300GB 10k RPM magnetic hard drives, an 8GB ZIL SSD and a 200GB L2ARC SSD. 50GiB of RAM was dedicated to the ARC by the system's autotune feature.”
                                                                                      • The review tests the performance of the TrueNAS, which they found acceptable for spinning rust, but they also tested the HA features
                                                                                      • While the look of the UI didn’t impress them, the functionality and built in help did
                                                                                      • “The UI contains truly excellent mouseover tooltips that provide detailed information and rationale for almost every setting. An experienced sysadmin will be able to navigate the TrueNAS UI with ease. An experienced storage admin who knows what all the terms mean won't have to refer to a wiki or the more traditional help manual, but the same can't be said for the uninitiated.”
                                                                                      • “After a lot of testing, I'd trust my data to the TrueNAS. I am convinced that it will ensure the availability of my data to within any reasonable test, and do so as a high availability solution. That's more than I can say for a lot of storage out there.”
                                                                                      • “iXsystems produce a storage array that is decent enough to entice away some existing users of the likes of EMC, NetApp, Dell or HP. Honestly, that's not something I thought possible going into this review. It's a nice surprise.”
                                                                                      • ***
                                                                                        OpenBSD now officially on GitHub
                                                                                        • Got a couple of new OpenBSD items to bring to your attention today.
                                                                                        • First up, for those who didn’t know, OpenBSD development has (always?) taken place in CVS, similar to NetBSD and previously FreeBSD.
                                                                                        • However today, Git fans can rejoice, since there is now an “official” read-only github mirror of their sources for public consumption.
                                                                                        • Since this is read-only, I will assume (unless told otherwise) that pull-requests and whatnot aren’t taken. But this will come in handy for the “git-enabled” among us who need an easier way to checkout OpenBSD sources.
                                                                                        • There is also not yet a guarantee about the stability of the exporter. If you base a fork on the github branch, and something goes wrong with the exporter, the data may be reexported with different hashes, making it difficult to rebase your fork.
                                                                                        • How to install LibertyBSD or OpenBSD on a libreboot system
                                                                                          • For the second part of our OpenBSD stories, we have a pretty detailed document posted over at LibreBoot.org with details on how to boot-strap OpenBSD (Or LibertyBSD) using their open-source bios replacement.
                                                                                          • We’ve covered blog posts and other tidbits about this process in the past, but this seems to be the definitive version (so far) to reference.
                                                                                          • Some of the niceties include instructions on getting the USB image formatted not just on OpenBSD, but also FreeBSD, Linux and NetBSD.
                                                                                          • Instructions on how to boot without full-disk-encryption are provided, with a mention that so far Libreboot + Grub does not support FDE (yet). I would imagine somebody will need to port over the openBSD FDE crypto support to GRUB, as was done with GELI at some point.
                                                                                          • Lastly some instructions on how to configure grub, and troubleshoot if something goes wrong will help round-out this story. Give it a whirl, let us know if you run into issues.
                                                                                          • Editorial Aside - Personally I find the libreboot stuff fascinating. It really is one of the last areas that we don’t have full control of our systems with open-source. With the growth of EFI, it seems we rely on a closed-source binary / mini-OS of sorts just to boot our Open Source solutions, which needs to be addressed. Hats off to the LibreBoot folks for taking on this important challenge.
                                                                                          • ***
                                                                                            FreeNAS 9.10 – LAGG & VLAN Overview
                                                                                            • A video tutorial on FreeNAS’s official YouTube Channel
                                                                                            • Covers the advanced networking features, Link Aggregation and VLANs
                                                                                            • Covers what the features do, and in the case of LAGG, how each of the modes work and when you might want to use it
                                                                                            • ***
                                                                                              Beastie Bits
                                                                                              • Remote BSD Developer Position is up for grabs

                                                                                              • Isilon is hiring for a FreeBSD Security position

                                                                                              • Google has ported the Networked real-time multi-player BSD game

                                                                                              • A bunch of OpenBSD Tips

                                                                                              • The last OpenBSD 6.0 Limited Edition CD has sold

                                                                                              • Dan spots George Neville-Neil on TV at the Airport

                                                                                              • gnn on CNN

                                                                                              • SoloBSD releases v 6.0 built upon OpenBSD

                                                                                              • Upcoming KnoxBug looks at PacBSD - Oct 25th

                                                                                              • Feedback/Questions
                                                                                                • Morgan - Ports and Packages
                                                                                                • Mat - ZFS Memory
                                                                                                • Thomas - FreeBSD Path Length
                                                                                                • Cy - OpenBSD and NetHogs
                                                                                                • Lars - Editors
                                                                                                • ***
                                                                                                  1 hr 41 min
                                                                                                • 163: Return of the Cantrill

                                                                                                  The wait is over, 11.0 of FreeBSD has (officially) launched. We’ll have coverage of this, plus a couple looks back at UNIX history, and a crowd-favorite guest today.

                                                                                                  This episode was brought to you by

                                                                                                  href="http://www.digitalocean.com/" title="DigitalOcean">
                                                                                                  href="http://www.tarsnap.com/bsdnow" title="Tarsnap">

                                                                                                  Headlines
                                                                                                  FreeBSD 11.0-RELEASE Now Available
                                                                                                  • FreeBSD 11.0-RELEASE is now officially out.
                                                                                                  • A last minute reroll to pickup OpenSSL updates and a number of other security fixes meant the release was a little behind schedule, and shipped as 11.0-RELEASE-p1, but the release is better for it
                                                                                                  • Improved support for 802.11n and various wifi drivers
                                                                                                  • Support for the AArch64 (arm64) architecture has been added.
                                                                                                  • Native graphics support has been added to the bhyve(8) hypervisor.
                                                                                                  • A new flag, “onifconsole” has been added to /etc/ttys. This allows the system to provide a login prompt via serial console if the device is an active kernel console, otherwise it is equivalent to off.
                                                                                                  • The xz(1) utility has been updated to support multi-threaded compression.
                                                                                                  • A number of kernel panics related to VNET have been fixed
                                                                                                  • The IMAGACT_BINMISC kernel configuration option has been enabled by default, which enables application execution through emulators, such as QEMU via binmiscctl(8).
                                                                                                  • The GENERIC kernel configuration has been updated to include the IPSEC option by default.
                                                                                                  • The kern.osrelease and kern.osreldate are now configurable jail(8) parameters
                                                                                                  • A new sysctl(8), kern.racct.enable, has been added, which when set to a non-zero value allows using rctl(8) with the GENERIC kernel. A new kernel configuration option, RACCT_DISABLED has also been added.
                                                                                                  • The minimum (arc_min) and maximum (arc_max) values for the ZFS adaptive replacement cache can be modified at runtime.
                                                                                                  • Changes to watch out for:
                                                                                                    • OpenSSH DSA key generation has been disabled by default. It is important to update OpenSSH keys prior to upgrading. Additionally, Protocol 1 support has been removed.
                                                                                                    • By default, the ifconfig(8) utility will set the default regulatory domain to FCC on wireless interfaces. As a result, newly created wireless interfaces with default settings will have less chance to violate country-specific regulations.
                                                                                                    • An issue was discovered with Amazon® EC2™ images which would cause the virtual machine to hang during boot when upgrading from previous FreeBSD versions. New EC2™ installations are not affected, but existing installations running earlier releases are advised to wait until the issue is resolved in an Errata Notice before upgrading. An Errata Notice to address this is planned following the release.
                                                                                                    • ***
                                                                                                      process listing consistency
                                                                                                      • Ted Unangst asks: how consistent is the output of ps(1)?
                                                                                                      • If processes are starting and exiting constantly, and you run ps(1), is the output guaranteed to reflect that exact moment in time, or might it include some processes that have gone away before ps(1) exited, and include some processes that did not exist when ps(1) was started?
                                                                                                      • Ted provides a little example chicken/egg program to try to create such an inconsistency, so you can test out your OS
                                                                                                      • On OpenBSD ps(1) was switched away from the reading kernel memory directly, and instead uses the KERN_PROC_ALL sysctl
                                                                                                      • Thus sysctl can iterate over the entire process list, copying out information to ps(1), without blocking. If we prevent processes from forking or exiting during this time, we get a consistent snapshot. The snapshot may be stale, but it will never show us a viewpoint that never happened.

                                                                                                        • So, OpenBSD will always be consistent, or will it?
                                                                                                        • Is there a way to trick ps on OpenBSD? Not everything is consistent. There’s a separate sysctl, KERN_PROC_ARGV, that reads the command line arguments for a process, but it only works on one process at a time. Processes can modify their own argv at any time.

                                                                                                          • A second test program changes the process title of both the chicken and the egg, and if you run ps(1), you can get back a result that never actually happened.

                                                                                                          • The argv of the first program is read by ps(1), and in the meantime, it changes to a different value. The second program also changes its value, so now when ps(1) reads it, it sees the new value, not the original value from when ps(1) was started.

                                                                                                          • So the output is not that consistent, but is it worth the effort to try to make it so?

                                                                                                          • DragonFlyBSD - if_iwm - Add basic powermanagement support via ifconfig wlan0 powersave
                                                                                                            • WiFi can often be one of the biggest drains on your laptop battery, so anything we can do to improve the situation should be embraced.
                                                                                                            • Imre Vadász over at the DragonFly project has done that, porting over a new set of power management support from Linux to the if_iwm driver.
                                                                                                            • if_iwm - Add basic powermanagement support via ifconfig wlan0 powersave.

                                                                                                              • The DEVICE_POWER_FLAGS_CAM_MSK flag was removed in the upstream iwlwifi in Linux commit ceef91c89480dd18bb3ac51e91280a233d0ca41f.

                                                                                                              • Add sc_ps_disabled flag to struct iwm_softc, which corresponds to mvm->ps_disabled in struct iwl_mvm in Linux iwlwifi.

                                                                                                              • Adds a hw.iwm.power_scheme tunable which corresponds to the power_scheme module parameter in Linux iwlwifi. Set this to 1 for completely disabling power management, 2 (default) for balanced powermanagement, and 3 for lowerpower mode (which does dtim period skipping).

                                                                                                                • Imports the constants.h file from iwlwifi as if_iwm_constants.h.
                                                                                                                • This doesn't allow changing the powermanagement setting while connected,
                                                                                                                • also one can only choose between enabled and disabled powersaving with
                                                                                                                  ifconfig (so switching between balanced and low-power mode requires
                                                                                                                  rebooting to change the tunable).
                                                                                                                • After any changes to powermanagement (i.e. "ifconfig wlan0 powersave" to
                                                                                                                • enable powermanagement, or "ifconfig wlan0 -powersave" for disabling
                                                                                                                  powermanagement), one has to disconnect and reconnect to the accespoint
                                                                                                                  for the change to take effect.“
                                                                                                                  • Good stuff! These positive changes need to happen more often and sooner, so we can all eek out every drop of power from our respective laptops.
                                                                                                                  • ***
                                                                                                                    Helping out an Internet Friend…Dual boot OpenBSD
                                                                                                                    • Dual-booting OpenBSD and Linux, via UEFI. A year ago we wouldn’t be discussing this, but today we have an article where somebody has done exactly that.
                                                                                                                    • This Journey was undertaken by Brian Everly (Indiana Bug), partly due to a friend who wanted to dual-boot his laptop which already has an existing UEFI install on it.
                                                                                                                    • As a proof of concept, he began by replicating the setup in VMware with UEFI
                                                                                                                    • He started by throwing Ubuntu into the VM, with some special attention paid to partitioning to ensure enough room left-over for OpenBSD later.
                                                                                                                    • I created a 64MB EFI partition at the front of the disk. Next, I created a 20GB primary partition at the beginning of the space, mounted as the root (/) filesystem.

                                                                                                                      I then added a 4096MB swap partition for Ubuntu. Finally, I used the rest of the free space to create a Reserved BIOS Boot Area FAT32 partition that was not associated with a mount point – this is where I will be installing OpenBSD.

                                                                                                                      • With that done, he wrapped up the Ubuntu installation and then turned over to to the OpenBSD side. Some manual partitioning was required to install to the “Reserved FAT32” partition.
                                                                                                                      • I mashed through the defaults in the OpenBSD installer until I got to the disk partitioning. Since I told VMWare to make my hard drive an IDE one, I knew I was playing around with wd0 and not sd0 (my USB key). I dumped into fdisk by selecting to (E)dit the partition scheme and saw my setup from Linux. First was the EFI partition (I am guessing I’ll have to copy my bootx64.efi file to that at some point), second was the Linux etx4 partition, third was my Linux swap partition and fourth was a weird looking one that is the “Reserved BIOS Boot” partition. That’s the one I’ll fiddle with.

                                                                                                                        Issuing the command “edit 3” allowed me to fiddle with that partition #3 (remember, we start counting at zero). I set it’s type to “A6” (OpenBSD) and then took the defaults with the exception of naming it “OpenBSD”. A quick “write” followed by a “quit” allowed me to update my new partition and get back to the installer.

                                                                                                                        • Once the installation was wrapped up (OpenBSD helpfully already created the /boot/EFI partition with the correct EFI loader installed) he was able to reboot and select between the two systems at the UEFI bios screen.
                                                                                                                        • For kicks, he lastly went into Ubuntu and grabbed refind. Installing refind provided a fancy graphical selector between the two systems without too much trouble.
                                                                                                                        • Next step will be to replicate this process on his friend’s laptop. Wishing you luck with that journey!
                                                                                                                        • Interview - Bryan Cantrill - email@email / @twitter
                                                                                                                          • CTO of Joyent
                                                                                                                          • ***
                                                                                                                            News Roundup
                                                                                                                            After 22 Years, 386BSD Gets An Update
                                                                                                                            • Slashdot brings us an interesting mention this week, specifically that after 22 years, we now have an update to 386BSD.
                                                                                                                            • 386BSD was last released back in 1994 with a series of articles in Dr. Dobb's Journal -- but then developers for this BSD-based operating system started migrating to both FreeBSD and NetBSD. An anonymous Slashdot reader writes: The last known public release was version 0.1. Until Wednesday, when Lynne Jolitz, one of the co-authors of 386BSD, released the source code to version 1.0 as well as 2.0 on Github.

                                                                                                                              386BSD takes us back to the days when you could count every file in your Unix distribution and more importantly, read and understand all of your OS source code. 386BSD is also the missing link between BSD and Linux. One can find fragments of Linus Torvalds's math emulation code in the source code of 386BSD. To quote Linus: "If 386BSD had been available when I started on Linux, Linux would probably never had happened.”

                                                                                                                              Though it was designed for Intel 80386 microprocessors, there's already instructions for launching it on the hosted hardware virtualization service Qemu.

                                                                                                                              • There you have it! Go grab the new hotness that is 386BSD and run it in 2016! Or perhaps you want FreeBSD 11, but to each their own.
                                                                                                                              • ***
                                                                                                                                Progress of the OpenBSD Limited Edition Signed CD set
                                                                                                                                • An update from a story last week! We mentioned the “very” limited edition OpenBSD 6.0 signed CD sets that had gone up for Auction on Ebay. (With proceeds to support for Foundation)
                                                                                                                                • As of today, here’s where we stand:

                                                                                                                                  • CD set #1 (Sep 29th + 5 days) sold for $4200
                                                                                                                                  • CD set #2 (Oct 4th + 3 days) sold for $3000
                                                                                                                                  • CD set #3 (Oct 8th + 3 days) sold for $817
                                                                                                                                  • CD set #4 (Oct 11th + 3 days) is currently up for bidding
                                                                                                                                  • There you have it! The 4th set is almost wrapped up bidding, and the 5th and last set is not far behind. Be sure to grab your piece of BSD history before its gone!

                                                                                                                                  • PROTOTYPE FreeBSD Jail/ZFS based implementation of the Application Container Specification

                                                                                                                                    “Jetpack is an experimental and incomplete implementation of the App Container Specification for FreeBSD. It uses jails as isolation mechanism, and ZFS for layered storage.”

                                                                                                                                    “This document uses some language used in Rocket, the reference implementation of the App Container Specification. While the documentation will be expanded in the future, currently you need to be familiar at least with Rocket's README to understand everything.”

                                                                                                                                    • A standard with multiple implementations, that allow substitution of components, such as FreeBSD Jails instead of docker/lxc etc, and ZFS instead of overlayfs etc, is very exciting
                                                                                                                                    • ***
                                                                                                                                      Microsoft’s Forgotten Unix-based Operating System
                                                                                                                                      • Do you remember the good old days. You know, when Microsoft was the driving force behind UNIX? Wait, what did you say you may be thinking? It’s true, and lets sit back and let FossBytes tell us a tale of what once was reality.
                                                                                                                                      • The story begins sometime in the late 70’s:
                                                                                                                                      • Turning back the pages to the late 1970’s, Microsoft entered into an agreement with AT&T Corporation to license Unix from AT&T. While the company didn’t sell the OS to public, it licensed it to other OEM vendors like Intel, SCO, and Tandy.

                                                                                                                                        As Microsoft had to face legal trouble due to “Unix” name, the company renamed it and came up with its own Unix distribution. So, AT&T licensed Unix to Redmond that was passed on to other OEMs as Xenix.

                                                                                                                                        It’s interesting to recall a time when Microsoft enabled people to run Unix — an operating system originally designed for large and multiuser systems — on a microcomputer. Even though it came first, Unix was probably more powerful than MS-DOS.

                                                                                                                                        • So whatever happened to this microsoft-flavored UNIX you may ask? Sadly it was ditched for DOS due to $REASONS:
                                                                                                                                        • In early 1980’s, IBM was looking for an OS to power its PC. As IBM didn’t want to maintain any ties with the recently split AT&T, Xenix was automatically rejected. To fulfill, the tech giant’s demand, Microsoft bought 86-DOS from Seattle Computer Products and managed to convince IBM to use it in their systems.

                                                                                                                                          Slowly, Microsoft started losing interest in Xenix and traded the full rights of Xenix with SCO, a Xenix partner company. The company filed bankruptcy in 2007 before taking the Xenix legacy to the 21st century in the form of Open Server, previously known as SCO Unix and SCO Open Desktop.

                                                                                                                                          • An interesting chapter in UNIX history to be sure, and funny enough may come full-circle someday with Microsoft beginning to show interest in UNIX and BSD once again.
                                                                                                                                          • ***
                                                                                                                                            Beastie Bits
                                                                                                                                            • Ohio LinuxFest 2016 wrap-up

                                                                                                                                            • Learn X in Y minutes Where X=zfs

                                                                                                                                            • Add touchscreen support for the official 7" RPi touch display

                                                                                                                                            • 64-bit U-Boot on Raspberry Pi 3

                                                                                                                                            • SNIA SDC 2016 Recap: Michael Dexter

                                                                                                                                            • OpenZFS: Stronger than ever

                                                                                                                                            • Accurate, Traceable, and Verifiable Time Synchronization for World Financial Markets

                                                                                                                                            • ON HOLY WARS AND A PLEA FOR PEACE

                                                                                                                                            • Feedback/Questions
                                                                                                                                              • Morgan - Zero-Filling an VM
                                                                                                                                              • Charlie - ZFS Bit-Rot
                                                                                                                                              • Matias - TrueOS / Launchd
                                                                                                                                              • Dale - DO Feedback
                                                                                                                                              • James - DO / FreeBSD Locks?
                                                                                                                                              • ***
                                                                                                                                                2 hr 12 min
                                                                                                                                              • 162: The Foundation of NetBSD

                                                                                                                                                This week on the show, we’ll be talking to Petra about the NetBSD foundation, about how they operate and assist NetBSD behind the scenes. That plus lots of news

                                                                                                                                                This episode was brought to you by

                                                                                                                                                href="http://www.digitalocean.com/" title="DigitalOcean">
                                                                                                                                                href="http://www.tarsnap.com/bsdnow" title="Tarsnap">

                                                                                                                                                Headlines
                                                                                                                                                What is new on EC2 for FreeBSD 11.0-RELEASE
                                                                                                                                                • “FreeBSD 11.0-RELEASE is just around the corner, and it will be bringing a long list of new features and improvements — far too many for me to list here. I think there are
                                                                                                                                                • some improvements in FreeBSD 11.0 which are particularly noteworthy for EC2 users.”
                                                                                                                                                • “First, the EC2 Console Screenshot functionality now works with FreeBSD. This provides a "VGA" output as opposed to the traditional "serial port" which EC2 has exposed as
                                                                                                                                                • "console output" for the past decade, and is useful largely because the "VGA" output becomes available immediately whereas the "serial port" output can lag by several minutes. This
                                                                                                                                                  improvement is a simple configuration change — older releases didn't waste time writing to a non-serial console because it didn't go anywhere until Amazon added support on their
                                                                                                                                                  side — and can be enabled on older FreeBSD releases by changing the line console="comconsole" to boot_multicons="YES" in /boot/loader.conf.”
                                                                                                                                                • “The second notable change is support for EC2 "Enhanced Networking" using Intel 82599 hardware; on the C3, C4, R3, I2, D2, and M4 (excluding m4.16xlarge) families, this
                                                                                                                                                • provides increased network throughput and reduced latency and jitter, since it allows FreeBSD to talk directly to the networking hardware rather than via a Xen paravirtual interface.
                                                                                                                                                  Getting this working took much longer than I had hoped, but the final problem turned out not to be in FreeBSD at all — we were tickling an interrupt-routing bug in a version of
                                                                                                                                                  Xen used in EC2. Unfortunately FreeBSD does not yet have support for the new "Elastic Network Adapter" enhanced networking used in P2 and X1 instance families and the m4.16xlarge
                                                                                                                                                  instance type; I'm hoping that we'll have a driver for that before FreeBSD 11.1 arrives.”
                                                                                                                                                • “The third notable change is an improvement in EC2 disk throughput. This comes thanks to enabling indirect segment I/Os in FreeBSD's blkfront driver; while the support was
                                                                                                                                                • present in 10.3, I had it turned off by default due to performance anomalies on some EC2 instances. (Those EC2 performance problems have been resolved, and disk I/O performance in
                                                                                                                                                  EC2 on FreeBSD 10.3 can now be safely improved by removing the line hw.xbd.xbd_enable_indirect="0" from /boot/loader.conf.)”
                                                                                                                                                • “Finally, FreeBSD now supports all 128 CPUs in the x1.32xlarge instance type. This improvement comes thanks to two changes: The FreeBSD default kernel was modified in 2014 to
                                                                                                                                                • support up to 256 CPUs (up from 64), but that resulted in a (fixed-size) section of preallocated memory being exhausted early in the boot process on systems with 92 or more CPUs; a
                                                                                                                                                  few months ago I changed that value to tune automatically so that FreeBSD can now boot and not immediately panic with an out-of-the-box setup on such large systems.”
                                                                                                                                                • “I think FreeBSD/EC2 users will be very happy with FreeBSD 11.0-RELEASE; but I'd like to end with an important reminder: No matter what you might see on FTP servers, in EC2, or
                                                                                                                                                • available via freebsd-update, the new release has not been released until you see a GPG-signed email from the release engineer. This is not just a theoretical point: In my time as a
                                                                                                                                                  FreeBSD developer I've seen multiple instances of last-minute release re-rolls happening due to problems being discovered very late, so the fact that you can see bits doesn't
                                                                                                                                                  necessarily mean that they are ready to be downloaded. I hope you're looking forward to 11.0-RELEASE, but please be patient.”
                                                                                                                                                  ***
                                                                                                                                                  Upgrading Amazon EC2 instance from 10.3 to 11.0-PRERELEASE results in hang at boot
                                                                                                                                                  • As if to underscore that last point, a last minute bug was found on sunday night
                                                                                                                                                  • A user reported that they used freebsd-update to upgrade an EC2 instance from 10.3 to 11.0 and it started hanging during boot
                                                                                                                                                  • After some quick investigation by Colin, the problem was reproduced
                                                                                                                                                  • Since I had done a lot of work in the loader recently, I helped Colin build a version of the loader with a lot of the debugging enabled, and some more added to try to isolate where
                                                                                                                                                  • in the loader the freeze was happening
                                                                                                                                                  • Colin and I worked late into the night, but eventually found the read from disk that was causing the hang
                                                                                                                                                  • Unlike most of the other reads, that were going into the heap, this read was into a very low memory address, right near the 640kb border. This initially distracted us from the real
                                                                                                                                                  • cause of the problem
                                                                                                                                                  • With more debugging added, it was determined that the problem was in the GELIBoot code, when reading the last sector of each partition to determine if it is encrypted. In cases
                                                                                                                                                  • where the partition is not 4k aligned, and butts up against the end of the disk, the formula used could result in a read past the end of the disk
                                                                                                                                                  • The formula rounds the last sector byte address down to the nearest factor of 4096, then reads 4096 bytes. Then that buffer is examined to determine if the partition is encrypted.
                                                                                                                                                  • If it is a 512b sector drive, the metadata will be in the last 512 bytes of that 4096 byte buffer.
                                                                                                                                                  • However, if the partition is not 4k aligned, the rounding will produce a value that is less than 4096 bytes from the end of the disk, and attempting to read 4096 bytes, will read
                                                                                                                                                  • past the end of the disk
                                                                                                                                                  • Normally this isn’t that big of a problem, the BIOS will just return an error. The loader will retry up to three times, then give up and move on, continuing to boot normally.
                                                                                                                                                  • Some BIOSes are buggy, and will initiate their own retries, and the combination might result in a stall of up to 30 seconds for each attempt to read past the end of the disk
                                                                                                                                                  • But it seems that Amazon EC2 instances, (and possibly other virtual instances), will just hang in this case.
                                                                                                                                                  • This bug has existed for 6 months, but was not caught because almost all installations are 4k aligned thanks to changes made to the installer over the last few years, and most
                                                                                                                                                  • hardware continues to boot with no sign of a problem
                                                                                                                                                  • Even the EC2 snapshot images of 11.0 do not have the problem, as they use a newer disk layout that is 4k aligned by default now. The problem only seems to happen when older disk
                                                                                                                                                  • images are upgraded
                                                                                                                                                  • The fix has been committed and will be merged the the branches over the next few days
                                                                                                                                                  • An Errata notice will be issues, and the fix will be available via freebsd-update
                                                                                                                                                  • It is recommended that EC2 users, and anyone who wants to be especially cautious, wait until this errata notice goes out before attempting to upgrade from FreeBSD 10.3 to 11.0
                                                                                                                                                  • You can determine if your partitions are 4k aligned by running ‘gpart show’. If there is free space after your last partition, you won’t have any issues.
                                                                                                                                                  • ***
                                                                                                                                                    OpenBSD 6.0 Limited Edition CD set (signed by developers)

                                                                                                                                                    The first one went for .$4,200.00

                                                                                                                                                    • Looking for your piece of OpenBSD history? At the recent g2k16 hackathon in Cambridge UK, 40 OpenBSD developers put pen to paper and signed 5 copies of the new 6.0 release.
                                                                                                                                                    • Each of these will be auctioned off on ebay, with the proceeds to benefit the OpenBSD foundation.
                                                                                                                                                    • The first auction has already ended, and CD set went for a whopping $4200!
                                                                                                                                                    • The next set only has 2 days left, and currently stands at $3000! (http://www.ebay.com/itm/-/331990536246)
                                                                                                                                                    • Get your bids in soon, these are VERY unique, the odds of getting the same 40 developers in a room together and signing a new .0 release may make this a once-in-a-lifetime
                                                                                                                                                    • opportunity.
                                                                                                                                                    • Additionally, if you are just starting your OpenBSD collection, here’s a nice image to make you envious: A nice collection of OpenBSD CD Sets
                                                                                                                                                    • ***
                                                                                                                                                      [What typing D really does on Unix

                                                                                                                                                      ](https://utcc.utoronto.ca/~cks/space/blog/unix/TypingEOFEffects)

                                                                                                                                                      • How often have you used a D to generate an EOF? Do you really know what that does?
                                                                                                                                                      • Chris Siebenmann has posted a look at this on his blog, which might not be what you think
                                                                                                                                                      • “Typing D causes the tty driver to immediately finish a read().”

                                                                                                                                                        • He continues on:
                                                                                                                                                        • Normally doing a read() from a terminal is line-buffered inside the tty driver; your program only wakes up when the tty driver sees the newline, at which point you get back the full

                                                                                                                                                          line. (Note that this buffering is distinct from anything that your language's IO system may be doing.)

                                                                                                                                                          Typing D causes the tty driver to stop waiting for a newline and immediately return from the read() with however much of the line has been accumulated to date. If you haven't

                                                                                                                                                          typed anything on the line yet, there is nothing accumulated and the read() will return 0 bytes, which is conveniently the signal for end of file. If you have typed something the
                                                                                                                                                          program will get it; because it doesn't have a trailing newline, the program's own line-buffering may take over and keep read()ing to get the rest of the line.

                                                                                                                                                          (Other programs will immediately process the partial line with no buffering; cat is one example of this.)

                                                                                                                                                          Once you've typed D on a partial line, that portion of the line is immutable because it's already been given to the program. Most Unixes won't let you backspace over such partial

                                                                                                                                                          lines; effectively they become output, not input.

                                                                                                                                                          (Note that modern shells are not good examples of this, because they don't do line-buffered input; to support command line editing, they switch terminal input into an uninterpreted

                                                                                                                                                          mode. So they get the raw D and can do whatever they want with it, and they can let you edit as much of the pending line as they want.)

                                                                                                                                                          • Fascinating stuff, and interesting to see behind the curtain at exactly what’s going on with your programs buffering and tty driver interaction.
                                                                                                                                                          • Interview - Petra Zeidler - [email protected]
                                                                                                                                                            • NetBSD Foundation
                                                                                                                                                            • ***
                                                                                                                                                              News Roundup
                                                                                                                                                              Running FreeBSD in Travis-CI Thanks to KQEmu
                                                                                                                                                              • Travis-CI is the most popular testing framework on Github, but it doesn’t support any of the BSDs
                                                                                                                                                              • This didn’t discourage Even Rouault, who managed to run FreeBSD in KQEMU on the Linux instances provided by Travis-CI
                                                                                                                                                              • “Travis-CI has a free offer for software having public repository at GitHub. Travis-CI provides cloud instances running Linux or Mac OS X. To increase portability tests of
                                                                                                                                                              • GDAL, I wondered if it was somehow possible to run another operating system with Travis-CI, for example FreeBSD. A search lead me to this
                                                                                                                                                                question in their bug tracker but the outcome seems to be that it is not possible, nor in their medium or long term plans.”
                                                                                                                                                              • “One idea that came quickly to mind was to use the QEMU machine emulator that can simulate full machines, of several hardware architectures.”
                                                                                                                                                              • They found an existing image of FreeBSD 9.2 and configured the Travis job to download it and fire it up in QEMU.
                                                                                                                                                              • “Here we go: ./configure && make ! That works, but 50 minutes later (the maximum length of a Travis-CI job), our job is killed with perhaps only 10% of the GDAL code base being
                                                                                                                                                              • compiled. The reason is that we used the pure software emulation mode of QEMU that involves on-the-fly disassembling of the code to be run and re-assembling.”
                                                                                                                                                              • Travis-CI runs in Google Compute Engine, which does not allow nested virtualization, so hardware virtualization is not an option to speed up QEMU
                                                                                                                                                              • “Here comes the time for good old memories and a bit of software archeology. QEMU was started by Fabrice Bellard. If you didn't know his name yet, F. Bellard created FFMPEG and
                                                                                                                                                              • QEMU, holds a world record for the number of decimals of Pi computed on a COTS PC, has ported QEMU in JavaScript to run the Linux kernel in your browser, devised BPG, a new
                                                                                                                                                                compression based on HEVC, etc....”
                                                                                                                                                              • “At the time where his interest was focused on QEMU, he created KQemu, a kernel module (for Linux, Windows, FreeBSD hosts), that could significantly enhance QEMU performance
                                                                                                                                                              • when the guest and hosts are x86/x86_64 and does not require (nor use) hardware virtualization instructions.”
                                                                                                                                                              • “Running it on Travis-CI was successful too, with the compilation being done in 20 minutes, so probably half of the speed of bare metal, which is good enough.”
                                                                                                                                                              • “I could also have potentially tried VirtualBox because, as mentioned above, it supports software virtualization with acceleration. But that is only for 32 bit guests (and I
                                                                                                                                                              • didn't find a ready-made FreeBSD 32bit image that you can directly ssh into). For 64 bit guests, VirtualBox require hardware virtualization to be available in the host. To the best
                                                                                                                                                                of my knowledge, KQemu is (was) the only solution to enable acceleration of 64 bit guests without hardware requirements.”
                                                                                                                                                              • It will be interesting to see if enough people do this hack, maybe Travis-CI will consider properly supporting FreeBSD
                                                                                                                                                              • ***
                                                                                                                                                                OpenBSD EuroBSDcon 2016 Papers are online
                                                                                                                                                                • Slides from the OpenBSD talks at EuroBSDCon are online now
                                                                                                                                                                  • Landry Breuil, Building packages on exotic architectures
                                                                                                                                                                  • Peter Hessler, Bidirectional Forwarding Detection (BFD) implementation and support in OpenBSD
                                                                                                                                                                  • Ingo Schwarze, Why and how you ought to keep multibyte character support simple (roff/mm/gpresent source
                                                                                                                                                                  • code)
                                                                                                                                                                  • Stefan Sperling, OpenBSD meets 802.11n
                                                                                                                                                                  • Antoine Jacoutot, OpenBSD rc.d(8)
                                                                                                                                                                  • Marc Espie, Retrofitting privsep into dpb and pkg_add
                                                                                                                                                                  • Martin Pieuchot, Embracing the BSD routing table
                                                                                                                                                                  • I am working to build a similar website for the FreeBSD project, but there is still a lot of work to do
                                                                                                                                                                  • I also managed to find the slides from the keynotes:
                                                                                                                                                                  • Opening Keynote: George Neville-Neil: Looking Backwards: The coming decades of BSD
                                                                                                                                                                  • Closing Keynote: Gert Döring: Internet Attacks, Self-Governance, and the Consequences
                                                                                                                                                                  • ***
                                                                                                                                                                    VirtualBox Shared Folders on FreeBSD: progress report
                                                                                                                                                                    • In the past month or so, VirtualBox in the FreeBSD ports tree got bumped to version 5, which while bringing new features, did cause a regression in Shared Folders.
                                                                                                                                                                    • FreeBSD developer gonzo@ (Oleksandr Tymoshenko) has been tackling this issue in recent days and provides us with a look behind the curtain at the challenges involved.
                                                                                                                                                                    • Specifically he started by implementing the various needed VOPs: “lookup, access, readdir, read, getattr, readlink, remove, rmdir, symlink, close, create, open, write.”
                                                                                                                                                                    • He then continues with details about how complete this is:
                                                                                                                                                                    • ““Kind of implemented” means that I was able to mount directory, traverse it, read file, calculate md5 sums and compare with host’s md5sum, create/remove directories,

                                                                                                                                                                      unzip zip file, etc but I doubt it would survive stress-test. Locking is all wrong at the moment and read/write VOPs allocate buffers for every operation.”

                                                                                                                                                                      • The bigger issue faced is with the rename VOP though:
                                                                                                                                                                      • I hit a roadblock with rename VOP: it involves some non-trivial locking logic and also there is a problem with cached paths. VBox hypervisor operates on full paths so we cache them

                                                                                                                                                                        in vboxfs nodes, but if one of parent directories is renamed, all cached names should be modified accordingly. I am going to tackle these two problems once I have long enough stretch
                                                                                                                                                                        of time time sit and concentrate on task.

                                                                                                                                                                        • We wish him luck in getting those issues solved. I know quite a few of our users rely on shared folders as well.
                                                                                                                                                                        • ***
                                                                                                                                                                          FreeBSD News Issue #1
                                                                                                                                                                          • Issue #1 of FreeBSD News, from summer of 1997
                                                                                                                                                                          • Contains an article by Yahoo! co-founder David Filo about their early use of FreeBSD, on 100mhz Pentium machines with 64MB of ram
                                                                                                                                                                          • Java Development Kit 1.0.2 ported to FreeBSD
                                                                                                                                                                          • What is FreeBSD?
                                                                                                                                                                          • Running the world’s busiest FTP site (cdrom.com) on FreeBSD
                                                                                                                                                                          • Xi Graphics announces the release of CDE Business Desktop, the first and only integrated desktop for FreeBSD, on AcceleratedX, a fully supported commercial grade X display server
                                                                                                                                                                          • Get FreeBSD 2.2.2 Today!
                                                                                                                                                                          • ***
                                                                                                                                                                            Beastie Bits
                                                                                                                                                                            • Call for testing: newly MPSAFE nvme(4)

                                                                                                                                                                            • Thinking about starting a BUG in Indianapolis, IN USA

                                                                                                                                                                            • The cost of forsaking C: Why students still need to learn C

                                                                                                                                                                            • OpenBSD (U)EFI bootloader howto

                                                                                                                                                                            • Michael Lucas sets his eyes on OpenBSD's web stack for his next book

                                                                                                                                                                            • LibreSSL 2.5.0 released

                                                                                                                                                                            • OPNsense 16.7.5 released

                                                                                                                                                                            • Feedback/Questions
                                                                                                                                                                              • Jonas - ZFS on DO
                                                                                                                                                                              • Ricardo - OpenBSD Encrypted Disk
                                                                                                                                                                              • WiskerTickle - Storage Benchmark
                                                                                                                                                                              • Phil - Thanks
                                                                                                                                                                              • Luis - Misc Questions
                                                                                                                                                                              • ***
                                                                                                                                                                                1 hr 47 min
                                                                                                                                                                              • 161: The BSD Bromance

                                                                                                                                                                                This week on BSDNow, we’re going to be hearing about Allan’s trip to EuroBSDCon, plus an Interview about “Bro on BSD”! Stay tuned, for your place to

                                                                                                                                                                                This episode was brought to you by

                                                                                                                                                                                href="http://www.digitalocean.com/" title="DigitalOcean">
                                                                                                                                                                                href="http://www.tarsnap.com/bsdnow" title="Tarsnap">

                                                                                                                                                                                Headlines
                                                                                                                                                                                EuroBSDCon 2016 Wrapup
                                                                                                                                                                                • Ollivier Robert’s Photos from EuroBSDCon
                                                                                                                                                                                • Get your BSDNow die-cut stickers
                                                                                                                                                                                • NetBSD for newbies - Develop your own Power PC
                                                                                                                                                                                  • We don’t get to feature too many stories on NetBSD being deployed as a Power PC (Not PowerPC, you know, a Powerful “PC”), so we jumped at this one.
                                                                                                                                                                                  • Specifically it starts off with some of the pre-req’s that you’ll need to get started, such as NetBSD 7.0.1 / amd64, along with some information about which wireless nics you may be using. (NetBSD like other BSD’s will give a driver based device name for network interfaces)
                                                                                                                                                                                  • From there, instructions on how to write your WPA_supplicant config are provided, in order for us to fetch the NetBSD sources and convert to their -STABLE branch.
                                                                                                                                                                                  • After doing a CVS checkout of the sources, he then provides a walkthrough of doing a kernel compile / install, however it mentions changing the config, but doesn’t provide an example of what options were changed. Perhaps to remove drivers we don’t need?
                                                                                                                                                                                  • At this point the rest of the “desktop” setup is pretty straight forward. Some packages are added such as openbox, lxappearance, firefox, etc.
                                                                                                                                                                                  • To get working sound, firefox requires pulseaudio, which in turn needs dbus, so instructions on getting that service up and running are provided as well.
                                                                                                                                                                                  • When it’s all said and done, you’ll end up with your shiny new NetBSD -STABLE desktop (or laptop), bragging rights achieved!
                                                                                                                                                                                  • ***
                                                                                                                                                                                    More about OpenSMTPD 6.0.0
                                                                                                                                                                                    • OpenSMTPd 6.0.0 has just been released “and it's quite different from former releases.”
                                                                                                                                                                                    • “Unlike most of our releases, it comes out with almost no new feature.”, “Turns out most of the changes are not visible.”
                                                                                                                                                                                    • Changelog:
                                                                                                                                                                                      • new fork+reexec model so each process has its own randomized memory space
                                                                                                                                                                                      • logging format has been reworked
                                                                                                                                                                                      • a "multi-line response" bug in the LMTP delivery backend has been fixed
                                                                                                                                                                                      • connections concurrency limits have been bumped
                                                                                                                                                                                      • artificial delaying in remote sessions have been reduced
                                                                                                                                                                                      • dhparams option has been removed
                                                                                                                                                                                      • dhe option has been added, supporting auto and legacy modes
                                                                                                                                                                                      • smtp engine has been simplified
                                                                                                                                                                                      • various cosmetic changes, code cleanup and documentation improvement
                                                                                                                                                                                      • “The OpenSMTPD bootstrap process was quite simple: Upon executation, the parent process would read configuration, build a memory representation of it and would then create a bunch of socketpair() before fork()-ing all of its child processes.”
                                                                                                                                                                                      • The problem is that this does not take advantage of the new address randomization feature. Each child will have the same memory layout, copied from the parent process
                                                                                                                                                                                      • “So deraadt@ suggested that if OpenSMTPD would not just fork() children but instead fork() them and reexecute the smtpd binary, then each of the children would have its own randomized memory space.”
                                                                                                                                                                                      • “The idea itself is neat, however not so trivial to implement because when we reexec the whole "inherit configuration and descriptors" part goes away. It's not just fork and exec, it's fork and exec and figure a way for the parent to pass back all the information and descriptors back to the new post-fork instance so it is the new instance that allocates memory and decides where the information goes.”
                                                                                                                                                                                      • ***
                                                                                                                                                                                        Upgrade a FreeBSD 10.3 Installation with ZFS on Root and Full Disk Encryption to 11.0
                                                                                                                                                                                        • While FreeBSD 11.0 is not out yet, Joseph Mingrone has helped me work out and test the instructions for upgrading a FreeBSD 10.3 ZFS on full disk encryption setup (bootpool + zpool) to the new GELIBoot feature, which does not require any unencrypted partitions, just the 128kb bootcode
                                                                                                                                                                                        • Note: Do not upgrade to FreeBSD 11.0 yet. While some images have landed on the FTP server, they do not contain the final openssl fix and are going to be recreated.
                                                                                                                                                                                        • Currently, GELIBoot does not support key files, so the first step is to reencrypt the master key with only a passphrase.
                                                                                                                                                                                        • Next, to avoid GELIBoot picking up encrypted partitions that it does not support, or partitions you do not want decrypted at boot, only partitions with the GELIBoot flag are decrypted, so set the flag on your root partition
                                                                                                                                                                                        • Then, move the loader, kernel, and other files into /boot on the root filesystem, instead of them living on the bootpool. This allows the kernel to be versioned with boot environments, and is the main purpose of this work
                                                                                                                                                                                        • Then, install the newer gptzfsboot, as this is required to support GELIBoot
                                                                                                                                                                                        • The old 2gb bootpool partition is then purposely mislabeled as freebsd-vinum, so it is not picked up by the boot blocks. Later, if the upgrade is successful, this partition can be deleted, and used as addition swap or something
                                                                                                                                                                                        • In order to boot correctly, you want all boot environments to have the ‘canmount’ ZFS property set to ‘noauto’
                                                                                                                                                                                        • Thank you to Joseph for taking the time to prod me for the information required to write this up, and for testing it and finding all of the issues
                                                                                                                                                                                        • ***
                                                                                                                                                                                          Interview - Michael Shirk - [email protected] / @shirkdog
                                                                                                                                                                                          • Running Bro on BSD
                                                                                                                                                                                          • ***
                                                                                                                                                                                            News Roundup
                                                                                                                                                                                            FreeBSD based distro for virtual hosting platform and appliance
                                                                                                                                                                                            • An interesting new FreeBSD-based project as shown up online, called “ClonOS”, which bills itself as a “free open-source FreeBSD-based platform for virtual environments creation and management”
                                                                                                                                                                                            • It looks to be leveraging an impressive list of technologies, including Bhyve, Xen, Jails and CBSD / Puppet for management tasks.
                                                                                                                                                                                            • Among its list of features:

                                                                                                                                                                                              • ZFS features support;
                                                                                                                                                                                              • VM cloning, export, import
                                                                                                                                                                                              • Ethernet SoftSwitch for separated networking
                                                                                                                                                                                              • jails for lightweight container
                                                                                                                                                                                              • VNC terminal for VM/containers
                                                                                                                                                                                              • Templates for VM/containers
                                                                                                                                                                                              • Configuration management/helpers
                                                                                                                                                                                              • Multi-node operation
                                                                                                                                                                                              • Multi-Node? Color me intrigued!

                                                                                                                                                                                              • Right now it appears to be under heavy development, but we’ll reach out to the developer to see if we can get an interview lined up at some point!

                                                                                                                                                                                              • The Raspberry PI Platform and The Challenges of Developing FreeBSD
                                                                                                                                                                                                • BSDMag recently did an interview with FreeBSD developer Olesandr Rybalko!
                                                                                                                                                                                                • Oleksandr lives in the Ukraine, and while you may not have heard of him, he has worked on some cool projects for FreeBSD including the new “vt” console driver (Which a lot of people are using now), and ARM/MIPS support.
                                                                                                                                                                                                • The interview covers some of the work he’s done to get the PI support working with FreeBSD:
                                                                                                                                                                                                • I think, my main help here was a USB OTG driver, which I wrote before for another device (Ralink RT3052), then port it to R-Pi. But it was rewritten by Hans Peter Selasky. I do not know so much about USB as Hans knows.

                                                                                                                                                                                                  Another useful part of my help is Xorg support. I did a simple Xorg video driver which uses framebuffer exported by virtual terminal subsystem. That is help to many guys to start use RPi as a simple desktop system.

                                                                                                                                                                                                  • He was also asked the question “Why would FreeBSD be good fit for ARM?”
                                                                                                                                                                                                  • FreeBSD is very powerful as a network server. All modern network features in one box, with very fast processing.

                                                                                                                                                                                                    Another good side of FreeBSD is modularity. It is not required to write code to use some driver that was already written for another system, you can just define it in configuration files (kernel config, kernel hints, FDT). So if you want build a nice, R-Pi based, home server – use FreeBSD. If you want to play with devices attached to R-Pi’s GPIO – use FreeBSD.

                                                                                                                                                                                                    • He also discusses his work on the ZRouter project, which is a very light-weight platform for tiny routers / embedded devices. But lastly the RPI comes up again, specifically asking him how interested individuals can get involved. Specifically the wiki.freebsd.org is a great reference point for those intested in getting started with FreeBSD on embedded. The warm community is also a plus!
                                                                                                                                                                                                    • Trying out the FreeBSD powered TrueOS
                                                                                                                                                                                                      • The folks over at Phoronix have done an early look at the new TrueOS desktop images and given some of their thoughts.
                                                                                                                                                                                                      • First up he gives props to the installer, noting that:
                                                                                                                                                                                                      • The TrueOS desktop installer is basically the same as from the PC-BSD days, just re-branded. Still one of the easiest BSD graphical installers I've dealt with and makes it a breeze for setting up a FreeBSD-on-ZFS system by default.

                                                                                                                                                                                                        • After that they took it for a minimal spin, and thing mostly seem to be working. He mentions some of the default apps (Such as qupzilla and trojita) aren’t their favorite, but Lumina has come quite a ways for 1.0, despite a few rough edges still. (We are in the process of changing those default e-mail / browser apps)
                                                                                                                                                                                                        • Lastly the article mentions that it’s time to do a more full BSD round-up to see the state of installation of them, which we happen to have next!
                                                                                                                                                                                                        • Trying out 8 BSDs on a modern PC
                                                                                                                                                                                                          • First up was TrueOS again, which no major changes there, easy install and done.
                                                                                                                                                                                                          • From there he tries out DragonFlyBSD, which he mentions that while the installer isn’t as easy, it is still one of his favorite BSD’s, working with all the hardware they’ve thrown at it.
                                                                                                                                                                                                          • Next up was GhostBSD, which also has an Easy-To-Use graphical installer similar to TrueOS that made it quick to get loaded and up to the Mate desktop.
                                                                                                                                                                                                          • Also tested was FreeBSD 11.0-RC2, which he mentions was easy to installed, and once done then ‘pkg’ could be used to easily get the setup he wanted setup.
                                                                                                                                                                                                          • Turning over to page two we get to the naughty list of BSD’s he had troubles with.
                                                                                                                                                                                                          • First up was OpenBSD which he tried 6.0. After installation and first boot, the display kept ‘disappearing’ which meant he couldn’t get IP information to try SSH’ing into the box. Perhaps a display driver error?
                                                                                                                                                                                                          • NetBSD 7 was up next, where the installer couldn’t get past a root device prompt. Most likely trouble finding the install media, which was the same story with MightnightBSD as well.
                                                                                                                                                                                                          • Also tested was “PacBSD” (Formerly ArchBSD) which he did manage to get installed, but not after major fighting with the process. After the process he ran into some issues getting packages up and running, but mentions it may have been bad timing due to them moving to a new server at the time.
                                                                                                                                                                                                          • ***
                                                                                                                                                                                                            IllumOS imports a modified FreeBSD boot loader to replace grub 0.97
                                                                                                                                                                                                            • Toomas Soome’s work to port the FreeBSD boot loader to IllumOS has been merged into illumos-gate, the upstream repository for all IllumOS distributions
                                                                                                                                                                                                            • Toomas’ work has also resulted in a number of commits to FreeBSD, and code sharing in both directions
                                                                                                                                                                                                            • Toomas helped me a lot with the building of the ZFS boot environment listing menu, even though on IllumOS they use a configuration file to list the BEs, rather than interrogating the live zpool like we do in FreeBSD
                                                                                                                                                                                                            • Toomas’ work to improve msdosfs and the block cache to speed up booting IllumOS also greatly helped FreeBSD
                                                                                                                                                                                                            • This work means IllumOS can now boot from a RAID-Z (the old grub they used could not), and if the work Toomas has done on FreeBSD is any indication, support for almost all other zpool features is also on the way
                                                                                                                                                                                                            • This work also sets IllumOS on a path to eventually having UEFI boot as well
                                                                                                                                                                                                            • It is good to see this work happening, FreeBSD technology being reused elsewhere, but also the improvements being made for IllumOS are coming back to FreeBSD, often landing upstream first, to make merging them into IllumOS easier.
                                                                                                                                                                                                            • The mailing list post describes how to convert existing systems away from grub, as well as how to opt to remain on grub for a while longer.
                                                                                                                                                                                                            • Grub 0.97 is expected to be removed from IllumOS within a year.
                                                                                                                                                                                                            • ***
                                                                                                                                                                                                              Beastie Bits
                                                                                                                                                                                                              • A demo of booting CentOS and Windows 10 in FreeBSD Bhyve through VNC headless
                                                                                                                                                                                                              • This year’s anemic output
                                                                                                                                                                                                              • “PAM Mastery” ebook now out
                                                                                                                                                                                                              • How-to Install OpenBSD 6.0 plus XFCE desktop and basic applications
                                                                                                                                                                                                              • ***
                                                                                                                                                                                                                Feedback/Questions
                                                                                                                                                                                                                • Piotr - LibreBoot
                                                                                                                                                                                                                • Alan - FreeBSD and PC-BSD
                                                                                                                                                                                                                • Eduardo - Newcomers
                                                                                                                                                                                                                • Greg - ZFS ACL’s
                                                                                                                                                                                                                • Brian - Laptop Recs
                                                                                                                                                                                                                • ***
                                                                                                                                                                                                                  1 hr 42 min
                                                                                                                                                                                                                • 160: EuroBSD-Dreamin

                                                                                                                                                                                                                  This week on BSDNow, Allan is currently at EuroBSDCon! However due to the magic of video (or time travel), you still get a new episode. (You’re Welcome!). Stay tuned

                                                                                                                                                                                                                  This episode was brought to you by

                                                                                                                                                                                                                  href="http://www.digitalocean.com/" title="DigitalOcean">
                                                                                                                                                                                                                  href="http://www.tarsnap.com/bsdnow" title="Tarsnap">

                                                                                                                                                                                                                  Headlines
                                                                                                                                                                                                                  Performance Improvements for FreeBSD Kernel Debugging
                                                                                                                                                                                                                  • “We previously explored FreeBSD userspace coredumps. Backtrace’s debugging platform supports FreeBSD kernel coredumps too, and their traces share many features. They are constructed somewhat differently, and in the process of adding support for them, we found a way to improve performance for automated programs accessing them.”
                                                                                                                                                                                                                  • “A kernel core is typically only generated in exceptional circumstances. Unlike userspace processes, kernel routines cannot fault without sacrificing the machine’s availability. This means things like page faults and illegal instructions inside the kernel stop the machine, instead of just one process. At that point, in most cases, it is only usable enough to inspect its state in a debugger, or to generate a core file.”
                                                                                                                                                                                                                  • No one likes it when this happens. This is why backtrace.io is focused on being able to figure out why it is happening
                                                                                                                                                                                                                  • “A FreeBSD kernel core file can be formatted in several different ways. This depends on which type of dump was performed. Full core dumps are ELF files, similar in structure to userspace core files. However, as RAM size grew, this became more difficult to manage. In 2006, FreeBSD introduced minidumps, which are much smaller without making the core file useless. This has been the default dump type since FreeBSD 6.0.”
                                                                                                                                                                                                                  • The article goes into detail on the minidump format, and some basic debugging techniques
                                                                                                                                                                                                                  • “Libkvm will first determine whether the virtual address lies within the kernel or direct maps. If it lies in the kernel map, libkvm will consult the page table pages to discover the corresponding physical address. If it lies in the direct map, it can simply mask off the direct map base address. If neither of these applies, the address is illegal. This process is encapsulated by va_to_pa, or “virtual address to physical address”. Once the physical address is determined, libkvm consults the core file’s bitmap to figure out where in the core file it is located.”
                                                                                                                                                                                                                  • “minidumps include a sparse bitmap indicating the pages that are included. These pages are dumped sequentially in the last section. Because they are sparse in a not entirely predictable way, figuring the offset into the dump for a particular physical address cannot be reduced to a trivial formula.”
                                                                                                                                                                                                                  • The article goes into detail about how lookups against this map are slow, and how they were improved
                                                                                                                                                                                                                  • “For typical manual debugger use, the impact of this change isn’t noticeable, which is probably why the hash table implementation has been in use for 10 years. However, for any automated debugging process, the extra latency adds up quickly.”
                                                                                                                                                                                                                  • “On a sample 8GB kernel core file (generated on a 128GB server), crashinfo improves from 44 seconds to 9 seconds, and uses 30% less memory”
                                                                                                                                                                                                                  • “Backtrace began shipping a version of this performance improvement in ptrace in February 2016. This enables us to also offer significantly faster tracing of FreeBSD kernel cores to customers running current and older releases of FreeBSD. On July 17, 2016, our work improving libkvm scaling was committed to FreeBSD/head. It will ship with FreeBSD 12.0.”
                                                                                                                                                                                                                  • ***
                                                                                                                                                                                                                    OpenBSD gunzip pipeline tightening
                                                                                                                                                                                                                    • OpenBSD has rethought the way they handle package signing
                                                                                                                                                                                                                    • Changing from: 1/ fetch data -> 2/ uncompress it -> 3/ check signature -> 4/ process data
                                                                                                                                                                                                                    • To: 1/ fetch data -> 2/ check signature -> 3/ uncompress -> 4/ process data
                                                                                                                                                                                                                    • “The solution is to move the signature outside of the gzip header”
                                                                                                                                                                                                                    • “Now, Since step 1/ is privsep, as long as step 2 is airtight, 3/ and 4/are no longer vulnerable”
                                                                                                                                                                                                                    • Guidelines:
                                                                                                                                                                                                                      • small, self-contained code to parse simple gzip headers
                                                                                                                                                                                                                      • signify-style signature in the gzip comment. Contains checksums of 64K blocks of the compressed archive
                                                                                                                                                                                                                      • don't even think about passing the original gzip header through
                                                                                                                                                                                                                      • use as a pipeline step: does not need to download full archive to use it, and never ever pass any data to the gunzip part before it's been verified.
                                                                                                                                                                                                                      • “Note that afaik we haven't had any hole in our gunzipping process. Well… waiting for an accident to happen is not how we do things. Hopefully, this should prevent future mishaps.”
                                                                                                                                                                                                                      • ***
                                                                                                                                                                                                                        OpenVPN On FreeBSD 10.3
                                                                                                                                                                                                                        • “While trying to setup OpenVPN, I noticed there was no up-to-date information with correct instructions. OpenVPN uses EasyRSA to setup keys, it has recently been changed in version 3. As a result of this, the old steps to configure OpenVPN are no longer correct. I went through the process of setting up a VPN using OpenVPN on FreeBSD 10.3.”
                                                                                                                                                                                                                        • I know FreeBSD developer Adrian Chadd complained about this exact problem when he was trying to setup a VPN before attending DEFCON
                                                                                                                                                                                                                        • The tutorial walks through the basic steps:
                                                                                                                                                                                                                          • Install the needed software
                                                                                                                                                                                                                          • Configure EasyRSA
                                                                                                                                                                                                                          • Create a CA
                                                                                                                                                                                                                          • Generate keys and DH params
                                                                                                                                                                                                                          • OpenVPN Server Config
                                                                                                                                                                                                                          • OpenVPN Client Config
                                                                                                                                                                                                                          • Starting the daemon
                                                                                                                                                                                                                          • It even finishes off with bonus instructions on Port Forwarding, Firewalls, and Dynamic DNS
                                                                                                                                                                                                                          • ***
                                                                                                                                                                                                                            lsop
                                                                                                                                                                                                                            • LSOP is the tool a bunch of users have been asking for
                                                                                                                                                                                                                            • “a FreeBSD utility to list all processes running with outdated binaries or shared libraries”
                                                                                                                                                                                                                            • How does it work? “lsop iterates over all running processes and looks through memory-mapped files with read + execute access; then it checks if those files are still available or have been modified/deleted.”
                                                                                                                                                                                                                            • How would you use it? After installing an system update (that doesn’t require a reboot to update the kernel), or upgrade your packages, you still need to know which daemons need to be restarted to use the patched libraries and binaries
                                                                                                                                                                                                                            • This tool gives you that list
                                                                                                                                                                                                                            • Thanks to Bogdan Boyadzhiev for writing this much needed tool
                                                                                                                                                                                                                            • ***
                                                                                                                                                                                                                              News Roundup
                                                                                                                                                                                                                              OpenBSD 2016 Fundraising Campaign
                                                                                                                                                                                                                              • The OpenBSD fund-raising campaign has given us a status update on the state of 2016.
                                                                                                                                                                                                                              • They start by giving us a re-cap of previous years:

                                                                                                                                                                                                                              • “2015 was a good year for the foundation financially, with one platinum, one gold, four silver and 3 bronze donors providing half of our total donations. 680 individuals making smaller contributions provided the other half. While the total was down significantly after 2014’s blockbuster year, we again exceeded our goal.”

                                                                                                                                                                                                                              • As of Sept 5th, they were at approx $115k out of a total goal of 250k.

                                                                                                                                                                                                                              • If you are an OpenBSD user, remember to contribute before the end of the year. Small amounts help, and the money of course goes to great causes such as hackathons and running the OpenBSD infrastructure.

                                                                                                                                                                                                                              • Update firewall Bad Countries
                                                                                                                                                                                                                                • Network and Systems admins know, sometimes when all else fails you need to break out the HUGE ban-hammer. In this case sometimes entire countries get put on the excrement list until the attacks stop.
                                                                                                                                                                                                                                • We have a handy GitHub project today, which will assist you in doing exactly that, enter update-fw-BC. (Update firewall by country)
                                                                                                                                                                                                                                • This perl script may be your savior when dealing with instances that require major brute force. It specifically works with IPFW, PF and IPTABLES, which will allow it to run across a variety of BSD’s or even Linux.
                                                                                                                                                                                                                                • It will ingest a list of IP’s that you feed it (perhaps from another tool such as sshguard) and determine what block the IP belongs to, and match according to country.
                                                                                                                                                                                                                                • Detailed setup instructions for the various firewalls are included, and some instructions for FreeBSD, although using it on OpenBSD or other $BSD should also be easy to adapt.
                                                                                                                                                                                                                                • ***
                                                                                                                                                                                                                                  More utilities via moreutils
                                                                                                                                                                                                                                  • In most BSDs, the “core” set of utilities and commands are just part of the base system, but on Linux, they are usually provided by the “coreutils” package.
                                                                                                                                                                                                                                  • However, on Linux and now FreeBSD, there is a “moreutils” package, that provides a number of interesting additional basic utilities, including:
                                                                                                                                                                                                                                    • chronic: Run a task via crontab, and only generate output if the task fails
                                                                                                                                                                                                                                    • combine: binary AND two text files together, only displaying lines that are in both files
                                                                                                                                                                                                                                    • errno: look up the text description of a specific error number
                                                                                                                                                                                                                                    • ifdata: parse out specific information from ifconfig
                                                                                                                                                                                                                                    • ifne: if-not-empty, only run a command if the output of the pipe is not blank
                                                                                                                                                                                                                                    • isutf8: determine if a file or stdin contains utf8
                                                                                                                                                                                                                                    • lckdo: execute a command with a lock held, to prevent a second copy from spawning
                                                                                                                                                                                                                                    • mispipe: return the exit code of the first command in a pipe chain, rather than the last
                                                                                                                                                                                                                                    • parallel: run multiple jobs at once
                                                                                                                                                                                                                                    • pee: tee standard input to multiple pipes
                                                                                                                                                                                                                                    • sponge: write standard input to a file, allows you to overwrite a file in place: sort file | sponge file
                                                                                                                                                                                                                                    • ts: add a timestamp to each line of standard input
                                                                                                                                                                                                                                    • vidir: edit a directory in vi, great for bulk renames
                                                                                                                                                                                                                                    • vipe: insert vi into a pipe, edit the content before it is passed to the next command
                                                                                                                                                                                                                                    • zrun: uncompress the arguments before passing them. Like gzless and friends, but for any command
                                                                                                                                                                                                                                    • Just goes to show the power of the original UNIX philosophy, chaining together a bunch of small useful tools to do really powerful things
                                                                                                                                                                                                                                    • ***
                                                                                                                                                                                                                                      OpenBSD: SNI support added to libtls, httpd in –current
                                                                                                                                                                                                                                      • libtls, LibreSSL’s improved API to replace the OpenSSL standard, now has a set of functions to implement SNI (Server Name Indication)
                                                                                                                                                                                                                                      • Until a few years ago, each different SSL/TLS enabled website required a unique IP address, because typical HTTP Virtual Hosting (differentiating which content to serve based on the Host header in the HTTP request), didn’t work because the request was encrypted.
                                                                                                                                                                                                                                      • Finally the TLS standard was updated to include the hostname of the site the user is requesting in the TLS handshake, so the server can return the corresponding certificate, and multiple TLS enabled websites can be hosted on a single IP address
                                                                                                                                                                                                                                      • The new API includes the ability to provide additional keypairs (via tls_config_add_keypair_{file,mem}())
                                                                                                                                                                                                                                      • And allow the server to determine what servername the client requested viatls_conn_servername()
                                                                                                                                                                                                                                      • This is much easier to use, and therefore safer and less error prone, than the OpenSSL API
                                                                                                                                                                                                                                      • The libtls API is used in a number of OpenBSD tools, including the httpd
                                                                                                                                                                                                                                      • ***
                                                                                                                                                                                                                                        Beastie Bits
                                                                                                                                                                                                                                        • Shawn Webb of HardenedBSD joins the OPNSense Core Team
                                                                                                                                                                                                                                        • How to install 2.11 BSD on a (simulated) PDP11
                                                                                                                                                                                                                                        • OpenBSD Puffy needlepoint pixelart
                                                                                                                                                                                                                                        • PulseAudio has been removed from dports (DragonFly BSD)
                                                                                                                                                                                                                                        • pfSense 2.4 pre-alpha available for testing, based on FreeBSD 11.0
                                                                                                                                                                                                                                        • Call for Testing - Bhyve HDA Sound Emulation
                                                                                                                                                                                                                                        • ***
                                                                                                                                                                                                                                          Feedback/Questions
                                                                                                                                                                                                                                          • Matthew - ZFS Hole Birth
                                                                                                                                                                                                                                          • Hunter - systemd-mount
                                                                                                                                                                                                                                          • Anonymous - Cool’n’quiet
                                                                                                                                                                                                                                          • Nathan - Datacenter
                                                                                                                                                                                                                                          • Chuck - OpenBSD w/DO
                                                                                                                                                                                                                                          • ***
                                                                                                                                                                                                                                            50 min
                                                                                                                                                                                                                                          • 159: Net Scaling Privacy (Flix Style)

                                                                                                                                                                                                                                            This week on BSDNow! We’ve got Netflix + FreeBSD news to discuss, always a crowd pleaser, that plus EuroBSDCon is just around the corner. Stick around for your place

                                                                                                                                                                                                                                            This episode was brought to you by

                                                                                                                                                                                                                                            href="http://www.digitalocean.com/" title="DigitalOcean">
                                                                                                                                                                                                                                            href="http://www.tarsnap.com/bsdnow" title="Tarsnap">

                                                                                                                                                                                                                                            Headlines
                                                                                                                                                                                                                                            Protecting Netflix Viewing Privacy at Scale, with FreeBSD
                                                                                                                                                                                                                                            • This blog post from Netflix tells the story of how Netflix developed in-kernel TLS to speed up delivery of video via HTTPS
                                                                                                                                                                                                                                            • Since the beginning of the Open Connect program we have significantly increased the efficiency of our OCAs - from delivering 8 Gbps of throughput from a single server in 2012 to over 90 Gbps from a single server in 2016. We contribute to this effort on the software side by optimizing every aspect of the software for our unique use case - in particular, focusing on the open source FreeBSD operating system and the NGINX web server that run on the OCAs.

                                                                                                                                                                                                                                              In the modern internet world, we have to focus not only on efficiency, but also security. There are many state-of-the-art security mechanisms in place at Netflix, including Transport Level Security (TLS) encryption of customer information, search queries, and other confidential data. We have always relied on pre-encoded Digital Rights Management (DRM) to secure our video streams. Over the past year, we’ve begun to use Secure HTTP (HTTP over TLS or HTTPS) to encrypt the transport of the video content as well. This helps protect member privacy, particularly when the network is insecure - ensuring that our members are safe from eavesdropping by anyone who might want to record their viewing habits.

                                                                                                                                                                                                                                              The goal is to ensure that your government, ISP, and wifi sniffing neighbour cannot tell which Netflix videos you are watching

                                                                                                                                                                                                                                              Netflix Open Connect serves over 125 million hours of content per day, all around the world. Given our scale, adding the overhead of TLS encryption calculations to our video stream transport had the potential to greatly reduce the efficiency of our global infrastructure.

                                                                                                                                                                                                                                              We evaluated available and applicable ciphers and decided to primarily use the Advanced Encryption Standard (AES) cipher in Galois/Counter Mode (GCM), available starting in TLS 1.2. We chose AES-GCM over the Cipher Block Chaining (CBC) method, which comes at a higher computational cost. The AES-GCM cipher algorithm encrypts and authenticates the message simultaneously - as opposed to AES-CBC, which requires an additional pass over the data to generate keyed-hash message authentication code (HMAC). CBC can still be used as a fallback for clients that cannot support the preferred method.

                                                                                                                                                                                                                                              All revisions of Open Connect Appliances also have Intel CPUs that support AES-NI, the extension to the x86 instruction set designed to improve encryption and decryption performance. We needed to determine the best implementation of AES-GCM with the AES-NI instruction set, so we investigated alternatives to OpenSSL, including BoringSSL and the Intel Intelligent Storage Acceleration Library (ISA-L).

                                                                                                                                                                                                                                              Netflix and NGINX had previously worked together to improve our HTTP client request and response time via the use of sendfile calls to perform a zero-copy data flow from storage (HDD or SSD) to network socket, keeping the data in the kernel memory address space and relieving some of the CPU burden. The Netflix team specifically added the ability to make the sendfile calls asynchronous - further reducing the data path and enabling more simultaneous connections. However, TLS functionality, which requires the data to be passed to the application layer, was incompatible with the sendfile approach.

                                                                                                                                                                                                                                              To retain the benefits of the sendfile model while adding TLS functionality, we designed a hybrid TLS scheme whereby session management stays in the application space, but the bulk encryption is inserted into the sendfile data pipeline in the kernel. This extends sendfile to support encrypting data for TLS/SSL connections.

                                                                                                                                                                                                                                              We tested the BoringSSL and ISA-L AES-GCM implementations with our sendfile improvements against a baseline of OpenSSL (with no sendfile changes), under typical Netflix traffic conditions on three different OCA hardware types. Our changes in both the BoringSSL and ISA-L test situations significantly increased both CPU utilization and bandwidth over baseline - increasing performance by up to 30%, depending on the OCA hardware version. We chose the ISA-L cipher implementation, which had slightly better results. With these improvements in place, we can continue the process of adding TLS to our video streams for clients that support it, without suffering prohibitive performance hits.

                                                                                                                                                                                                                                              • If you would like more detail, check out the papers from AsiaBSDCon 2015 and the updated one from 2016
                                                                                                                                                                                                                                              • ***
                                                                                                                                                                                                                                                OpenBSD on HP Stream 7

                                                                                                                                                                                                                                                Recent events have rocked the mobile computing world to its core. OpenBSD retired the zaurus port, leaving users in desperate need of a new device. And not long before that, Microsoft released the Anniversary Update to Windows 10, but with free space requirements such that it’s nigh impossible to install on cheap 32GB eMMC equipped devices such as the HP Stream series, leaving users searching for a new lightweight operating system. With necessity as both mother and father, the scene is set for a truly epic pairing. OpenBSD on the HP Stream 7.

                                                                                                                                                                                                                                                The HP Stream line is a series of budget computers in a couple form factors. The Stream 11 is a fairly typical netbook. However, the Stream 7 and 8 are tablets. They look like cheap Android devices, but inside the case, they’re real boys, er PCs, with Intel Atom CPUs.

                                                                                                                                                                                                                                                To install OpenBSD on such a device, we need a few parts. Obviously, the tablet itself. There’s a dearth of ports on these things, but there is a micro USB port. Attaching anything useful requires an OTG “on the go” cable that creates a type A port. Attaching more than one useful thing requires a mini hub. And completing the install requires one each USB stick, keyboard, and network adapter.

                                                                                                                                                                                                                                                First, we need to prep the machine to boot from USB. Actually, before doing anything, make sure you have a full charge. It’s going to be battery only from here on out. Plug everything in. Flash drive, keyboard, and network into the hub, hub into the OTG cable, cable into the port on top of the Stream.

                                                                                                                                                                                                                                                Turn on the machine while holding the volume down button. This launches a mini menu from which we can enter the BIOS. There’s a little on screen keyboard in the corner, so this can be done even without a keyboard attached, but the USB keyboard should work. We need to change two settings in the boot section. First, turn off secure boot. Second, switch boot order to prefer USB. Save and exit. The first reboot reveals a confirmation screen checking that we really want to disable secure boot. We must enter a PIN and press enter. Enter the PIN shown on the screen and press enter. And we are go.

                                                                                                                                                                                                                                                • Then boot up OpenBSD from the USB drive

                                                                                                                                                                                                                                                • Ted then works there a number of kernel panics and device driver issues, but after disabling ACPI and IntelDRM, the device boots OpenBSD.

                                                                                                                                                                                                                                                • Of course, there’s no X at this point. And definitely no touch screen. And no internal networking. However, by keeping our USB hub attached, we can drive the console and access the network. At least until the battery is depleted, even if we have no way of knowing how long that will be since we disabled all the ACPI devices, which also means no suspend or resume.

                                                                                                                                                                                                                                                  • With some xorg.conf hacking, he did get Xorg working
                                                                                                                                                                                                                                                  • ***
                                                                                                                                                                                                                                                    DragonflyBSD steps towards base LibreSSL
                                                                                                                                                                                                                                                    • Project: DragonFlyBSD / Switch base to use private LibreSSL libraries
                                                                                                                                                                                                                                                    • DragonFly BSD adopts uses of LibreSSL
                                                                                                                                                                                                                                                    • The number of projects beginning to switch over to LibreSSL is growing and it appears we can now throw DragonFly into that camp.
                                                                                                                                                                                                                                                    • Following something that sounds vaguely familiar (Allan!) DFLY is now creating “private” LibreSSL libraries which are only linked against by base system binaries.
                                                                                                                                                                                                                                                    • For the moment OpenSSL is still built, primarily so that various ports and 3rd party apps can continue to function as before.
                                                                                                                                                                                                                                                    • A NO_OPENSSL option has also been added, but doesn’t really do much (yet), since it’ll still build and install headers / libraries even if set.
                                                                                                                                                                                                                                                    • ***
                                                                                                                                                                                                                                                      OpenBSD g2k16 Hackathon
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Antoine Jacoutot on Binary Patches
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Matthieu Herrb on xenodm
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Vincent Gross on iked(8), armv7 and sys/netinet[6]
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Florian Obser on httpd, networking, acme-client, and more
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Jasper Lievisse Adriaanse on ddb(4) and more
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Christian Weisgerber on gettext progress, RTC work, removing kernel cruft
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Brent Cook on Chromebooks, crypto, and more
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Ted Unangst on doas, signify, code removal
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Marc Espie on package signing evolution
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Adam Wolk on ports, wireless drivers and more
                                                                                                                                                                                                                                                      • g2k16 Hackathon Report: Mike Larkin on vmm + vmd progress
                                                                                                                                                                                                                                                      • ***
                                                                                                                                                                                                                                                        News Roundup
                                                                                                                                                                                                                                                        OpenBSD (with encrypted softraid) on the Chromebook Pixel
                                                                                                                                                                                                                                                        • Looking for a Laptop to make your OpenBSD road-warrior? If so, we have a great blog tutorial on getting OpenBSD setup on the Chromebook Pixel with encrypted softraid!
                                                                                                                                                                                                                                                        • Author Joshua Stein gives us a very verbose look at how to install and dial-in the laptop perfectly. But first for those wondering about the hardware in the pixel:
                                                                                                                                                                                                                                                        • The Chromebook Pixel LS (2015) has an Intel Core i7 processor (Broadwell) at 2.4Ghz, 16Gb of RAM, a 2560x1700 400-nit IPS screen (239ppi), and Intel 802.11ac wireless. It has a Kingston 64Gib flash chip, of which about 54Gib can be used by OpenBSD when dual-booting with a 1Gb Chrome OS partition.

                                                                                                                                                                                                                                                          • Due to this being a chromebook with seaBIOS, some manual key-press trickery will be required to initially get the OpenBSD Installer up and running.
                                                                                                                                                                                                                                                          • From here you’ll want to pay special close attention to the disk partitioning. In particular Joshua will show us how to shrink the existing encrypted /home that ChromeOS uses, keeping the dual-boot intact. This will become important if you ever plan on updating the device.
                                                                                                                                                                                                                                                          • From here, we move back to a more traditional setup, but with the added bonus of doing a soft-raid setup.
                                                                                                                                                                                                                                                          • But the fun isn’t over yet! If you want to make OpenBSD the default boot, that’ll require cracking the lid on the device and removing a special pink write-protect screw. And of course if you want to remove the default splash-screen image, Joshua has you covered as well, although some flashrom magic will be required.
                                                                                                                                                                                                                                                          • At this point you are nearly done. Final details on enabling specific bits of hardware are discussed. Most things work, apart from Audio and Bluetooth as of right now.
                                                                                                                                                                                                                                                          • ***
                                                                                                                                                                                                                                                            doas mastery
                                                                                                                                                                                                                                                            • “doas” mastery - Paging MWL!
                                                                                                                                                                                                                                                            • Our buddy Ted Unangst has written up a great ‘mastery’ guide of the doas command, which can come in handy if you are among the un-initiated in doas land.
                                                                                                                                                                                                                                                            • UNIX systems have two classes of user, the super user and regular users. The super user is super, and everybody else is not. This concentration of power keeps things simple, but also means that often too much power is granted. Usually we only need super user powers to perform one task. We would rather not have such power all the time. Think of the responsibility that would entail! Like the sudo command, doas allows for subdivision of super user privileges, granting them only for specific tasks.

                                                                                                                                                                                                                                                              • He starts with the basic doas.conf setup, which starts with an empty config file
                                                                                                                                                                                                                                                              • The doas config is much like a pf ruleset, the default is to block everything
                                                                                                                                                                                                                                                              • > We add the root rule second because doas evaluates rules in a last match manner. root is in the wheel group, so the first rule will match, and then we need to override that with a second rule. Remember to always start with general rules, then make them more specific.
                                                                                                                                                                                                                                                                ***
                                                                                                                                                                                                                                                                iXsystems
                                                                                                                                                                                                                                                                • iXsystems to host MeetBSD
                                                                                                                                                                                                                                                                • FreeBSD Foundation Welcomes New Board Members
                                                                                                                                                                                                                                                                  • New Board Members
                                                                                                                                                                                                                                                                  • The FreeBSD Foundation has added two new board members
                                                                                                                                                                                                                                                                  • Interview with Kylie Liang
                                                                                                                                                                                                                                                                  • Kylie will focus on representing FreeBSD at conferences and businesses in China
                                                                                                                                                                                                                                                                  • I live in China. There, I can act as a bridge between Chinese companies and the FreeBSD community to help drive FreeBSD adoption. Through my leadership role in the FreeBSD Foundation, I will help promote FreeBSD in China and also represent the Foundation at conferences and events in my region.

                                                                                                                                                                                                                                                                    • Kylie leads the team the ensures FreeBSD runs well on Hyper-V and Azure, including providing commercial support for customers who run FreeBSD or FreeBSD based appliances on the Azure Cloud
                                                                                                                                                                                                                                                                    • I joined Microsoft and started to lead the project called FreeBSD Integration Service to get FreeBSD running well on Hyper-V and Azure. To promote our work and to understand the FreeBSD ecosystem, I started to participate in FreeBSD events where I was inspired by this technical community.

                                                                                                                                                                                                                                                                      • Interview with Philip Paeps
                                                                                                                                                                                                                                                                      • Philip started with FreeBSD in the early 2000s and got his commit bit in 2004
                                                                                                                                                                                                                                                                      • The patches I submitted to make ACPI and input devices work on that laptop led to a src commit bit in 2004. While I haven’t worked on ACPI or input devices since, I have been contributing to different areas of the kernel. Taking up maintainership of some ports I cared about also got me a ports commit bit after some time.

                                                                                                                                                                                                                                                                        • Philip will continue to help run EuroBSDCon, but is also spreading the word about FreeBSD in India and Africa
                                                                                                                                                                                                                                                                        • Primarily, I think I can be useful! I attend (and organize) a number of conferences around the world every year, particularly in regions that have a mostly “stealthy” FreeBSD community. While I clearly don’t need to be on the FreeBSD Foundation board to advocate for FreeBSD, joining as a director will provide an additional asset when working in areas of the world where organizational affiliations are meaningful.

                                                                                                                                                                                                                                                                          • Philip has also developed network drivers and various other bits and pieces, and has extensive experience working with and for hardware vendors and appliance vendors
                                                                                                                                                                                                                                                                          • Despite intending to eventually contribute their code to the FreeBSD Project as open source, many hardware vendors still find it very difficult to engage directly with the FreeBSD development community. The Foundation helps bridge that gap and helps facilitate collaboration between commercial vendors and the FreeBSD community.

                                                                                                                                                                                                                                                                            I hope to make FreeBSD more visible in regions of the world where it is historically under-represented. I expect I will be attending even more conferences and getting myself invited to even more organizations.

                                                                                                                                                                                                                                                                            more, less, and a story of typical Unix fossilization
                                                                                                                                                                                                                                                                            • Chris Siebenmann from the University of Toronto digs into the history of the difference between ‘less’ and ‘more’
                                                                                                                                                                                                                                                                            • In the beginning, by which we mean V7, Unix didn't have a pager at all. That was okay; Unix wasn't very visual in those days, partly because it was still sort of the era of the hard copy terminal. Then along came Berkeley and BSD. People at Berkeley were into CRT terminals, and so BSD Unix gave us things like vi and the first pager program, more (which showed up quite early, in 3BSD, although this isn't as early as vi, which appears in 2BSD). Calling a pager more is a little bit odd but it's a Unix type of name and from the beginning more prompted you with '--More--' at the bottom of the screen.

                                                                                                                                                                                                                                                                              All of the Unix vendors that based their work on BSD Unix (like Sun and DEC) naturally shipped versions of more along with the rest of the BSD programs, and so more spread around the BSD side of things. However, more was by no means the best pager ever; as you might expect, it was actually a bit primitive and lacking in features. So fairly early on Mark Nudelman wrote a pager with somewhat more features and it wound up being called less as somewhat of a joke.

                                                                                                                                                                                                                                                                              In a sane world, Unix vendors would have either replaced their version of more with the clearly superior less or at least updated their version of more to the 4.3 BSD version. Maybe less wouldn't have replaced more immediately, but certainly over say the next five years, when it kept on being better and most people kept preferring it when they had a choice.”

                                                                                                                                                                                                                                                                              • “This entire history has led to a series of vaguely absurd outcomes on various modern Unixes. On Solaris derivatives more is of course the traditional version with source code that can probably trace itself all the way back to 3BSD, carefully updated to SUS compliance. Solaris would never dream of changing what more is, not even if the replacement is better. Why, it might disturb someone.
                                                                                                                                                                                                                                                                              • Oddly, FreeBSD has done the most sensible thing; they've outright replaced more with less. There is a /usr/bin/more but it's the same binary as less and as you can see the more manpage is just the less manpage. OpenBSD has done the same thing but has a specific manpage for more instead of just giving you the less manpage.

                                                                                                                                                                                                                                                                                So, now you can see why I say that less is more, or more, or both, at several levels. less is certainly more than more, and sometimes less literally is more (or rather more is less, to put it the right way around).

                                                                                                                                                                                                                                                                                Beastie Bits
                                                                                                                                                                                                                                                                                • PC-BSD listed in the top 8 'best' alternatives to Windows 10

                                                                                                                                                                                                                                                                                • Creating a quick DNS server with a Rapsberry Pi2 and FreeBSD 11.0-RC1

                                                                                                                                                                                                                                                                                • Dual Boot OpenBSD and Linux + UEFI

                                                                                                                                                                                                                                                                                • DesktopBSD 2.0 various versions available (Gnome, Lumina, KDE, LXDE)

                                                                                                                                                                                                                                                                                • FreeBSD gets new ZFS features including: Compressed ARC and ZFS Allocation Throttle

                                                                                                                                                                                                                                                                                • One Floppy NetBSD Distribution

                                                                                                                                                                                                                                                                                • A Compendium of BUGs

                                                                                                                                                                                                                                                                                • Feedback/Questions
                                                                                                                                                                                                                                                                                  • Galahad - OpenBSD X setup
                                                                                                                                                                                                                                                                                  • Tang - Subtitles
                                                                                                                                                                                                                                                                                  • Ivan - Zpool Options
                                                                                                                                                                                                                                                                                  • Brad - Replication Issue
                                                                                                                                                                                                                                                                                  • MJ - HBA
                                                                                                                                                                                                                                                                                  • ***
                                                                                                                                                                                                                                                                                    1 hr 12 min
                                                                                                                                                                                                                                                                                  • 158: Ham, Radio and Pie (oh my)

                                                                                                                                                                                                                                                                                    This week on BSDNow, we’ll be talking to Diane Bruce about using it for Ham Radio Enthusiasts, the RPi3 and much more! That plus all the latest news from the week,

                                                                                                                                                                                                                                                                                    This episode was brought to you by

                                                                                                                                                                                                                                                                                    href="http://www.digitalocean.com/" title="DigitalOcean">
                                                                                                                                                                                                                                                                                    href="http://www.tarsnap.com/bsdnow" title="Tarsnap">

                                                                                                                                                                                                                                                                                    Headlines
                                                                                                                                                                                                                                                                                    PC-BSD is now TrueOS
                                                                                                                                                                                                                                                                                    • If you’ve been watching this show the past few months, I’ve been dropping little hints about the upcoming rename of PC-BSD -> TrueOS. We’ve made that more official finally, and are asking folks to test out the software before a wider announcement this fall.
                                                                                                                                                                                                                                                                                    • For those wondering about the name change, it’s been something discussed over the past few years at different times. With us beginning to move more aggressively with changes for 11.0 (and eventually 12-CURRENT), the time seemed right to have a fresh start, using it as a spring-board to introduce all the changes in both software, and development / release model.
                                                                                                                                                                                                                                                                                    • I’ll be discussing more about this shift in a talk at MeetBSD2016 (Another reason for you to go), but here’s some of the highlights.
                                                                                                                                                                                                                                                                                    • No longer tied to specific FreeBSD point-releases, TrueOS will instead follow a rolling-release model based upon FreeBSD -CURRENT.
                                                                                                                                                                                                                                                                                    • Special tooling and features (Such as boot-environments) make this a feasible option that we didn’t have as easily in the early days of PC-BSD.
                                                                                                                                                                                                                                                                                    • In addition, TrueOS builds some things different from vanilla FreeBSD. Specifically Matt Macy’s DRM and Linux Compat work, LibreSSL directly in base, built from External Toolchain (No clang in base system package) and much more.
                                                                                                                                                                                                                                                                                    • New tools have have replaced, and are in the process of replacing the legacy PC-BSD control panel as well, which allows remote operation, either via Qt GUI, or WebSockets / REST API’s.
                                                                                                                                                                                                                                                                                    • I’ll be talking about more as things unfold, but for now please feel free to test and let us have feedback while we push towards a more stable release.
                                                                                                                                                                                                                                                                                    • ***
                                                                                                                                                                                                                                                                                      The Voicemail Scammers Never Got Past Our OpenBSD Greylisting
                                                                                                                                                                                                                                                                                      • Peter Hansteen (That grumpy BSD guy) gives us an interesting look at how their OpenBSD grey-listing prevented spam from ever making it to their inbox.
                                                                                                                                                                                                                                                                                      • Specifically it looks like it occurred during Aug 23rd and 24th, with a particularly nasty ransomware payload destined to play havoc with Windows systems.
                                                                                                                                                                                                                                                                                      • Peter then walks us through their three-server mail setup, and how spamd is run in greylisting mode on each.
                                                                                                                                                                                                                                                                                      • The results? Nothing short of perfection:
                                                                                                                                                                                                                                                                                      • > “From those sources we can see that there were a total of 386 hosts that attempted delivery, to a total of 396 host and target email pairs (annotated here in a .csv file
                                                                                                                                                                                                                                                                                        with geographic origin according to whois). The interesting part came when I started looking at the mail server logs to see how many had reached the content filtering or had even been passed on in the direction of users' mailboxes. There were none. The number of messages purportedly from voicemail@ in any of the domains we handle that made it even to the content filtering stage was 0. Zero. Not a single one made it through even to content filtering.”
                                                                                                                                                                                                                                                                                      • Not bad at all! Looks like spam-trap addresses + grey-listing is the way to go for stopping this kind of foolishness. Checkout Peter’s blog post for more details, but perhaps this will encourage you to setup a similar-type system for your business.
                                                                                                                                                                                                                                                                                      • ***
                                                                                                                                                                                                                                                                                        FreeBSD on a tiny system; what’s missing
                                                                                                                                                                                                                                                                                        • Adrian Chadd talks about some of the bits that are missing to make FreeBSD truly useful on small embedded devices
                                                                                                                                                                                                                                                                                        • Some of this stuff can be done now, but requires more work than it should
                                                                                                                                                                                                                                                                                        • “The first is a lack of real service management. FreeBSD doesn't have a service management daemon - the framework assumes that daemons implement their own background and monitoring. It would be much nicer if init or something similar to init could manage services and start/restart them where appropriate.”
                                                                                                                                                                                                                                                                                        • Of course, on a system with 32mb of memory, such a service manager would need to be very light weight
                                                                                                                                                                                                                                                                                        • “maybe I want to only start telnetd or dropbear/sshd whenever a connection comes in. But I'd also like to be able to add services for monitoring, such as dnsmasq and hostapd.”
                                                                                                                                                                                                                                                                                        • telnetd and sshd can be run from inetd, but often depend on special support from the daemon
                                                                                                                                                                                                                                                                                        • “The next is a lack of suitable syslog daemon. Yes, I'd like to be able to log some messages locally - even if it's only a couple hundred kilobytes of messages. I'd also like to be able to push messages to a remote service. Unfortunately the FreeBSD syslog daemon doesn't do log rotation or maximum log file sizes itself - it's done by "newsyslog" which runs out of cron. This isn't any good for real embedded systems with limited storage.”
                                                                                                                                                                                                                                                                                        • Syslog leaves much to be desired, especially in its configuration syntax, and filtering capabilities. Having it be able to detect with log files have grown beyond a reasonable size and fire off newsyslog would be very interesting
                                                                                                                                                                                                                                                                                        • “Then yes, there's a lack of a cron service. It'd be nice to have that integrated into the service management framework so things could be easily added/removed. I may just use cron, but that means cron is also always running which adds memory footprint (~1.3 megabytes) for something that is almost never actually active. When you have 32MB of RAM, that's quite a bit of wasted memory.”
                                                                                                                                                                                                                                                                                        • Systems have come back full circle, to where 32MB and 64MB are amounts of memory people expect to work with, while other people still want the system to perform well with 32 or 64 GB of memory
                                                                                                                                                                                                                                                                                        • It will be interesting to see how this balancing act plays out, trying to make the same codebase useful for extremely small and extremely large systems at the same time, while also running it on your middle of the road laptop.
                                                                                                                                                                                                                                                                                        • ***
                                                                                                                                                                                                                                                                                          So I lost my OpenBSD FDE password
                                                                                                                                                                                                                                                                                          • “The other day I set up a new OpenBSD instance with a nice RAID array, encrypted with Full Disk Encryption. And promptly proceeded to forget part of the passphrase.”
                                                                                                                                                                                                                                                                                          • So they started a little project
                                                                                                                                                                                                                                                                                          • Goal: “We need to extract enough info from the encrypted disk and rebuild enough of the decryption algorithm to be able to rapidly try many passphrases.”
                                                                                                                                                                                                                                                                                          • The post walks through how they reverse engineered the encryption system from the source code and a hexdump of a small encrypted memory disk
                                                                                                                                                                                                                                                                                          • “Now that we know how to extract the data and how to try passphrases against it, it will be trivial to write a bruteforce tool to recover the part of passphrase I forgot.”
                                                                                                                                                                                                                                                                                          • So, rather than having to try every possible passphrase, they only had to try fuzzing around the known keyword that was their passphrase.
                                                                                                                                                                                                                                                                                          • “UPDATE: I found it! After fixing a bug or two in the brute force tool and almost losing hope, it found the right combination of forgotten word and (Italian) misspelling.”
                                                                                                                                                                                                                                                                                          • This work lead to the author recommending that OpenBSD consider strengthening the key derivation algorithm used in its FDE.
                                                                                                                                                                                                                                                                                          • Rather than using a fixed number of rounds (8000 currently), do a small benchmark and determine how much work can be done in a reasonable amount of time
                                                                                                                                                                                                                                                                                          • This is what FreeBSD’s GELI FDE does, targeting ‘over 2 million microseconds’ of work. On my desktop i5-3570 this results in 974842 rounds. The number will likely not be the same twice because of minor variations in how long it will take in microseconds.
                                                                                                                                                                                                                                                                                          • ***
                                                                                                                                                                                                                                                                                            Interview - Diane Bruce - [email protected] / @Dianora_1

                                                                                                                                                                                                                                                                                            Ham Radio, RPi3 and more!

                                                                                                                                                                                                                                                                                            News Roundup
                                                                                                                                                                                                                                                                                            See Me (Michael W. Lucas) in 2016
                                                                                                                                                                                                                                                                                            • Looking for a chance to interact with author Michael W Lucas in meat-space? (That sounds wrong)
                                                                                                                                                                                                                                                                                            • If so, he has posted a list of the up-coming conferences he’ll be speaking at, starting with Ohio LinuxFest Oct 7-8, where he’ll be giving an introduction to ZFS talk.
                                                                                                                                                                                                                                                                                            • Nov 8th, he’ll also be at MUG (Michigan User Group) giving a PAM talk.
                                                                                                                                                                                                                                                                                            • Sadly, no MeetBSD for Michael this year [moment of silence], but if you are able to make it to one of the aforementioned gatherings, be sure to bring your books for autographs. We promise he doesn’t bite. Much.
                                                                                                                                                                                                                                                                                            • ***
                                                                                                                                                                                                                                                                                              It’s hard work printing nothing
                                                                                                                                                                                                                                                                                              • “It all starts with a bug report to LibreSSL that the openssl tool crashes when it tries to print NULL. This bug doesn’t manifest on OpenBSD because libc will convert NULL strings to ”(null)” when printing. However, this behavior is not required, and as observed, it’s not universal. When snprintf silently accepts NULL, that simply leads to propagating the error.”
                                                                                                                                                                                                                                                                                              • “There’s an argument to be made that silly error messages are better than crashing browsers, but stacking layers of sand seems like a poor means of building robust software in the long term.”
                                                                                                                                                                                                                                                                                              • “As soon as development for the next release of OpenBSD restarted, some developers began testing a patch that would remove this crutch from printf.”
                                                                                                                                                                                                                                                                                              • If you’d like to help with this work, see our call for volunteers from 2 weeks ago: opportunity to help: %s audit in mandoc
                                                                                                                                                                                                                                                                                              • Of course, immediately things started to complain. The configure script for talloc does a number of checks (check out the additional interesting observations by TedU here)
                                                                                                                                                                                                                                                                                              • “The test checking that our snprintf function conforms to the C99 standard actually contains, at a minimum, 3 deviations from the standard. It should say “Checking for non-conformant vsnprintf”.”
                                                                                                                                                                                                                                                                                              • “Of course, we’re dealing with NULL pointers, so all bets are off, but I wonder what people who expect printf NULL to work expect out of strlen? Does it return 0? Does it crash?”
                                                                                                                                                                                                                                                                                              • So, talloc decides that the system printf is no good, and it should use its own bundled implementation
                                                                                                                                                                                                                                                                                              • “After all the configure testing, eventually the build will fail, because somebody forgot to actually add the replacement object file to the Makefile.”
                                                                                                                                                                                                                                                                                              • “If the replacement function has never been used, that’s hardly reassuring that it is actually better tested than the version we have in libc.”
                                                                                                                                                                                                                                                                                              • ***
                                                                                                                                                                                                                                                                                                Revisiting WX with OpenBSD 6.0
                                                                                                                                                                                                                                                                                                • OpenBSD 6.0 includes enforcement of WX in user-land
                                                                                                                                                                                                                                                                                                • This prevents an application from being able to map a page of memory with both Write and Execute permissions (protecting mmap(2))
                                                                                                                                                                                                                                                                                                • Once mapped a page of memory should not be able to have permissions escalated (protecting mprotect(2))
                                                                                                                                                                                                                                                                                                • OpenBSD 6.0 enforces the strict WX definition, and not the PaX/grsec “once write never execute” type of policy
                                                                                                                                                                                                                                                                                                • ***
                                                                                                                                                                                                                                                                                                  OpenBSD imports a letsencrypt client into the base system
                                                                                                                                                                                                                                                                                                  • We’ve mentioned letskencrypt before (A native C version of the letsencrypt client, developed by Kristaps).
                                                                                                                                                                                                                                                                                                  • Looks like it’s undergoing a name-change to “acme-client” and has made it’s way into OpenBSD’s base system!
                                                                                                                                                                                                                                                                                                  • This should ensure first-class support for management of Let’s Encrypt certificates, here’s hoping the portable version continues to thrive as well.
                                                                                                                                                                                                                                                                                                  • Congrats to Kristaps!
                                                                                                                                                                                                                                                                                                  • ***
                                                                                                                                                                                                                                                                                                    Beastie Bits
                                                                                                                                                                                                                                                                                                    • OpenBSD: Release Songs 6.0: "Goodbye" -- no more CD releases

                                                                                                                                                                                                                                                                                                    • FreeBSD 101 Hacks

                                                                                                                                                                                                                                                                                                    • LibreSSL enabled by default in HardenedBSD

                                                                                                                                                                                                                                                                                                    • DragonflyBSD removes last bits of 32-bit Linux emulation and has no plans to implement 64-bit linux emulation

                                                                                                                                                                                                                                                                                                    • OpenBSD has sent 32bit sparc to the great bitbucket in the sky

                                                                                                                                                                                                                                                                                                    • Front Range BSD User Group September Meeting

                                                                                                                                                                                                                                                                                                    • KnoxBug TrueOS Wrap-up

                                                                                                                                                                                                                                                                                                    • Feedback/Questions
                                                                                                                                                                                                                                                                                                      • Cody - TrueOS Questions
                                                                                                                                                                                                                                                                                                      • John - FreeNAS Backups
                                                                                                                                                                                                                                                                                                      • Herminio - PowerPC + OpenBSD
                                                                                                                                                                                                                                                                                                      • Dennis - pmake vs bmake
                                                                                                                                                                                                                                                                                                      • Al - Upgrade conflicts
                                                                                                                                                                                                                                                                                                      • ***
                                                                                                                                                                                                                                                                                                        1 hr 50 min

                                                                                                                                                                                                                                                                                                      About BSD Now

                                                                                                                                                                                                                                                                                                      From the publisher's feed

                                                                                                                                                                                                                                                                                                      Created by three guys who love BSD, we cover the latest news and have an extensive series of tutorials, as well as interviews with various people from all areas of the BSD community. It also serves as…

                                                                                                                                                                                                                                                                                                      More shows like BSD Now

                                                                                                                                                                                                                                                                                                      The Changelog: Software Development, Open Source by Changelog Media

                                                                                                                                                                                                                                                                                                      The Changelog: Software Development, Open Source

                                                                                                                                                                                                                                                                                                      286 Listeners

                                                                                                                                                                                                                                                                                                      Security Now (Audio) by TWiT

                                                                                                                                                                                                                                                                                                      Security Now (Audio)

                                                                                                                                                                                                                                                                                                      2,011 Listeners

                                                                                                                                                                                                                                                                                                      MacBreak Weekly (Audio) by TWiT

                                                                                                                                                                                                                                                                                                      MacBreak Weekly (Audio)

                                                                                                                                                                                                                                                                                                      2,018 Listeners

                                                                                                                                                                                                                                                                                                      Accidental Tech Podcast by Marco Arment, Casey Liss, John Siracusa

                                                                                                                                                                                                                                                                                                      Accidental Tech Podcast

                                                                                                                                                                                                                                                                                                      2,144 Listeners

                                                                                                                                                                                                                                                                                                      LINUX Unplugged by Jupiter Broadcasting

                                                                                                                                                                                                                                                                                                      LINUX Unplugged

                                                                                                                                                                                                                                                                                                      272 Listeners

                                                                                                                                                                                                                                                                                                      Risky Business by Risky Business Media

                                                                                                                                                                                                                                                                                                      Risky Business

                                                                                                                                                                                                                                                                                                      374 Listeners

                                                                                                                                                                                                                                                                                                      Late Night Linux by The Late Night Linux Family

                                                                                                                                                                                                                                                                                                      Late Night Linux

                                                                                                                                                                                                                                                                                                      169 Listeners

                                                                                                                                                                                                                                                                                                      Darknet Diaries by Jack Rhysider

                                                                                                                                                                                                                                                                                                      Darknet Diaries

                                                                                                                                                                                                                                                                                                      8,063 Listeners

                                                                                                                                                                                                                                                                                                      Behind the Bastards by Cool Zone Media and iHeartPodcasts

                                                                                                                                                                                                                                                                                                      Behind the Bastards

                                                                                                                                                                                                                                                                                                      15,564 Listeners

                                                                                                                                                                                                                                                                                                      Linux Dev Time by The Late Night Linux Family

                                                                                                                                                                                                                                                                                                      Linux Dev Time

                                                                                                                                                                                                                                                                                                      22 Listeners

                                                                                                                                                                                                                                                                                                      2.5 Admins by The Late Night Linux Family

                                                                                                                                                                                                                                                                                                      2.5 Admins

                                                                                                                                                                                                                                                                                                      98 Listeners

                                                                                                                                                                                                                                                                                                      Linux After Dark by The Late Night Linux Family

                                                                                                                                                                                                                                                                                                      Linux After Dark

                                                                                                                                                                                                                                                                                                      29 Listeners

                                                                                                                                                                                                                                                                                                      This Day in AI Podcast by Michael Sharkey, Chris Sharkey

                                                                                                                                                                                                                                                                                                      This Day in AI Podcast

                                                                                                                                                                                                                                                                                                      221 Listeners

                                                                                                                                                                                                                                                                                                      Linux Matters by Linux Matters

                                                                                                                                                                                                                                                                                                      Linux Matters

                                                                                                                                                                                                                                                                                                      22 Listeners

                                                                                                                                                                                                                                                                                                      Better Offline by Cool Zone Media and iHeartPodcasts

                                                                                                                                                                                                                                                                                                      Better Offline

                                                                                                                                                                                                                                                                                                      608 Listeners