BSD Now

BSD Now

Download on the App Store

All BSD Now episodes

  • 211: It's HAMMER2 Time!

    We explore whether a BSD can replicate Cisco router performance; RETGUARD, OpenBSDs new exploit mitigation technology, Dragonfly’s HAMMER2 filesystem implementation & more!

    This episode was brought to you by

    Headlines
    Can a BSD system replicate the performance of a Cisco router?
    • Short Answer: No, but it might be good enough for what you need
    • Traditionally routers were built with a tightly coupled data plane and control plane. Back in the 80s and 90s the data plane was running in software on commodity CPUs with proprietary software. As the needs and desires for more speeds and feeds grew, the data plane had to be implemented in ASICs and FPGAs with custom memories and TCAMs. While these were still programmable in a sense, they certainly weren't programmable by anyone but a small handful of people who developed the hardware platform. The data plane was often layered, where features not handled by the hardware data plane were punted to a software only data path running on a more general CPU. The performance difference between the two were typically an order or two of magnitude. source

      Except for encryption (e.g. IPsec) or IDS/IPS, the true measure of router performance is packets forwarded per unit time. This is normally expressed as Packets-per-second, or PPS. To 'line-rate' forward on a 1gbps interface, you must be able to forward packets at 1.488 million pps (Mpps). To forward at "line-rate" between 10Gbps interfaces, you must be able to forward at 14.88Mpps.

      Even on large hardware, kernel-forwarding is limited to speeds that top out below 2Mpps. George Neville-Neil and I did a couple papers on this back in 2014/2015. You can read the papers for the results.

      However, once you export the code from the kernel, things start to improve. There are a few open source code bases that show the potential of kernel-bypass networking for building a software-based router. The first of these is netmap-fwd which is the FreeBSD ip_forward() code hosted on top of netmap, a kernel-bypass technology present in FreeBSD (and available for linux). Full-disclosure, netmap-fwd was done at my company, Netgate. netmap-fwd will l3 forward around 5 Mpps per core. slides

      The first of these is netmap-fwd which is the FreeBSD ip_forward() code hosted on top of netmap, a kernel-bypass technology present in FreeBSD (and available for linux). Full-disclosure, netmap-fwd was done at my company, Netgate. (And by "my company" I mean that I co-own it with my spouse.). netmap-fwd will l3 forward around 5 Mpps per core. slides

      Nanako Momiyama of the Keio Univ Tokuda Lab presented on IP Forwarding Fastpath at BSDCan this past May. She got about 5.6Mpps (roughly 10% faster than netmap-fwd) using a similar approach where the ip_foward() function was rewritten as a module for VALE (the netmap-based in-kernel switch). Slides from her previous talk at EuroBSDCon 2016 are available. (Speed at the time was 2.8Mpps.). Also a paper from that effort, if you want to read it. Of note: They were showing around 1.6Mpps even after replacing the in-kernel routing lookup algorithm with DXR. (DXR was written by Luigi Rizzo, who is also the primary author of netmap.)

      Not too long after netmap-fwd was open sourced, Ghandi announced packet-journey, an application based on drivers and libraries and from DPDK. Packet-journey is also an L3 router. The GitHub page for packet-journey lists performance as 21,773.47 mbps (so 21.77Gbps) for 64-byte UDP frames with 50 ACLs and 500,000 routes. Since they're using 64-byte frames, this translates to roughly 32.4Mpps.

      Finally, there is recent work in FreeBSD (which is part of 11.1-RELEASE) that gets performance up to 2x the level of netmap-fwd or the work by Nanako Momiyama. 10 million PPS: Here is a decent introduction.

      • But of course, even as FreeBSD gets up to being able to do 10gbps at line-rate, 40 and 100 gigabits are not uncommon now
      • Even with the fastest modern CPUs, this is very little time to do any kind of meaningful packet processing. At 10Gbps, your total budget per packet, to receive (Rx) the packet, process the packet, and transmit (Tx) the packet is 67.2 ns. Complicating the task is the simple fact that main memory (RAM) is 70 ns away. The simple conclusion here is that, even at 10Gbps, if you have to hit RAM, you can't generate the PPS required for line-rate forwarding.

        • There is some detail about design tradeoffs in the Ryzen architecture and how that might impact using those machines as routers
        • Anyway... those are all interesting, but the natural winner here is FD.io's Vector Packet Processing (VPP). Read this

          VPP is an efficient, flexible open source data plane. It consists of a set of forwarding nodes arranged in a directed graph and a supporting framework. The framework has all the basic data structures, timers, drivers (and interfaces to both DPDK and netmap), a scheduler which allocates the CPU time between the graph nodes, performance and debugging tools, like counters and built-in packet trace. The latter allows you to capture the paths taken by the packets within the graph with high timestamp granularity, giving full insight into the processing on a per-packet level.
          The net result here is that Cisco (again, Cisco) has shown the ability to route packets at 1 Tb/s using VPP on a four socket Purley system

          • There is also much discussion of the future of pfSense, as they transition to using VPP
          • This is a very lengthy write up which deserves a full read, plus there are some comments from other people
          • ***
            RETGUARD, the OpenBSD next level in exploit mitigation, is about to debut

            This year I went to BSDCAN in Ottawa. I spent much of it in the 'hallway track', and had an extended conversation with various people regarding our existing security mitigations and hopes for new ones in the future. I spoke a lot with Todd Mortimer. Apparently I told him that I felt return-address protection was impossible, so a few weeks later he sent a clang diff to address that issue...

            The first diff is for amd64 and i386 only -- in theory RISC architectures can follow this approach soon.
            The mechanism is like a userland 'stackghost' in the function prologue and epilogue. The preamble XOR's the return address at top of stack with the stack pointer value itself. This perturbs by introducing bits from ASLR. The function epilogue undoes the transform immediately before the RET instruction. ROP attack methods are impacted because existing gadgets are transformed to consist of " RET". That pivots the return sequence off the ROP chain in a highly unpredictable and inconvenient fashion.
            The compiler diff handles this for all the C code, but the assembly functions have to be done by hand. I did this work first for amd64, and more recently for i386. I've fixed most of the functions and only a handful of complex ones remain.
            For those who know about polymorphism and pop/jmp or JOP, we believe once standard-RET is solved those concerns become easier to address seperately in the future. In any case a substantial reduction of gadgets is powerful.
            For those worried about introducing worse polymorphism with these "xor; ret" epilogues themselves, the nested gadgets for 64bit and 32bit variations are +1 "xor %esp,(%rsp); ret", +2 "and $0x24,%al; ret" and +3 "and $0xc3,%al; int3". Not bad.
            Over the last two weeks, we have received help and advice to ensure debuggers (gdb, egdb, ddb, lldb) can still handle these transformed callframes. Also in the kernel, we discovered we must use a smaller XOR, because otherwise userland addresses are generated, and cannot rely on SMEP as it is really new feature of the architecture. There were also issues with pthreads and dlsym, which leads to a series of uplifts around __builtin_return_address and DWARF CFI.
            Application of this diff doesn't require anything special, a system can simply be built twice. Or shortcut by building & installing gnu/usr.bin/clang first, then a full build.
            We are at the point where userland and base are fully working without regressions, and the remaining impacts are in a few larger ports which directly access the return address (for a variety of reasons).
            So work needs to continue with handling the RET-addr swizzle in those ports, and then we can move forward.

            • You can find the full message with the diff here
            • ***
              Interview - Ed Maste, Charlie & Siva - @ed_maste, @yzgyyang & @svmhdvn
              • Co-op Students for the FreeBSD Foundation
              • ***
                News Roundup
                Next DFly release will have an initial HAMMER2 implementation

                The next DragonFly release (probably in September some time) will have an initial HAMMER2 implementation. It WILL be considered experimental and won't be an installer option yet. This initial release will only have single-image support operational plus basic features. It will have live dedup (for cp's), compression, fast recovery, snapshot, and boot support out of the gate.

                This first H2 release will not have clustering or multi-volume support, so don't expect those features to work. I may be able to get bulk dedup and basic mirroring operational by release time, but it won't be very efficient. Also, right now, sync operations are fairly expensive and will stall modifying operations to some degree during the flush, and there is no reblocking (yet). The allocator has a 16KB granularity (on HAMMER1 it was 2MB), so for testing purposes it will still work fairly well even without reblocking.
                The design is in a good place. I'm quite happy with how the physical layout turned out. Allocations down to 1KB are supported. The freemap has a 16KB granularity with a linear counter (one counter per 512KB) for packing smaller allocations. INodes are 1KB and can directly embed 512 bytes of file data for files <= 512 bytes, or have four top-level blockrefs for files > 512 bytes. The freemap is also zoned by type for I/O locality.
                The blockrefs are 'fat' at 128 bytes but enormously powerful. That will allow us to ultimately support up to a 512-bit crypto hash and blind dedup using said hash. Not on release, but that's the plan.
                I came up with an excellent solution for directory entries. The 1KB allocation granularity was a bit high but I didn't want to reduce it. However, because blockrefs are now 128 byte entities, and directory entries are hashed just like in H1, I was able to code them such that a directory entry is embedded in the blockref itself and does not require a separate data reference or allocation beyond that. Filenames up to 64 bytes long can be accomodated in the blockref using the check-code area of the blockref. Longer filenames will use an additional data reference hanging off the blockref to accomodate up to 255 char filenames. Of course, a minimum of 1KB will have to be allocated in that case, but filenames are <= 64 bytes in the vast majority of use cases so it just isn't an issue.
                This gives directory entries optimal packing and indexing and is a huge win in terms of performance since blockrefs are arrayed in 16KB and 64KB blocks. In addition, since inodes can embed up to four blockrefs, the directory entries for 'small' directories with <= 4 entries ('.' and '..' don't count) can actually be embedded in the directory inode itself.
                So, generally speaking, the physical layout is in a very happy place. The basics are solid on my test boxes so it's now a matter of implementing as many of the more sophisticated features as I can before release, and continuing to work on the rest after the release.

                Removing Some Code

                This is another update on our effort to re-license the OpenSSL software. Our previous post in March was about the launch of our effort to reach all contributors, with the hope that they would support this change.

                So far, about 40% of the people have responded. For a project that is as old as OpenSSL (including its predecessor, SSLeay, it’s around 20 years) that’s not bad. We’ll be continuing our efforts over the next couple of months to contact everyone.
                Of those people responding, the vast majority have been in favor of the license change – less then a dozen objected. This post describes what we’re doing about those and how we came to our conclusions. The goal is to be very transparent and open with our processes.
                First, we want to mention that we respect their decision. While it is inconvenient to us, we acknowledge their rights to keep their code under the terms that they originally agreed to. We are asking permission to change the license terms, and it is fully within their rights to say no.
                The license website is driven by scripts that are freely available in the license section of our tools repository on GitHub. When we started, we imported every single git commit, looked for anything that resembled an email address, and created tables for each commit, each user we found, and a log that connects users to commits. This did find false positives: sometimes email Message-ID’s showed up, and there were often mentions of folks just as a passing side-comment, or because they were in the context diff. (That script is also in the tools repository, of course.)
                The user table also has columns to record approval or rejection of the license change, and comments. Most of the comments have been supportive, and (a bit surprisingly) only one or two were obscene.
                The whattoremove script finds the users who refused, and all commits they were named in. We then examined each commit – there were 86 in all – and filtered out those that were cherry-picks to other releases. We are planning on only changing the license for the master branch, so the other releases branches aren’t applicable. There were also some obvious false positives. At the end of this step, we had 43 commits to review.
                We then re-read every single commit, looking for what we could safely ignore as not relevant. We found the following:
                Nine of them showed up only because the person was mentioned in a comment.
                Sixteen of them were changes to the OpenBSD configuration data. The OpenSSL team had completely rewritten this, refactoring all BSD configurations into a common hierarchy, and the config stuff changed a great deal for 1.1.0.
                Seven were not copyrightable as because they were minimal changes (e.g., fixing a typo in a comment).
                One was a false positive.
                This left us with 10 commits. Two of them them were about the CryptoDev engine. We are removing that engine, as can be seen in this PR, but we expect to have a replacement soon (for at least Linux and FreeBSD). As for the other commits, we are removing that code, as can be seen in this first PR. and this second PR. Fortunately, none of them are particularly complex.
                Copyright, however, is a complex thing – at times it makes debugging look simple. If there is only one way to write something, then that content isn’t copyrightable. If the work is very small, such as a one-line patch, then it isn’t copyrightable. We aren’t lawyers, and have no wish to become such, but those viewpoints are valid. It is not official legal advice, however.
                For the next step, we hope that we will be able to “put back” the code that we removed. We are looking to the community for help, and encourage you to create the appropriate GitHub pull requests. We ask the community to look at that second PR and provide fixes.
                And finally, we ask everyone to look at the list of authors and see if their name, or the name of anyone they know, is listed. If so please email us.

                deraadt@ moves us to 6.2-beta!

                Theo has just committed the diff that marks the end of the development cycle and the beginning of the testing phase for the upcoming 6.2 release:

                `

                CVSROOT: /cvs

                Module name: src

                Changes by: [email protected] 2017/08/20 10:56:43

                Modified files:

                etc/root : root.mail

                share/mk : sys.mk

                sys/arch/macppc/stand/tbxidata: bsd.tbxi

                sys/conf : newvers.sh

                sys/sys : param.h

                Log message:

                crank to 6.2-beta

                `

                You all know what this means: get to testing! Find whatever hardware you have and install the latest snapshots, stress the upgrade procedure, play your favorite games, build your own code - whatever you use OpenBSD for, try it in the new snaps and report any problems you find. Your testing efforts will help make sure 6.2 is another great release!

                Beastie Bits
                • 64 Hijacked ARMs
                • Smartisan Makes Another Iridium Donation to the OpenBSD Foundation
                • Andrey A. Chernov (ache), long-time FreeBSD core team member and dev, has passed away
                • OpenBSD hacker Mickey Shalayeff has passed away
                • FreeBSD 10.4-BETA1 Available
                • vmadm in action, from getting a dataset to running a jail w/ vnet networking in just a few commands
                • Interview with Patrick Wildt (from t2k17 OpenBSD Hackathon)
                • ***
                  Feedback/Questions
                  • Seth - Switching to tarsnap
                  • Johnny - memcmp
                  • Thomas - Drives and NAS
                  • Ben - Nvidia
                  • David - ZFS performance variations over nfs
                  • ***
                    2 hr 3 min
                  • 210: Your questions, part I

                    In this episode, we take a look at the reimplementation of NetBSD using a Microkernel, check out what makes DHCP faster, and see what high-process count support for DragonflyBSD has to offer, and we answer the questions you’ve always wanted to ask us.

                    This episode was brought to you by

                    Headlines
                    A Reimplementation Of Netbsd Using a Microkernel
                    • Minix author Andy Tanenbaum writes in Part 1 of a-reimplementation-of-netbsd-using-a-microkernel
                    • Based on the MINIX 3 microkernel, we have constructed a system that to the user looks a great deal like NetBSD. It uses pkgsrc, NetBSD headers and libraries, and passes over 80% of the KYUA tests). However, inside, the system is completely different. At the bottom is a small (about 13,000 lines of code) microkernel that handles interrupts, message passing, low-level scheduling, and hardware related details. Nearly all of the actual operating system, including memory management, the file system(s), paging, and all the device drivers run as user-mode processes protected by the MMU. As a consequence, failures or security issues in one component cannot spread to other ones. In some cases a failed component can be replaced automatically and on the fly, while the system is running, and without user processes noticing it. The talk will discuss the history, goals, technology, and status of the project.

                      Research at the Vrije Universiteit has resulted in a reimplementation of NetBSD using a microkernel instead of the traditional monolithic kernel. To the user, the system looks a great deal like NetBSD (it passes over 80% of the KYUA tests). However, inside, the system is completely different. At the bottom is a small (about 13,000 lines of code) microkernel that handles interrupts, message passing, low-level scheduling, and hardware related details. Nearly all of the actual operating system, including memory management, the file system(s), paging, and all the device drivers run as user-mode processes protected by the MMU. As a consequence, failures or security issues in one component cannot spread to other ones. In some cases a failed component can be replaced automatically and on the fly, while the system is running.
                      The latest work has been adding live update, making it possible to upgrade to a new version of the operating system WITHOUT a reboot and without running processes even noticing. No other operating system can do this.
                      The system is built on MINIX 3, a derivative of the original MINIX system, which was intended for education. However, after the original author, Andrew Tanenbaum, received a 2 million euro grant from the Royal Netherlands Academy of Arts and Sciences and a 2.5 million euro grant from the European Research Council, the focus changed to building a highly reliable, secure, fault tolerant operating system, with an emphasis on embedded systems. The code is open source and can be downloaded from www.minix3.org. It runs on the x86 and ARM Cortex V8 (e.g., BeagleBones). Since 2007, the Website has been visited over 3 million times and the bootable image file has been downloaded over 600,000 times. The talk will discuss the history, goals, technology, and status of the project.

                      • Part 2 is also available.
                      • ***
                        Rapid DHCP: Or, how do Macs get on the network so fast?
                        • One of life's minor annoyances is having to wait on my devices to connect to the network after I wake them from sleep. All too often, I'll open the lid on my EeePC netbook, enter a web address, and get the dreaded "This webpage is not available" message because the machine is still working on connecting to my Wi-Fi network. On some occasions, I have to twiddle my thumbs for as long as 10-15 seconds before the network is ready to be used. The frustrating thing is that I know it doesn't have to be this way. I know this because I have a Mac. When I open the lid of my MacBook Pro, it connects to the network nearly instantaneously. In fact, no matter how fast I am, the network comes up before I can even try to load a web page. My curiosity got the better of me, and I set out to investigate how Macs are able to connect to the network so quickly, and how the network connect time in other operating systems could be improved.
                        • I figure there are three main categories of time-consuming activities that occur during network initialization:

                          Link establishment. This is the activity of establishing communication with the network's link layer. In the case of Wi-Fi, the radio must be powered on, the access point detected, and the optional encryption layer (e.g. WPA) established. After link establishment, the device is able to send and receive Ethernet frames on the network.
                          Dynamic Host Configuration Protocol (DHCP). Through DHCP handshaking, the device negotiates an IP address for its use on the local IP network. A DHCP server is responsible for managing the IP addresses available for use on the network.
                          Miscellaneous overhead. The operating system may perform any number of mundane tasks during the process of network initialization, including running scripts, looking up preconfigured network settings in a local database, launching programs, etc.
                          My investigation thus far is primarily concerned with the DHCP phase, although the other two categories would be interesting to study in the future. I set up a packet capture environment with a spare wireless access point, and observed the network activity of a number of devices as they initialized their network connection. For a worst-case scenario, let's look at the network activity captured while an Android tablet is connecting:
                          This tablet, presumably in the interest of "optimization", is initially skipping the DHCP discovery phase and immediately requesting its previous IP address. The only problem is this is a different network, so the DHCP server ignores these requests. After about 4.5 seconds, the tablet stubbornly tries again to request its old IP address. After another 4.5 seconds, it resigns itself to starting from scratch, and performs the DHCP discovery needed to obtain an IP address on the new network.
                          In all fairness, this delay wouldn't be so bad if the device was connecting to the same network as it was previously using. However, notice that the tablet waits a full 1.13 seconds after link establishment to even think about starting the DHCP process. Engineering snappiness usually means finding lots of small opportunities to save a few milliseconds here and there, and someone definitely dropped the ball here.
                          In contrast, let's look at the packet dump from the machine with the lightning-fast network initialization, and see if we can uncover the magic that is happening under the hood:
                          The key to understanding the magic is the first three unicast ARP requests. It looks like Mac OS remembers certain information about not only the last connected network, but the last several networks. In particular, it must at least persist the following tuple for each of these networks:
                          > 1. The Ethernet address of the DHCP server
                          > 2. The IP address of the DHCP server
                          > 3. Its own IP address, as assigned by the DHCP server
                          During network initialization, the Mac transmits carefully crafted unicast ARP requests with this stored information. For each network in its memory, it attempts to send a request to the specific Ethernet address of the DHCP server for that network, in which it asks about the server's IP address, and requests that the server reply to the IP address which the Mac was formerly using on that network. Unless network hosts have been radically shuffled around, at most only one of these ARP requests will result in a response—the request corresponding to the current network, if the current network happens to be one of the remembered networks.
                          This network recognition technique allows the Mac to very rapidly discover if it is connected to a known network. If the network is recognized (and presumably if the Mac knows that the DHCP lease is still active), it immediately and presumptuously configures its IP interface with the address it knows is good for this network. (Well, it does perform a self-ARP for good measure, but doesn't seem to wait more than 13ms for a response.) The DHCP handshaking process begins in the background by sending a DHCP request for its assumed IP address, but the network interface is available for use during the handshaking process. If the network was not recognized, I assume the Mac would know to begin the DHCP discovery phase, instead of sending blind requests for a former IP address as the Galaxy Tab does.
                          The Mac's rapid network initialization can be credited to more than just the network recognition scheme. Judging by the use of ARP (which can be problematic to deal with in user-space) and the unusually regular transmission intervals (a reliable 1.0ms delay between each packet sent), I'm guessing that the Mac's DHCP client system is entirely implemented as tight kernel-mode code. The Mac began the IP interface initialization process a mere 10ms after link establishment, which is far faster than any other device I tested. Android devices such as the Galaxy Tab rely on the user-mode dhclient system (part of the dhcpcd package) dhcpcd program, which no doubt brings a lot of additional overhead such as loading the program, context switching, and perhaps even running scripts.
                          The next step for some daring kernel hacker is to implement a similarly aggressive DHCP client system in the Linux kernel, so that I can enjoy fast sign-on speeds on my Android tablet, Android phone, and Ubuntu netbook. There already exists a minimal DHCP client implementation in the Linux kernel, but it lacks certain features such as configuring the DNS nameservers. Perhaps it wouldn't be too much work to extend this code to support network recognition and interface with a user-mode daemon to handle such auxillary configuration information received via DHCP. If I ever get a few spare cycles, maybe I'll even take a stab at it.

                          • You can also find other ways of optimizing the dhclient program and how it works in the dhclient tutorial on Calomel.org.
                          • ***
                            BSDCam Trip Report

                            Over the decades, FreeBSD development and coordination has shifted from being purely on-line to involving more and more in-person coordination and cooperation. The FreeBSD Foundation sponsors a devsummit right before BSDCan, EuroBSDCon, and AsiaBSDCon, so that developers traveling to the con can leverage their airfare and hammer out some problems. Yes, the Internet is great for coordination, but nothing beats a group of developers spending ten minutes together to sketch on a whiteboard and figuring out exactly how to make something bulletproof.

                            In addition to the coordination efforts, though, conference devsummits are hierarchical. There’s a rigid schedule, with topics decided in advance. Someone leads the session. Sessions can be highly informative, passionate arguments, or anything in between.
                            BSDCam is… a little different. It’s an invaluable part of the FreeBSD ecosystem. However, it’s something that I wouldn’t normally attend.
                            But right now, is not normal. I’m writing a new edition of Absolute FreeBSD. To my astonishment, people have come to rely on this book when planning their deployments and operations. While I find this satisfying, it also increases the pressure on me to get things correct. When I wrote my first FreeBSD book back in 2000, a dozen mailing lists provided authoritative information on FreeBSD development. One person could read every one of those lists. Today, that’s not possible—and the mailing lists are only one narrow aspect of the FreeBSD social system.
                            Don’t get me wrong—it’s pretty easy to find out what people are doing and how the system works. But it’s not that easy to find out what people will be doing and how the system will work. If this book is going to be future-proof, I needed to leave my cozy nest and venture into the wilds of Cambridge, England. Sadly, the BSDCam chair agreed with my logic, so I boarded an aluminum deathtrap—sorry, a “commercial airliner”—and found myself hurtled from Detroit to Heathrow.
                            And one Wednesday morning, I made it to the William Gates building of Cambridge University, consciousness nailed to my body by a thankfully infinite stream of proper British tea.
                            BSDCam attendance is invitation only, and the facilities can only handle fifty folks or so. You need to be actively working on FreeBSD to wrangle an invite. Developers attend from all over the world. Yet, there’s no agenda. Robert Watson is the chair, but he doesn’t decide on the conference topics. He goes around the room and asks everyone to introduce themselves, say what they’re working on, and declare what they want to discuss during the conference. The topics of interest are tallied. The most popular topics get assigned time slots and one of the two big rooms. Folks interested in less popular topics are invited to claim one of the small breakout rooms.
                            Then the real fun begins. I started by eavesdropping in the virtualization workshop. For two hours, people discussed FreeBSD’s virtualization needs, strengths, and weaknesses. What needs help? What should this interface look like? What compatibility is important, and what isn’t? By the end of the session, the couple dozen people had developed a reasonable consensus and, most importantly, some folks had added items to their to-do lists.
                            Repeat for a dozen more topics. I got a good grip on what’s really happening with security mitigation techniques, FreeBSD’s cloud support, TCP/IP improvements, advances in teaching FreeBSD, and more. A BSDCan devsummit presentation on packaging the base system is informative, but eavesdropping on two dozen highly educated engineers arguing about how to nail down the final tidbits needed to make that a real thing is far more educational.
                            To my surprise, I was able to provide useful feedback for some sessions. I speak at a lot of events outside of the FreeBSD world, and was able to share much of what I hear at Linux conferences. A tool that works well for an experienced developer doesn’t necessarily work well for everyone.
                            Every year, I leave BSDCan tired. I left BSDCam entirely exhausted. These intense, focused discussions stretched my brain.
                            But, I have a really good idea where key parts of FreeBSD development are actually headed. This should help future-proof the new Absolute FreeBSD, as much as any computer book can be future-proof.
                            Plus, BSDCam throws the most glorious conference dinner I’ve ever seen.
                            I want to thank Robert Watson for his kind invitation, and the FreeBSD Foundation for helping defray the cost of this trip

                            Interview - The BSDNow Crew
                            • As a kid, what did you dream of to become as an adult?
                            • JT: An Astronaut

                              BR: I wanted to be a private detective, because of all the crime novels that I read back
                              then. I didn’t get far with it. However, I think the structured analysis skills (who did what, when, and such) help me in debugging and sysadmin work.
                              AJ: Didn’t think about it much

                              • How do you manage to stay organized day to day with so much things you're actively doing each day? (Day job, wife/girlfriend, conferences, hobbies, friends, etc.)
                              • JT: Who said I was organized?

                                BR: A lot of stuff in my calendar as reminders, open browser tabs as “to read later” list. A few things like task switching when getting stuck helps. Also, focus on a single goal for the day, even though there will be distractions. Slowly, but steadily chip away at the things you’re working on. Rather than to procrastinate and put things back to review later, get started early with easy things for a big task and then tackle the hard part. Often, things look totally chaotic and unmanageable, until you start working on them.
                                AJ: I barely manage. Lots of Google Calendar reminders, and the entire wall of my office is covered in whiteboard sheet todo lists. I use pinboard.in to deal with finding and organizing bookmarks. Write things down, don’t trust your memory.

                                • What hobbies outside of IT do you have?
                                • JT: I love photography, but I do that Professional part time, so I’m not sure if that counts as a hobby anymore. I guess it’d have to be working in the garage on my cars.

                                  BR: I do Tai Chi to relax once a week in a group, but can also do it alone, pretty much everywhere. Way too much Youtube watching and browsing the web. I did play some games before studying at the university and I’m still proud that I could control it to the bare minimum not to impact my studies. A few “lapses” from time to time, revisiting the old classics since the newer stuff won’t run on my machines anyway. Holiday time is pretty much spent for BSD conferences and events, this is where I can relax and talk with like-minded people from around the world, which is fascinating. Plus, it gets me to various places and countries I never would have dared to visit on my own.
                                  AJ: I play a few video games, and I like to ski, although I don’t go very often as most of my vacation time is spent hanging out with my BSD friends at various conferences

                                  • How do you relax?
                                  • JT: What is this word ‘relax’ and what does it mean?

                                    BR: My Tai Chi plays a big part in it I guess. I really calms you and the constant stream of thoughts for a while. It also gives you better clarity of what’s important in life. Watching movies, sleeping long.
                                    AJ: Usually watching TV or Movies. Although I have taken to doing most of my TV watching on my exercise bike now, but it is still mentally relaxing

                                    • If FreeBSD didn't exist, which BSD flavour would you use? Why?
                                    • JT: I use TrueOS, but if FreeBSD didn’t exist, that project might not either… so… My other choice would be HardenedBSD, but since it’s also based on FreeBSD I’m in the same dillema.

                                      BR: I once installed NetBSD to see what It can do. If FreeBSD wouldn’t exist, I would probably try my luck with it. OpenBSD is also appealing, but I’ve never installed it.
                                      AJ: When I started using FreeBSD in 2000, the only other BSD I had heard of at the time was OpenBSD. If FreeBSD wasn’t around, I don’t think the world would look like it does, so it is hard to speculate.

                                      • If any of the BSD's weren't around and you had to use Linux, which camp would belong to? (Redhat, SUSE, Debian, Ubuntu, Gentoo?)
                                      • JT: I learned Linux in the mid 90s using Slackware, which I used consistently up until the mid 2000s, when I joined the PuppyLinux community and eventually became a developer (FYI, Puppy was/is/can be based on Slackware -- its complicated). So I’d go back to using either Slackware or PuppyLinux.

                                        BR: I tried various Linux distributions until I landed at Debian. I used is pretty extensively as my desktop OS at home, building custom kernels and packages to install them until I discovered FreeBSD. I ran both side by side for a few months for learning until one day I figured out that I had not booted Debian in a while, so I switched completely.
                                        AJ: The first Linux I played with was Slackware, and it is the most BSD like, but the bits of Linux I learned in school were Redhat and so I can somewhat wrap my head around it, although now that they are changing everything to systemd, all of that old knowledge is more harmful than useful.

                                        • Are you still finding yourself in need to use Windows/Mac OS? Why?
                                        • JT: I work part time as a professional Photographer, so I do use Windows for my photography work. While I can do everything I need to do in Linux, it comes down to being pragmatic about my time. What takes me several hours to accomplish in Linux I can accomplish in 20 minutes on Windows.

                                          BR: I was a long time Windows-only user before my Unix days. But back when Vista was about to come out and I needed a new laptop, my choice was basically learning to cope with Vistas awful features or learn MacOS X. I did the latter, it increased my productivity since it’s really a good Unix desktop experience (at least, back then). I only have to use Windows at work from time to time as I manage our Windows Terminal server, which keeps the exposure low enough and I only connect to it to use a certain app not available for the Mac or the BSDs.
                                          AJ: I still use Windows to play games, for a lot of video conferencing, and to produce BSD Now. Some of it could be done on BSD but not as easily. I have promised myself that I will switch to 100% BSD rather than upgrade to Windows 10, so we’ll see how that goes.

                                          • Please describe your home networking setup. Router type, router OS, router hardware, network segmentation, wifi apparatus(es), other devices connected, and anything else that might be interesting about your home network.
                                          • BR: Very simple and boring: Apple Airport Express base station and an AVM FritzBox for DNS, DHCP, and the link to my provider. A long network cable to my desktop machine. That I use less and less often. I just bought an RPI 3 for some home use in the future to replace it. Mostly my brother’s and my Macbook Pro’s are connected, our phones and the iPad of my mother.

                                            AJ: I have a E3-1220 v3 (dual 3.1ghz + HT) with 8 GB of ram, and 4x Intel gigabit server NICs as my router, and it runs vanilla FreeBSD (usually some snapshot of -current). I have 4 different VLANs, Home, Office, DMZ, and Guest WiFi. WiFi is served via a tiny USB powered device I bought in Tokyo years ago, it serves 3 different SSIDs, one for each VLAN except the DMZ. There are ethernet jacks in every room wired for 10 gigabit, although the only machines with 10 gigabit are my main workstation, file server, and some machines in the server rack. There are 3 switches, one for the house (in the laundry room), one for the rack, and one for 10gig stuff. There is a rack in the basement spare bedroom, it has 7 servers in it, mostly storage for live replicas of customer data for my company.

                                            • How do guys manage to get your work done on FreeBSD desktops? What do you do when you need to a Linux or Windows app that isn't ported, or working? I've made several attempts to switch to FreeBSD, but each attempt failed because of tools not being available (e.g. Zoom, Dropbox, TeamViewer, Crashplan) or broken (e.g. VirtualBox).
                                            • BR: I use VIrtualBox for everything that is not natively available or Windows-only. Unfortunately, that means no modern games. I mostly do work in the shell when I’m on FreeBSD and when it has to be a graphical application, then I use Fluxbox as the DE. I want to get work done, not look at fancy eye-candy that get’s boring after a while. Deactivated the same stuff on my mac due to the same reason. I look for alternative software online, but my needs are relatively easy to satisfy as I’m not doing video editing/rendering and such.

                                              AJ: I generally find that I don’t need these apps. I use Firefox, Thunderbird, OpenSSH, Quassel, KomodoEdit, and a few other apps, so my needs are not very demanding. It is annoying when packages are broken, but I usually work around this with boot environments, and being able to just roll back to a version that worked for a few days until the problem is solved. I do still have access to a windows machine for the odd time I need specific VPN software or access to Dell/HP etc out-of-band management tools.

                                              • Which desktop environments are your favorite, and why? For example, I like i3, Xfce, and I'm drawn to Lumina's ethos, but so far always seem to end up back on Xfc because of its ease of use, flexibility, and dashing good looks.
                                              • JT: As a Lumina Desktop developer, I think my preference is obvious. ;) I am also a long

                                                timeOpenBox user, so I have a soft place in my heart for that as well.

                                                BR: I use Fluxbox when I need to work with a lot of windows or an application demands X11. KDE and others are too memory heavy for me and I rarely use even 20% of the features they provide.

                                                AJ: I was a long time KDE user, but I have adopted Lumina. I find it fast, and that it gets out of my way and lets me do what I want. It had some annoyances early on, but I’ve nagged the developers into making it work for me.

                                                • Which command-line shells do you prefer, why, and how (if at all) have you customised the environment or prompt?
                                                • BR: I use zsh, but without all the fancy stuff you can find online. It might make you more productive, yes. But again, I try to keep things simple. I’m slowly learning tmux and want to work more in it in the future. I sometimes look at other BSD people’s laptops and am amazed at what they do with window-management in tmux. My prompt looks like this:

                                                  bcr@Voyager:~> 20:20 17-08-17
                                                  Put this in your .zshrc to get the same result:
                                                  PROMPT='%n@%m:%~>'
                                                  RPROMPT='%T %D'

                                                  AJ: I started using tcsh early on, because it was the shell on the first box I had access to, and because one of the first things I read in “BSD Hacks” was how to enable ‘typo correction”, which made my life a lot better especially on dial up in the early days. My shell prompt looks like this: allan@CA-TOR1-02:/usr/home/allan%

                                                  • What is one thing (or more) missing in FreeBSD you would import from another project or community? Could be tech, process, etc.
                                                  • JT: AUFS from Linux

                                                    BR: Nohup from Illumos where you can detach an already running process and put it in the background. I often forget that and I’m not in tmux when that happens, so I can see myself use that feature a lot.

                                                    AJ: Zones (more complete Jails) from IllumOS

                                                    • how do you manage your time to learn about and work on FreeBSD? Does your work/employment enable what you do, or are your contributions mainly done in private time?
                                                    • JT: These days I’m mostly learning things I need for work, so it just falls into something I’m doing while working on work projects.

                                                      BR: We have a lot of time during the semester holidays to learn on our own, it’s part of the idea of being in a university to keep yourself updated, at least for me. Especially in the fast moving world of IT. I also read a lot in my free time. My interests can shift sometimes, but then I devour everything I can find on the topic. Can be a bit excessive, but has gotten me where I am now and I still need a lot to learn (and want to). Since I work with FreeBSD at work (my owndoing), I can try out many things there.

                                                      AJ: My work means a spend a lot of time working with FreeBSD, but not that much time working ON it. My contributions are mostly done outside of work, but as I own the company I do get more flexibility to take time off for conferences and other FreeBSD related stuff.

                                                      • we know we can bribe Michael W Lucas with gelato (good gelato that is), but what can we use to bribe you guys? Like when I want to have Allan to work on fixing a bug which prevents me from running ZFS on this fancy rock64 board?
                                                      • BR: Desserts of various kinds.

                                                        AJ: I am probably not the right person to look at your rock64 board. Most people in the project have taken to bribing me with chocolate. In general, my todo list is so long, the best way is a trade, you take this task and I’ll take that task.

                                                        • Is your daily mobile device iOS, Android, Windows Mobile, or other? Why?
                                                        • JT: These days I’m using Android on my Blackberry Priv, but until recently I was still a heavy user of Sailfish OS. I would use SailfishOS everyday, if I could find a phone with a keyboard that I could run it on.

                                                          BR: iOS on the iPhone 7 currently. Never used an Android phone, saw it on other people’s devices and what they can do with it (much more). But the infrequent security updates (if any at all) keep me away from it.

                                                          AJ: I have a Google Nexus 6 (Android 7.1). I wanted the ‘pure’ Android experience, and I had been happy with my previous Nexus S. I don’t run a custom OS/ROM or anything because I use the phone to verify that video streams work on an ‘average users device’. I am displeased that support for my device will end soon. I am not sure what device I will get next, but it definitely won’t be an iPhone.

                                                          News Roundup
                                                          Beta Update - Request for (more) Testing
                                                          • https://beta.undeadly.org/ has received an update. The most significant changes include:
                                                          • The site has been given a less antiquated "look". (As the topic icons have been eliminated, we are no longer seeking help with those graphics.)

                                                            The site now uses a moderate amount of semantic HTML5.
                                                            Several bugs in the HTML fragment validator (used for submissions and comments) have been fixed.
                                                            To avoid generating invalid HTML, submission content which fails validation is no longer displayed in submission/comment previews.
                                                            Plain text submissions are converted to HTML in a more useful fashion. (Instead of just converting each EOL to
                                                            , the converter now generates proper paragraphs and interprets two or more consecutive EOLs as indicating a paragraph break.)

                                                            • The redevelopment remains a work-in-progress. Many thanks to those who have contributed!
                                                            • As before, constructive feedback would be appreciated. Of particular interest are reports of bugs in behaviour (for example, in the HTML validator or in authentication) that would preclude the adoption of the current code for the main site.

                                                              High-process-count support added to master

                                                              We've fixed a number of bottlenecks that can develop when the number of user processes runs into the tens of thousands or higher. One thing led to another and I said to myself, "gee, we have a 6-digit PID, might as well make it work to a million!". With the commits made today, master can support at least 900,000 processes with just a kern.maxproc setting in

                                                              /boot/loader.conf, assuming the machine has the memory to handle it.
                                                              And, in fact, as today's machines start to ratchet up there in both memory capacity and core count, with fast storage (NVMe) and fast networking (10GigE and higher), even in consumer boxes, this is actually something that one might want to do. With AMD's threadripper and EPYC chips now out, the Intel<->AMD cpu wars are back on! Boasting up to 32 cores (64 threads) per socket and two sockets on EPYC, terabytes of ram, and motherboards with dual 10GigE built-in, the reality is that these numbers are already achievable in a useful manner.
                                                              In anycase, I've tested these changes on a dual-socket xeon. I can in-fact start 900,000 processes. They don't get a whole lot of cpu and running 'ps' would be painful, but it works and the system is still responsive from the shell with all of that going on.
                                                              xeon126# uptime
                                                              1:42PM up 9 mins, 3 users, load averages: 890407.00, 549381.40, 254199.55
                                                              In fact, judging from the memory use, these minimal test processes only eat around 60KB each. 900,000 of them ate only 55GB on a 128GB machine. So even a million processes is not out of the question, depending on the cpu requirements for those processes. Today's modern machines can be stuffed with enormous amounts of memory.
                                                              Of course, our PIDs are currently limited to 6 digits, so a million is kinda the upper limit in terms of discrete user processes (verses pthreads which are less restricted). I'd rather not go to 7 digits (yet).

                                                              CFT: Driver for generic MS Windows 7/8/10 - compatible USB HID multi-touch touchscreens
                                                              • Following patch [1] adds support for generic MS Windows 7/8/10 - compatible USB HID multi-touch touchscreens via evdev protocol. It is intended to be a native replacement of hid-multitouch.c driver found in Linux distributions and multimedia/webcamd port.
                                                              • Patch is made for 12-CURRENT and most probably can be applied to recent 11-STABLE and 11.1-RELEASE (not tested)
                                                              • How to test"
                                                              • 1. Apply patch [1]
                                                                2. To compile this driver into the kernel, place the following lines
                                                                into your kernel configuration file:
                                                                device wmt
                                                                device usb
                                                                device evdev
                                                                Alternatively, to load the driver as a module at boot time, place the
                                                                following line in loader.conf(5):
                                                                wmt_load="YES"
                                                                3. Install x11-drivers/xf86-input-evdev or
                                                                x11-drivers/xf86-input-libinput port
                                                                4. Tell XOrg to use evdev or libinput driver for the device:
                                                                Section "ServerLayout"
                                                                InputDevice "TouchScreen0" "SendCoreEvents"
                                                                EndSection
                                                                Section "InputDevice"
                                                                Identifier "TouchScreen0"
                                                                Driver "evdev"
                                                                # Driver "libinput"
                                                                Option "Device" "/dev/input/eventXXX"
                                                                EndSection
                                                                • Exact value of "/dev/input/eventXXX" can be obtained with evemu-record utility from devel/evemu.
                                                                • Note1: Currently, driver does not support pens or touchpads.
                                                                • Note2: wmt.ko should be kld-loaded before uhid driver to take precedence over it! Otherwise uhid can be kld-unloaded after loading of wmt.
                                                                • wmt review: https://reviews.freebsd.org/D12017
                                                                • Raw diff: https://reviews.freebsd.org/D12017.diff
                                                                • ***
                                                                  Beastie Bits
                                                                  • BSDMag Programing Languages Infographic
                                                                  • t2k17 Hackathon Report: Bob Beck on buffer cache tweaks, libressl and pledge progress
                                                                  • New FreeBSD Journal
                                                                  • NetBSD machines at Open Source Conference 2017 Kyoto
                                                                  • ***
                                                                    Feedback/Questions
                                                                    • Dan - HDD question
                                                                    • Benjamin - scrub of death
                                                                    • Jason - Router Opinion
                                                                    • Sohrab - Thanks
                                                                    • ***
                                                                      1 hr 58 min
                                                                    • 209: Signals: gotta catch ‘em all

                                                                      We read a trip report about FreeBSD in China, look at how Unix deals with Signals, a stats collector in DragonFlyBSD & much more!

                                                                      This episode was brought to you by

                                                                      Headlines
                                                                      Trip Report: FreeBSD in China at COPU and LinuxCon
                                                                      • This trip report is from Deb Goodkin, the Executive Director of the FreeBSD Foundation. She travelled to China in May 2017 to promote FreeBSD, meet with companies, and participate in discussions around Open Source.
                                                                      • > In May of 2017, we were invited to give a talk about FreeBSD at COPU’s (China Open Source Promotional Unit) Open Source China, Open Source World Summit, which took place June 21-22, in Beijing. This was a tremendous opportunity to talk about the advantages of FreeBSD to the open source leaders and organizations interested in open source. I was honored to represent the Project and Foundation and give the presentation “FreeBSD Advantages and Applications”.
                                                                      • > Since I was already going to be in Beijing, and LinuxCon China was being held right before the COPU event, Microsoft invited me to be part of a women-in-tech panel they were sponsoring. There were six of us on the panel including two from Microsoft, one from the Linux Foundation, one from Accenture of China, and one from Women Who Code. Two of us spoke in English, with everyone else speaking Chinese. It was disappointing that we didn’t have translators, because I would have loved hearing everyone’s answers. We had excellent questions from the audience at the end. I also had a chance to talk with a journalist from Beijing, where I emphasized how contributing to an open source project, like FreeBSD, is a wonderful way to get experience to boost your resume for a job.
                                                                      • > The first day of LinuxCon also happened to be FreeBSD Day. I had my posters with me and was thrilled to have the Honorary Chairman of COPU (also known as the “Father of Open Source in China”) hold one up for a photo op. Unfortunately, I haven’t been able to get a copy of that photo for proof (I’m still working on it!). We spent a long time discussing the strengths of FreeBSD. He believes there are many applications in China that could benefit from FreeBSD, especially for embedded devices, university research, and open source education. We had more time throughout the week to discuss FreeBSD in more detail.
                                                                      • > Since I was at LinuxCon, I had a chance to meet with people from the Linux Foundation, other open source projects, and some of our donors. With LinuxCon changing its name to Open Source Summit, I discussed how important it is to include minority voices like ours to contribute to improving the open source ecosystem. The people I talked to within the Linux Foundation agreed and suggested that we get someone from the Project to give a talk at the Open Source Summit in Prague this October. Jim Zemlin, the Linux Foundation Executive Director, suggested having a BSD track at the summits. We did miss the call for proposals for that conference, but we need to get people to consider submitting proposals for the Open Source Summits in 2018.
                                                                      • > I talked to a CTO from a company that donates to us and he brought up his belief that FreeBSD is much easier to get started on as a contributor. He talked about the steep path in Linux to getting contributions accepted due to having over 10,000 developers and the hierarchy of decision makers, from Linus to his main lieutenants to the layers beneath him. It can take 6 months to get your changes in!
                                                                      • > On Tuesday, Kylie and I met with a representative from Huawei, who we’ve been meeting over the phone with over the past few months. Huawei has a FreeBSD contributor and is looking to add more. We were thrilled to hear they decided to donate this year. We look forward to helping them get up to speed with FreeBSD and collaborate with the Project.
                                                                      • > Wednesday marked the beginning of COPU and the reason I flew all the way to Beijing! We started the summit with having a group photo of all the speakers:The honorary chairman, Professor Lu in the front middle.
                                                                      • > My presentation was called “FreeBSD Advantages and Applications”. A lot of the material came from Foundation Board President, George-Neville-Neil’s presentation, “FreeBSD is not a Linux Distribution”, which is a wonderful introduction to FreeBSD and includes the history of FreeBSD, who uses it and why, and which features stand out. My presentation went well, with Professor Lu and others engaged through the translators. Afterwards, I was invited to a VIP dinner, which I was thrilled about.
                                                                      • > The only hitch was that Kylie and I were running a FreeBSD meetup that evening, and both were important! Beijing during rush hour is crazy, even trying to go only a couple of miles is challenging. We made plans that I would go to the meetup and give the same presentation, and then head back to the dinner. Amazingly, it worked out.
                                                                      • Check out the rest of her trip report and stay tuned for more news from the region as this is one of the focus areas of the Foundation.
                                                                      • ***
                                                                        Unix: Dealing with signals

                                                                        Signals on Unix systems are critical to the way processes live and die. This article looks at how they're generated, how they work, and how processes receive or block them

                                                                        On Unix systems, there are several ways to send signals to processes—with a kill command, with a keyboard sequence (like control-C), or through a program
                                                                        Signals are also generated by hardware exceptions such as segmentation faults and illegal instructions, timers and child process termination.
                                                                        But how do you know what signals a process will react to? After all, what a process is programmed to do and able to ignore is another issue.
                                                                        Fortunately, the /proc file system makes information about how processes handle signals (and which they block or ignore) accessible with commands like the one shown below. In this command, we’re looking at information related to the login shell for the current user, the "$$" representing the current process.

                                                                        • On FreeBSD, you can use procstat -i PID to get that and even more information, and easier to digest form
                                                                        • P if signal is pending in the global process queue
                                                                          I if signal delivery disposition is SIGIGN
                                                                          C if signal delivery is to catch it

                                                                          Catching a signal requires that a signal handling function exists in the process to handle a given signal. The SIGKILL (9) and SIGSTOP (#) signals cannot be ignored or caught. For example, if you wanted to tell the kernel that ctrl-C's are to be ignored, you would include something like this in your source code:

                                                                          signal(SIGINT, SIG_IGN);
                                                                          To ensure that the default action for a signal is taken, you would do something like this instead:
                                                                          signal(SIGSEGV, SIG_DFL);

                                                                          • The article then shows some ways to send signals from the command line, for example to send SIGHUP to a process with pid 1234:
                                                                          • kill -HUP 1234
                                                                          • You can get a list of the different signals by running
                                                                          • kill -l
                                                                            On Unix systems, signals are used to send all kinds of information to running processes, and they come from user commands, other processes, and the kernel itself. Through /proc, information about how processes are handling signals is now easily accessible and, with just a little manipulation of the data, easy to understand.
                                                                            ***
                                                                            links owned by NGZ erroneously marked as on loan
                                                                            • NGZ (Non-Global Zone), is IllumOS speak for their equivalent to a jail
                                                                            • > As reported by user brianewell in smartos-live#737, NGZ ip tunnels stopped persisting across zone reboot. This behavior appeared in the 20170202 PI and was not present in previous releases. After much spelunking I determined that this was caused by a regression introduced in commit 33df115 (part of the OS-5363 work). The regression was a one-line change to link_activate() which marks NGZ links as on loan when they are in fact not loaned because the NGZ created and owns the link.
                                                                            • “On loan” means the interface belongs to the host (GZ, Global Zone), and has been loaned to the NGZ (Jail)
                                                                            • This regression was easy to introduce because of the subtle nature of this code and lack of comments. I'm going to remove the regressive line, add clarifying comments, and also add some asserts.

                                                                              The following is a detailed analysis of the issue, how I debugged it, and why my one-line change caused the regression:
                                                                              To start I verified that PI 20170119 work as expected:
                                                                              booted 20170119
                                                                              created iptun (named v4_sys76) inside of a native NGZ (names sos-zone)
                                                                              performed a reboot of sos-zone
                                                                              zlogin to sos-zone and verify iptun still exists after reboot
                                                                              Then I booted the GZ into PI 20170202 and verified the iptun did not show up
                                                                              booted 20170202
                                                                              started sos-zone
                                                                              zlogin and verified the iptun was missing
                                                                              At this point I thought I would recreate the iptun and see if I could monitor the zone halt/boot process for the culprit, but instead I received an error from dladm: "object already exists".
                                                                              I didn't expect this. So I used mdb to inspect the dlmgmtd state. Sure enough the iptun exists in dlmgmtd.
                                                                              Okay, so if the link already exists, why doesn't it show up (in either the GZ or the NGZ)?
                                                                              If a link is not marked as active then it won't show up when you query dladm. When booting the zone on 20170119 the ll_flags for the iptun contained the value 0x3. So the problem is the link is not marked as active on the 20170202 PI.
                                                                              The link_activate() function is responsible for marking a link as active. I used dtrace to verify this function was called on the 20170202 PI and that the dlmgmt_link_t had the correct ll_flags value.
                                                                              So the iptun link structure has the correct ll_flags when link_activate() returns but when I inspect the same structure with mdb afterwards the value has changed.
                                                                              Sometime after link_activate() completes some other process changed the ll_flags value. My next question was: where is link_activate() called and what comes after it that might affect the ll_flags? I did another trace and got this stack.
                                                                              The dlmgmt_upid() function calls dlmgmt_write_db_entry() after link_activate() and that can change the flags. But dtrace proved the ll_flags value was still 0x3 after returning from this function.
                                                                              With no obvious questions left I then asked cscope to show me all places where ll_flags is modified. As I walked through the list I used dtrace to eliminate candidates one at a time -- until I reached dlmgmt_destroy_common(). I would not have expected this function to show up during zone boot but sure enough it was being called somehow, and by someone. Who?
                                                                              Since there is no easy way to track door calls it was at this point I decided to go nuclear and use the dtrace stop action to stop dlmgmtd when it hits dlmgmt_destroy_common(). Then I used mdb -k to inspect the door info for the dlmgmtd threads and look for my culprit.
                                                                              The culprit is do_up_iptun() caused by the dladm up-iptun call. Using ptree I then realized this was happening as part of the zone boot under the network/iptun svc startup. At this point it was a matter of doing a zlogin to sos-zone and running truss on dladm up-iptun to find the real reason why dladm_destroy_datalink_id() is called.
                                                                              So the link is marked as inactive because dladm_getsnap_conf() fails with DLADM_STATUS_DENIED which is mapped to EACCESS. Looking at the dladm_getsnap_conf() code I see the following

                                                                              • “The caller is in a non-global zone and the persistent configuration belongs to the global zone.”
                                                                              • What this is saying is that if a link is marked "on loan" (meaning it's technically owned/created by the GZ but assigned/loaned to the NGZ) and the zone calling dladm_getsnap_conf() is an NGZ then return EACCESS because the configuration of the link is up to the GZ, not the NGZ. This code is correct and should be enforced, but why is it tripping in PI 20170202 and not 20170119? It comes back to my earlier observation that in the 20170202 PI we marked the iptun as "on loan" but not in the older one. Why?

                                                                                Well as it turns out while fixing OS-5363 I fixed what I thought was a bug in link_activate()
                                                                                When I first read this code it was my understanding that anytime we added a link to a zone's datalink list, by calling zone_add_datalink(), that link was then considered "on loan". My understanding was incorrect. The link_activate() code has a subtleness that eluded me. There are two cases in link_activate():

                                                                                1. The link is under an NGZ's datalink list but it's ll_linkid doesn't reflect that (e.g., the link is found under zoneid 3 but ll_linkid is 0). In this case the link is owned by the GZ but is being loaned to an NGZ and the link state should be updated accordingly. We get in this situation when dlmgmtd is restated for some reason (it must resync it's in-memory state with the state of the system).
                                                                                2. The link is NOT under any NGZ's (zone_check_datalink() is only concerned with NGZs) datalink list but its ll_zoneid holds the value of an NGZ. This indicates that the link is owned by an NGZ but for whatever reason is not currently under the NGZ's datalink list (e.g., because we are booting the zone and we now need to assign the link to its list).
                                                                                3. So the fix is to revert that one line change as well as add some clarifying comments and also some asserts to prevent further confusion in the future.
                                                                                4. A nice breakdown by Ryan Zezeski of how he accidently introduced a regression, and how he tracked it down using dtrace and mdb
                                                                                5. ***
                                                                                  New experimental statistics collector in master

                                                                                  Master now has an in-kernel statistics collector which is enabled by default, and a (still primitive) user land program to access it. This recorder samples the state of the machine once every 10 seconds and records it in a large FIFO, all in-kernel. The FIFO typically contains 8192 entries, or around the last 23 hours worth of data.

                                                                                  Statistics recorded include current load, user/sys/idle cpu use, swap use, VM fault rate, VM memory statistics, and counters for syscalls, path lookups, and various interrupt types. A few more useful counters will probably be added... I'd like to tie cpu temperature, fork rate, and exec rate in at some point, as well as network and disk traffic.
                                                                                  The statistics gathering takes essentially no real overhead and is always on, so any user at the spur of the moment with no prior intent can query the last 23 hours worth of data.
                                                                                  There is a user frontend to the data called 'kcollect' (its tied into the buildworld now). Currently still primitive. Ultimately my intention is to integrate it with a dbm database for long-term statistical data retention (if desired) using an occasional (like once-an-hour) cron-job to soak up anything new, with plenty of wiggle room due to the amount of time the kernel keeps itself. This is better and less invasive than having a userland statistics gathering script running every few minutes from cron and has the advantage of giving you a lot of data on the spur of the moment without having to ask for it before-hand.
                                                                                  If you have gnuplot installed (pkg install gnuplot), kcollect can generate some useful graphs based on the in-kernel data. Well, it will be boring if the machine isn't doing anything :-). There are options to use gnuplot to generate a plot window in X or a .jpg or .png file, and other options to set the width and height and such. At the moment the gnuplot output uses a subset of statically defined fields to plot but ultimately the field list it uses will be specifiable.

                                                                                  • Sample image generated during a synth run
                                                                                  • News Roundup
                                                                                    openbsd changes of note 626
                                                                                    • Hackerthon is imminent.
                                                                                    • There are two signals one can receive after accessing invalid memory, SIGBUS and SIGSEGV. Nobody seems to know what the difference is or should be, although some theories have been unearthed. Make some attempt to be slightly more consistent and predictable in OpenBSD.
                                                                                    • Introduces jiffies in an effort to appease our penguin oppressors.
                                                                                    • Clarify that IP.OF.UPSTREAM.RESOLVER is not actually the hostname of a server you can use.
                                                                                    • Switch acpibat to use _BIX before _BIF, which means you might see discharge cycle counts, too.
                                                                                    • Assorted clang compatibility. clang uses -Oz to mean optimize for size and -Os for something else, so make gcc accept -Oz so all makefiles can be the same. Adjust some hardlinks. Make sure we build gcc with gcc.
                                                                                    • The SSL_check_private_key function is a lie.
                                                                                    • Switch the amd64 and i386 compiler to clang and see what happens.
                                                                                    • We are moving towards using wscons (wstpad) as the driver for touchpads.
                                                                                    • Dancing with the stars, er, NET_LOCK().
                                                                                    • clang emits lots of warnings. Fix some of them. Turn off a bunch of clang builtins because we have a strong preference that code use our libc versions. Some other changes because clang is not gcc.
                                                                                    • Among other curiosities, static variables in the special .openbsd.randomdata are sometimes assumed to be all zero, leading the clang optimizer to eliminate reads of such variables.
                                                                                    • Some more pledge rules for sed. If the script doesn’t require opening new files, don’t let it.
                                                                                    • Backport a bajillion fixes to stable. Release errata.
                                                                                    • RFC 1885 was obsoleted nearly 20 years ago by RFC 2463 which was obsoleted over 10 years ago by RFC 4443. We are probably not going back.
                                                                                    • Update libexpat to 2.2.3.
                                                                                    • vmm: support more than 3855MB guest memory.
                                                                                    • Merge libdrm 2.4.82.
                                                                                    • Disable SSE optimizations on i386/amd64 for SlowBcopy. It is supposed to be slow. Prevents crashes when talking to memory mapped video memory in a hypervisor.
                                                                                    • The $25 “FREEDOM Laptop!”

                                                                                      Time to get back to the original intent of this blog – talking about my paranoid obsession with information security! So break out your tinfoil hats my friends because this will be a fun ride. I’m looking for the most open source / freedom respecting portable computing experience I can possibly find and I’m going to document my work in real-time so you will get to experience the ups (and possibly the downs) of that path through the universe. With that said, let’s get rolling.

                                                                                      When I built my OpenBSD router using the APU2 board, I discovered that there are some amd64 systems that use open source BIOS. This one used Coreboot and after some investigation I discovered that there was an even more paranoid open source BIOS called Libreboot out there. That started to feel like it might scratch my itch.

                                                                                      Well, after playing around with some lower-powered systems like my APU2 board, my Thinkpad x230 and my SPARC64 boxes, I thought, if it runs amd64 code and I can run an open source operating system on it, the thing should be powerful enough for me to do most (if not all) of what I need it to do. At this point, I started looking for a viable machine. From a performance perspective, it looked like the Thinkpad x200, T400, T500 and W500 were all viable candidates. After paying attention on eBay for a while, I saw something that was either going to be a sweet deal, or a throwaway piece of garbage!
                                                                                      I found a listing for a Thinkpad T500 that said it didn’t come with a power adapter and was 100% untested. From looking at the photos, it seemed like there was nothing that had been molested about it. Obviously, nobody was jumping on something this risky so I thought, “what the heck” and dropped a bit at the opening price of $24.99. Well, guess what. I won the auction. Now to see what I got.
                                                                                      When the laptop showed up, I discovered it was minus its hard drive (but the outside plastic cover was still in place). I plugged in my x230’s power adapter and hit the button. I got lights and was dropped to the BIOS screen. To my eternal joy, I discovered that the machine I had purchased for $25 was 100% functional and included the T9400 2.54 GHz Core 2 Duo CPU and the 1680×1050 display panel. W00t!
                                                                                      First things first, I need to get this machine a hard drive and get the RAM upgraded from the 2GB that it showed up with to 8GB. Good news is that these two purchases only totaled $50 for the pair. An aftermarket 9-cell replacement battery was another $20. Throw in a supported WiFi card that doesn’t require a non-free blob from Libreboot at $5.99 off of eBay and $5 for a hard drive caddy and I’m looking at about $65 in additional parts bringing the total cost of the laptop, fully loaded up at just over $100. Not bad at all…
                                                                                      Once all of the parts arrived and were installed, now for the fun part. Disassembling the entire thing down to the motherboard so we can re-flash the BIOS with Libreboot. The guide looks particularly challenging for this but hey, I have a nice set of screwdrivers from iFixit and a remarkable lack of fear when it comes to disassembling things. Should be fun!
                                                                                      Well, fun didn’t even come close. I wish I had shot some pictures along the way because at one point I had a heap of parts in one corner of my “workbench” (the dining room table) and just the bare motherboard, minus the CPU sitting in front of me. With the help of a clip and a bunch of whoops wires (patch cables), I connected my Beaglebone Black to the BIOS chip on the bare motherboard and attempted to read the chip. #fail
                                                                                      I figured out after doing some more digging that you need to use the connector on the left side of the BBB if you hold it with the power connector facing away from you. In addition, you should probably read the entire process through instead of stopping at the exciting pinout connector diagram because I missed the bit about the 3.3v power supply need to have ground connected to pin 2 of the BIOS chip.
                                                                                      Speaking of that infamous 3.3v power supply, I managed to bend a paperclip into a U shape and jam it into the connector of an old ATX power supply I had in a closet and source power from that. I felt like MacGyver for that one!
                                                                                      I was able to successfully read the original Thinkpad BIOS and then flash the Libreboot + Grub2 VESA framebuffer image onto the laptop! I gulped loudly and started the reassembly process. Other than having some cable routing difficulties because the replacement WiFi card didn’t have a 5Ghz antenna, it all went back together. Now for the moment of truth! I hit the power button and everything worked!!!
                                                                                      At this point I happily scurried to download the latest snapshot of OpenBSD – current and install it. Well, things got a little weird here. Looks like I have to use GRUB to boot this machine now and GRUB won’t boot an OpenBSD machine with Full Disk Encryption. That was a bit of a bummer for me. I tilted against that windmill for several days and then finally admitted defeat. So now what to do? Install Arch?
                                                                                      Well, here’s where I think the crazy caught up to me. I decided to be an utter sell out and install Ubuntu Gnome Edition 17.04 (since that will be the default DE going forward) with full disk encryption. I figured I could have fun playing around in a foreign land and try to harden the heck out of that operating system. I called Ubuntu “grandma’s Linux” because a friend of mine installed it on his mom’s laptop for her but I figured what the heck – let’s see how the other half live!
                                                                                      At this point, while I didn’t have what I originally set out to do – build a laptop with Libreboot and OpenBSD, I did have a nice compromise that is as well hardened as I can possibly make it and very functional in terms of being able to do what I need to do on a day to day basis. Do I wish it was more portable? Of course. This thing is like a six or seven pounder. However, I feel much more secure in knowing that the vast majority of the code running on this machine is open source and has all the eyes of the community on it, versus something that comes from a vendor that we cannot inspect. My hope is that someone with the talent (unfortunately I lack those skills) takes an interest in getting FDE working with Libreboot on OpenBSD and I will most happily nuke and repave this “ancient of days” machine to run that!

                                                                                      FreeBSD Programmers Report Ryzen SMT Bug That Hangs Or Resets Machines

                                                                                      It's starting to look like there's an inherent bug with AMD's Zen-based chips that is causing issues on Unix-based operating systems, with both Linux and FreeBSD confirmed. The bug doesn't just affect Ryzen desktop chips, but also AMD's enterprise EPYC chips. It seems safe to assume that Threadripper will bundle it in, as well.

                                                                                      It's not entirely clear what is causing the issue, but it's related to the CPU being maxed out in operations, thus causing data to get shifted around in memory, ultimately resulting in unstable software. If the bug is exercised a certain way, it can even cause machines to reset.
                                                                                      The revelation about the issue on FreeBSD was posted to the official repository, where the issue is said to happen when threads can lock up, and then cause the system to become unstable. Getting rid of the issue seems as simple as disabling SMT, but that would then negate the benefits provided by having so many threads at-the-ready.
                                                                                      On the Linux side of the Unix fence, Phoronix reports on similar issues, where stressing Zen chips with intensive benchmarks can cause one segmentation fault after another. The issue is so profound, that Phoronix Test Suite developer Michael Larabel introduced a special test that can be run to act as a bit of a proof-of-concept. To test another way, PTS can be run with this command:
                                                                                      PTS_CONCURRENT_TEST_RUNS=4 TOTAL_LOOP_TIME=60 phoronix-test-suite stress-run build-linux-kernel build-php build-apache build-imagemagick
                                                                                      Running this command will compile four different software projects at once, over and over, for an hour. Before long, segfaults should begin to appear (as seen in the shot above).
                                                                                      It's not entirely clear if both sets of issues here are related, but seeing as both involve stressing the CPU to its limit, it seems likely. Whether or not this could be patched on a kernel or EFI level is something yet to be seen.

                                                                                      TrueOS - UNSTABLE update: 8/7/17
                                                                                      • A new UNSTABLE update for TrueOS is available! Released regularly, UNSTABLE updates are the full “rolling release” of TrueOS. UNSTABLE includes experimental features, bugfixes, and other CURRENT FreeBSD work. It is meant to be used by those users interested in using the latest TrueOS and FreeBSD developments to help test and improve these projects.

                                                                                      • WARNING: UNSTABLE updates are released primarily for TrueOS and FreeBSD testing/experimentation purposes. Update and run UNSTABLE “at your own risk”.

                                                                                        Note: There was a CDN issue over the weekend that caused issues for early updaters. Everything appears to be resolved and the update is fully available again. If you encountered instability or package issues from updating on 8/6 or 8/5, roll back to a previous boot environment and run the update again.

                                                                                      • Changes:

                                                                                        • UNSTABLE .iso and .img files beginning with TrueOS-2017-08-3-x64 will be available to download from http://download.trueos.org/unstable/amd64/. Due to CDN issues, these are not quite available, look for them later today or tomorrow (8/8/17). This update resyncs all ports with FreeBSD as of 8.1.2017. This includes: New/updated FreeBSD Kernel and World & New DRM (Direct Rendering Manager) next.
                                                                                        • Experimental patch for libhyve-remote: (From htps://github.com/trueos/freebsd/commit/a67a73e49538448629ea27, thanks araujobsd)
                                                                                        • The libhyve-remote aims to abstract functionalities from other third party libraries like libvncserver, freerdp, and spice to be used in hypervisor implementation. With a basic data structure it is easy to implement any remote desktop protocol without digging into the protocol specification or third part libraries – check some of our examples.We don’t statically link any third party library, instead we use a dynamic linker and load only the functionality necessary to launch the service.Our target is to abstract functionalities from libvncserver, freerdp and spice. Right now, libhyve-remote only supports libvncserver. It is possible to launch a VNC server with different screen resolution as well as with authentication.With this patch we implement support for bhyve to use libhyve-remote that basically abstract some functionalities from libvncserver. We can: Enable wait state, Enable authentication, Enable different resolutions< Have a better compression. Also, we add a new -s flag for vncserver, if the libhyve-remote library is not present in the system, we fallback to bhyve RFB implementation. For example:

                                                                                          -s 2,fbuf,tcp=0.0.0.0:5937,w=800,h=600,password=1234567,vncserver,wait

                                                                                          • New SysAdm Client pages under the System Management category:
                                                                                            • System Control: This is an interface to browse all the sysctl’s on the system.
                                                                                            • Devices: This lists all known information about devices on the designated system.
                                                                                            • Lumina Theming: Lumina is testing new theming functionality! By default (in UNSTABLE), a heavily customized version of the Qt5ct engine is included and enabled. This is intended to allow users to quickly adjust themes/icon packs without needing to log out and back in. This also fixes a bug in Insight with different icons loading for the side and primary windows. Look for more information about this new functionality to be discussed on the Lumina Website.
                                                                                            • Update to Iridium Web Browser: Iridium is a Chromium based browser built with user privacy and security as the primary concern, but still maintaining the speed and usability of Chromium. It is now up to date – give it a try and let us know what you think (search for iridium-browser in AppCafe).
                                                                                            • Beastie Bits
                                                                                              • GhostBSD 11.1 Alpha1 is ready
                                                                                              • A Special CharmBUG announcement
                                                                                              • Byhve Obfuscation Part 1 of Many
                                                                                              • New BSDMag is out
                                                                                              • git: kernel - Lower VM_MAX_USER_ADDRESS to finalize work-around for Ryzen bug
                                                                                              • Ken Thompson corrects one of his biggest regrets
                                                                                              • ***
                                                                                                Feedback/Questions
                                                                                                • Hans - zxfer
                                                                                                • Harza - Google Summer of Code
                                                                                                • tadslot - Microphones, Proprietary software, and feedback
                                                                                                • Florian - ZFS/Jail
                                                                                                  • Modifying a ZFS root system to a beadm layout
                                                                                                  • ***
                                                                                                    1 hr 33 min
                                                                                                  • 208: Faces of Open Source

                                                                                                    DragonflyBSD 4.8.1 has been released, we explore how the X11 clipboard works, and look at OpenBSD gaming resources.

                                                                                                    This episode was brought to you by

                                                                                                    Headlines
                                                                                                    LLVM, Clang and compiler-rt support enhancements

                                                                                                    In the last month I started with upstream of the code for sanitizers: the common layer and ubsan. I worked also on the elimination of unexpected failures in LLVM and Clang. I've managed to achieve, with a pile of local patches, the number of 0 unexpected bugs within LLVM (check-llvm) and 3 unexpected bugs within Clang (check-clang) (however these ones were caused by hardcoded environment -lstdc++ vs -lc++). The number of failures in sanitizers (check-sanitizer) is also low, it's close to zero.

                                                                                                    • LLVM
                                                                                                    • In order to achieve the goals of testability concerning the LLVM projects, I had to prepare a new pkgsrc-wip package called llvm-all-in-one that contains 12 active LLVM projects within one tree. The set of these projects is composed of: llvm, clang, compiler-rt, libcxx, libcxxabi, libunwind, test-suite, openmp, llgo, lld, lldb, clang-tools-extra. These were required to build and execute test-suites in the LLVM's projects. Ideally the tests should work in standalone packages - built out-of-LLVM-sources - and with GCC/Clang, however the real life is less bright and this forced me to use Clang as the system compiler an all-in-one package in order to develop the work environment with the ability to build and execute unit tests.

                                                                                                      There were four threads within LLVM:

                                                                                                      • Broken std::call_once with libstdc++. This is an old and well-known bug, which was usually worked around with a homegrown implementation llvm::call_once. I've discovered that the llvm::call_once workaround isn't sufficient for the whole LLVM functionality, as std::call_once can be called internally inside the libstdc++ libraries - like within the C++11 futures interface. This bug has been solved by Joerg Sonnenberger in the ELF dynamic linker.
                                                                                                      • Unportable shell construct hardcoded in tests ">&". This has been fixed upstream.
                                                                                                      • LLVM JIT. The LLVM Memory generic allocator (or page mapper) was designed to freely map pages with any combination of the protection bits: R,W,X. This approach breaks on NetBSD with PaX MPROTECT and requires redesign of the interfaces. This is the continuation of the past month AllocateRWX and ReleaseRWX compatibility with NetBSD improvements. I've prepared few variations of local patches addressing these issues and it's still open for discussion with upstream. My personal preference is to remove the current API entirely and introduce a newer one with narrowed down functionality to swap between readable (R--), writable (RW-) and executable (R-X) memory pages. This would effectively enforce WX.
                                                                                                      • Sanitizers support. Right now, I keep the patches locally in order to upstream the common sanitizer code in compiler-rt.
                                                                                                      • The LLVM JIT API is the last cause of unexpected failures in check-llvm. This breaks MCJIT, ORCJIT and ExecutionEngine libraries and causes around 200 unexpected failures within tests.

                                                                                                        • Clang
                                                                                                        • I've upstreamed a patch that enables ubsan and asan on Clang's frontend for NetBSD/amd64. This support isn't complete, and requires sanitizers' support code upstreamed to compiler-rt.

                                                                                                          • compiler-rt
                                                                                                            • The current compiler-rt tasks can be divided into:
                                                                                                            • upstream sanitizer common code shared with POSIX platforms
                                                                                                            • upstream sanitizer common code shared with Linux and FreeBSD
                                                                                                            • upstream sanitizer common code shared with FreeBSD
                                                                                                            • upstream sanitizer common code specific to NetBSD
                                                                                                            • build, execute and pass tests for sanitizer common code in check-santizer
                                                                                                            • This means that ubsan, asan and the rest of the specific sanitizers wait in queue.

                                                                                                              All the mentioned tasks are being worked on simultaneously, with a soft goal to finish them one after another from the first to the last one.
                                                                                                              The last point with check-sanitizer unveiled so far two generic bugs on NetBSD:

                                                                                                              • Return errno EFAULT instead of EACCES on memory fault with read(2)/write(2)-like syscalls.
                                                                                                              • Honor PTHREAD_DESTRUCTOR_ITERATIONS in libpthread.
                                                                                                              • These bugs are not strictly real bugs, but they were introducing needless differences with other modern POSIX systems. The fixes were introduced by Christos Zoulas and backported to NetBSD-8.

                                                                                                                • Plan for the next milestone
                                                                                                                • I have decided not to open new issues in with the coming month and focus on upstreaming the remaining LLVM code. The roadmap for the next month is to continue working on the goals of the previous months. std::call_once is an example that every delayed bug keeps biting again and again in future.

                                                                                                                  LLVM 5.0.0 is planned to be released this month (August) and there is a joint motivation with the upstream maintainer to push compatibility fixes for LLVM JIT. There is an option to submit a workaround now and introduce refactoring for the trunk and next version (6.0.0).

                                                                                                                  • This work was sponsored by The NetBSD Foundation.
                                                                                                                  • The NetBSD Foundation is a non-profit organization and welcomes any donations to help us continue funding projects and services to the open-source community. Please consider visiting the following URL, and chip in what you can: http://netbsd.org/donations/#how-to-donate
                                                                                                                  • ***
                                                                                                                    DragonFly BSD 4.8.1 released

                                                                                                                    +Updates by dev:

                                                                                                                    • Antonio Huete Jimenez (1):
                                                                                                                      • libc/gmon: Replace sbrk() with mmap()
                                                                                                                      • Francois Tigeot (3):
                                                                                                                        • drm: bring in Linux compability changes from master
                                                                                                                        • drm/linux: make flush_work() more robust
                                                                                                                        • drm/i915: Update to Linux 4.7.10
                                                                                                                        • Imre Vadász (4):
                                                                                                                          • drm - Fix hrtimer, don't reset timer->function to NULL in timeout handler.
                                                                                                                          • sound - Delete devfs clone handler for /dev/dsp and /dev/mixer on unload.
                                                                                                                          • if_vtnet - Allocate struct vtnet_tx_header entries from a queue.
                                                                                                                          • Make sure that cam(4)'s dashutdown handler runs before DEVICE_SHUTDOWN().
                                                                                                                          • Matthew Dillon (24):
                                                                                                                            • kernel - MFC b48dd28447fc (sigtramp workaround)
                                                                                                                            • kernel - Fix deadlock in sound system
                                                                                                                            • kernel - Fix broken wakeup in crypto code
                                                                                                                            • kernel - Add KERN_PROC_SIGTRAMP
                                                                                                                            • gcc - Adjust the unwind code to use the new sigtramp probe sysctl
                                                                                                                            • kernel - Implement NX
                                                                                                                            • kernel - Implement NX (2)
                                                                                                                            • kernel - Implement machdep.pmap_nx_enable TUNABLE
                                                                                                                            • kernel - Implement NX (3) - cleanup
                                                                                                                            • kernel - Temporarily set the default machdep.pmap_nx_enable to 0
                                                                                                                            • param - Change __DragonFly_version to 400801
                                                                                                                            • kernel - Fix i915 deadlock
                                                                                                                            • pthreads - Change PTHREAD_STACK_MIN
                                                                                                                            • libc - Fix bug in rcmdsh()
                                                                                                                            • ppp - Fix minor overflow in protocol search
                                                                                                                            • libtelnet - Fix improper statement construction (not a bug in the binary)
                                                                                                                            • libdevstat - Limit sscanf field, fix redundant condition
                                                                                                                            • openssh - Fix a broken assignment
                                                                                                                            • window - Fix Graphics capability enable test
                                                                                                                            • kernel - Fix event preset
                                                                                                                            • mfiutil - Fix static buffer overflow
                                                                                                                            • mixer - Fix sscanf() overflow
                                                                                                                            • gcore - fix overflow in sscanf
                                                                                                                            • kernel - Fix improper parens
                                                                                                                            • Sascha Wildner (17):
                                                                                                                              • libkvm: Fix char pointer dereference.
                                                                                                                              • Fix some cases where an index was used before its limits check.
                                                                                                                              • Really ensure that our world/kernel are built under POSIX locale ("C").
                                                                                                                              • zoneinfo: Create a /usr/share/zoneinfo/UTC link.
                                                                                                                              • kernel/cam: Add CAM_SCSI_IT_NEXUS_LOST (in preparation for virtio_scsi(4)).
                                                                                                                              • kernel: Add FreeBSD's virtio_scsi(4) driver.
                                                                                                                              • ccdconfig(8): Add missing free().
                                                                                                                              • libpuffs: Fix two asserts.
                                                                                                                              • kernel/acpi: Untangle the wakecode generation during buildkernel.
                                                                                                                              • kernel/acpica: Better check AcpiOsPredefinedOverride()'s InitVal argument
                                                                                                                              • kernel/acpica: ACPI_THREAD_ID is unsigned.
                                                                                                                              • kernel/acpica: Return curthread as thread id from AcpiOsGetThreadId().
                                                                                                                              • kernel/acpica: Remove no longer needed #include.
                                                                                                                              • kernel/acpi: Call AcpiInitializeSubsystem() before AcpiInitializeTables().
                                                                                                                              • kernel/urtwn: Add missing braces.
                                                                                                                              • kernel/ieee80211: Add missing braces.
                                                                                                                              • libthread_xu: Fix checking of pthread_barrier_init()'s count argument.
                                                                                                                              • Sepherosa Ziehau (7):
                                                                                                                                • sound/hda: Sync device ID table with FreeBSD
                                                                                                                                • inet6: Restore mbuf hash after defragmentation.
                                                                                                                                • pf: Normalized, i.e. defragged, packets requiring rehash.
                                                                                                                                • em: Enable MSI by default on devices has PCI advanced features capability.
                                                                                                                                • sched: Change CPU_SETSIZE to signed int, same as FreeBSD/Linux.
                                                                                                                                • usched: Allow process to change self cpu affinity
                                                                                                                                • ix: Fixup TX/RX ring settings for X550, which supports 64/64 TX/RX rings.
                                                                                                                                • zrj (1):
                                                                                                                                  • Revert "Always use unix line endings"
                                                                                                                                  • ***
                                                                                                                                    Porting Unix to the 386: A Practical Approach

                                                                                                                                    The University of California's Berkeley Software Distribution (BSD) has been the catalyst for much of the innovative work done with the UNIX operating system in both the research and commercial sectors. Encompassing over 150 Mbytes (and growing) of cutting-edge operating systems, networking, and applications software, BSD is a fully functional and nonproprietary complete operating systems software distribution (see Figure 1). In fact, every version of UNIX available from every vendor contains at least some Berkeley UNIX code, particularly in the areas of filesystems and networking technologies. However, unless one could pay the high cost of site licenses and equipment, access to this software was simply not within the means of most individual programmers and smaller research groups.

                                                                                                                                    The 386BSD project was established in the summer of 1989 for the specific purpose of porting BSD to the Intel 80386 microprocessor platform so that the tools this software offers can be made available to any programmer or research group with a 386 PC. In coordination with the Computer Systems Research Group (CSRG) at the University of California at Berkeley, we successively ported a basic research system to a common AT class machine (see, Figure 2), with the result that approximately 65 percent of all 32-bit systems could immediately make use of this new definition of UNIX. We have been refining and improving this base port ever since.
                                                                                                                                    By providing the base 386BSD port to CSRG, our hope is to foster new interest in Berkeley UNIX technology and to speed its acceptance and use worldwide. We hope to see those interested in this technology build on it in both commercial and noncommercial ventures.
                                                                                                                                    In this and following articles, we will examine the key aspects of software, strategy, and experience that encompassed a project of this magnitude. We intend to explore the process of the 386BSD port, while learning to effectively exploit features of the 386 architecture for use with an advanced operating system. We also intend to outline some of the tradeoffs in implementation goals which must be periodically reexamined. Finally, we will highlight extensions which remain for future work, perhaps to be done by some of you reading this article today. Note that we are assuming familiarity with UNIX, its concepts and structures, and the basic functions of the 386, so we will not present exhaustive coverage of these areas.
                                                                                                                                    In this installment, we discuss the beginning of our project and the initial framework that guided our efforts, in particular, the development of the 386BSD specification. Future articles will address specific topics of interest and actual nonproprietary code fragments used in 386BSD. Among the future areas to be covered are:

                                                                                                                                    • 386BSD process context switching
                                                                                                                                    • Executing the first 386BSD process on the PC
                                                                                                                                    • 386BSD kernel interrupt and exception handling
                                                                                                                                    • 386BSD INTERNET networking
                                                                                                                                    • ISA device drivers and system support
                                                                                                                                    • 386BSD bootstrap process
                                                                                                                                    • ***
                                                                                                                                      X11: How does “the” clipboard work
                                                                                                                                      • > If you have used another operating system before you switched to something that runs X11, you will have noticed that there is more than one clipboard:
                                                                                                                                      • > Sometimes, you can use the mouse to select some text, switch to another window, and then hit the middle mouse button to paste text.
                                                                                                                                        > Sometimes, you can select text, then hit some hotkey, e.g. Ctrl+C, switch to another window, hit another hotkey, e.g. Ctrl+V, and paste said text.
                                                                                                                                        > Sometimes, you can do both.
                                                                                                                                      • > Selections as a form of IPC
                                                                                                                                      • First things first, in X11 land, “clipboards” are called “selections”.

                                                                                                                                        Yes, there is more than one selection and they all work independently. In fact, you can use as many selections as you wish. In theory, that is. When using selections, you make different clients communicate with each other. This means that those clients have to agree on which selections to use. You can’t just invent your own selection and then expect Firefox to be compatible with it.

                                                                                                                                      • How are selections identified?

                                                                                                                                      • There are three “standard” selection names:

                                                                                                                                        PRIMARY: The “middle mouse clipboard”
                                                                                                                                        SECONDARY: Virtually unused these days
                                                                                                                                        CLIPBOARD: The “Ctrl+C clipboard”

                                                                                                                                      • Program 1: Query selection owners

                                                                                                                                      • Content type and conversion

                                                                                                                                      • Program 2: Get clipboard as UTF-8

                                                                                                                                      • Program 3: Owning a selection

                                                                                                                                      • Program 4: Content type TARGETS

                                                                                                                                      • Handling binary data using xclip

                                                                                                                                      • Large amounts of data

                                                                                                                                      • Clipboard managers

                                                                                                                                      • Summary

                                                                                                                                        News Roundup
                                                                                                                                        TrueOS Documentation: A great way to give back!

                                                                                                                                        The TrueOS project is always looking for community contribution. Documentation changes are a great way for users to not only make a solid contribution to the project, but learn more about it too! Over the last few months, many users have asked for both simple and detailed instructions on making documentation changes. These are now added to the TrueOS handbook in the Contributing to TrueOS section.

                                                                                                                                        If interested in making a small alteration to the TrueOS handbook, here are some instructions for submitting a patch through the GitHub website. These instructions are also applicable to the Lumina and SysAdm handbooks. Lumina documentation is in the the lumina-docs repository, and SysAdm guides are in sysadm-docs.

                                                                                                                                        • Make a Doc change!
                                                                                                                                        • A GitHub account is required to submit patches to the TrueOS docs. Open a web browser and sign in to GitHub or make a new account. When making a new account, be sure to use an often checked email address, as all communication regarding patches and pull requests are sent to this address. Navigate to the trueos-docs GitHub repository. Click on the trueos-handbook directory to view all the documentation files. Open the .rst file corresponding to the chapter needing an update. The chapter names are reflected in the title of the .rst files. For example, open install.rst to fix an error spotted in handbook chapter 3: “Install”. This first image shows the trueos-docs repository and the contents of the trueos-handbook directory

                                                                                                                                          Open the desired chapter file by clicking its entry in the list. The trueos.rst file is an index file and should be ignored. Begin editing the file by clicking the Pencil icon in the upper right corner above the file’s text. The file moves to edit mode, where it is now possible to make changes, as the next image shows.

                                                                                                                                          • Editing install.rst with GitHub
                                                                                                                                          • When making a simple change, it is recommended to avoid adjusting the specific formatting elements and instead work within or around them. Once satisfied, scroll to the bottom of the page and write a detailed commit summary of the new changes. Click Propose file change (green button), then Create pull request to submit the changes to the project. GitHub then does an automated merge check. Click Create pull request again to submit the change to the repository. In the final step, a developer or project committer reviews the changes, merging them into the project or asking for more changes as necessary.

                                                                                                                                            • Learn more about TrueOS documentation
                                                                                                                                            • To learn more about the underlying structure of TrueOS documentation like the Sphinx Documentation Generator and reStructuredText markup, browse the Advanced Documentation Changes section of the TrueOS handbook. This section also contains instructions for forking the repository and configuring a local clone, build testing, updating the translation files, and other useful information. The Sphinx website is also a valuable resource.

                                                                                                                                              libHijack Revival

                                                                                                                                              Over a decade ago, while standing naked and vulnerable in the comfort of my steaming hot shower, I gathered my thoughts as humans typically attempt to do in the wee hours of the morning. Thoughts of a post-exploitation exercise raced in my mind, the same thoughts that made sleeping the night before difficult. If only I could inject into Apache some code that would allow me to hook into its parsing engine without requiring persistance. Putting a file-backed entry into /proc/pid/maps would tip off the security team to a compromise.

                                                                                                                                              The end-goal was to be able to send Apache a special string and have Apache perform a unique action based on the special string.
                                                                                                                                              FelineMenace's Binary Protection Schemes whitepaper provided inspiration. Silvio Cesare paved the way into PLT/GOT redirection attacks. Various Phrack articles selflessly contributed to the direction I was to head.
                                                                                                                                              Alas, in the aforementioned shower, an epiphany struck me. I jumped as an awkward stereotypical geek does: like an elaborate Elaine Benes dance rehearsal in the air. If I used PTrace, ELF, and the PLT/GOT to my advantage, I could cause the victim application to allocate anonymous memory mappings arbitrarily. In the newly-created memory mapping, I could inject arbitrary code. Since a typical operating system treats debuggers as God-like applications, the memory mapping could be mapped without write access, but as read and execute only. Thus enabling the stealth that I sought.
                                                                                                                                              The project took a few years to develop in my spare time. I ended up creating several iterations, taking a rough draft/Proof-of-Concept style code and rewriting it to be more efficient and effective.
                                                                                                                                              I had toyed with FreeBSD off-and-on for over a decade by this point, but by-and-large I was still mostly using Linux. FreeBSD gained DTrace and ZFS support, winning me over from the Linux camp. I ported libhijack to FreeBSD, giving it support for both Linux and FreeBSD simultaneously.
                                                                                                                                              In 2013, I started work on helping Oliver Pinter with his ASLR implementation, which was originally destined to be upstreamed to FreeBSD. It took a lot of work, and my interest in libhijack faded. As a natural consequence, I handed libhijack over to SoldierX, asking the community to take it and enhance it.
                                                                                                                                              Over four years went by without a single commit. The project was essentially abandoned. My little baby was dead.
                                                                                                                                              This past week, I wondered if libhijack could even compile on FreeBSD anymore. Given that four years have passed by and major changes have happened in those four years, I thought libhijack would need a major overhaul just to compile, let alone function. Imagine my surprise when libhijack needed only a few fixups to account for changes in FreeBSD's RTLD.
                                                                                                                                              Today, I'm announcing the revival of libhijack. No longer is it dead, but very much alive. In order to develop the project faster, I've decided to remove support for Linux, focusing instead on FreeBSD. I've removed hundreds of lines of code over the past few days. Supporting both FreeBSD and Linux meant some code had to be ugly. Now the beautification process has begun.
                                                                                                                                              I'm announcing the availability of libhijack 0.7.0 today. The ABI and API should be considered unstable as they may change without notice.
                                                                                                                                              Note that HardenedBSD fully mitigates libhijack from working with two security features: setting security.bsd.unprivileged_proc_debug to 0 by default and the implementation of PaX NOEXEC.
                                                                                                                                              The security.bsd.unprivileged_proc_debug sysctl node prevents PTrace access for applications the debugger itself did not fork+execve for unprivileged (non-root) users. Privileged users (the root account) can use PTrace to its fullest extent.
                                                                                                                                              HardenedBSD's implementation of PaX NOEXEC prevents the creation of memory mappings that are both writable and executable. It also prevents using mprotect to toggle between writable and executable. In libhijack's case, FreeBSD grants libhijack the ability to write to memory mappings that are not marked writable. Debuggers do this to set breakpoints. HardenedBSD behaves differently due to PaX NOEXEC.
                                                                                                                                              Each memory mapping has a notion of a maximum protection level. When a memory mapping is created, if the write bit is set, then HardenedBSD drops the execute bit from the maximum protection level. When the execute bit is set at memory mapping creation time, then the write bit is dropped from the maximum protection level. If both the write and execute bits are set, then the execute bit is silently dropped from both the mapping creation request and the maximum protection level.
                                                                                                                                              The maximum protection level is always obeyed, even for debuggers. Thus we see that PaX NOEXEC is 100% effective in preventing libhijack from injecting code into a process. Here is a screenshot showing PaX NOEXEC preventing libhijack from injecting shellcode into a newly-created memory mapping.

                                                                                                                                              • What's next for libhijack? Here's what we have planned, in no particular order:
                                                                                                                                                • Python bindings
                                                                                                                                                • Port to arm64
                                                                                                                                                • This requires logic for handling machine-dependent code. High priority.
                                                                                                                                                • Finish anonymous shared object injection.
                                                                                                                                                • This requires implementing a custom RTLD from within libhijack.
                                                                                                                                                • More cleanups. Adhere to style(9).
                                                                                                                                                • libhijack can be found on GitHub @ https://github.com/SoldierX/libhijack
                                                                                                                                                • ***
                                                                                                                                                  Contributing to FreeBSD

                                                                                                                                                  I’ve talked to a whole bunch of folks who say things like “I’m a junior programmer. I’m looking for a way to help. I have no specific expertise, but I’m willing to learn.” Today, I present such junior programmers with an opportunity. An opportunity for you to learn skills that will be incredibly valuable to your career, and will simultaneously expand your career opportunities.

                                                                                                                                                  For decades, FreeBSD has relied on its users for testing. They expect users to install pre-release versions of the OS and exercise them to identify regressions. That’s necessary, but it’s nowhere near enough.
                                                                                                                                                  The FreeBSD Testing Project is building an automated test suite for the entire operating system. They have a whole mess of work to do. There’s only four people on the team, so each additional person that contributes can have a serious impact. They have tutorials on how to write tests, and sample tests.
                                                                                                                                                  There’s a whole bunch of tests left to be written. You have an almost open field. They need tests for everything from ls(1) to bhyve. (Yes, ls(1) broke at one point in the last few years.) Everything needs testing. Learning to write, submit, and commit small tests is valuable experience for developing the big tests.
                                                                                                                                                  What’s more, learning to write tests for a system means learning the system. Developing tests will transform you into a FreeBSD expert. Once you’ve demonstrated your competence, worth, and ability to work within the project, other FreeBSD teams will solicit your help and advice. The Project will suck you in.
                                                                                                                                                  Testing is perhaps the most valuable contribution anyone can make to an open source project. And this door into the FreeBSD Project is standing wide, wide open.

                                                                                                                                                  OpenBSD Gaming Resource
                                                                                                                                                  • > What isn't there to love about playing video games on your favorite operating system? OpenBSD and video games feels like a natural combination to me. My resource has software lists, links to free games not in ports, lists of nonfree games, and recommendations.
                                                                                                                                                  • The Table of Contents has these high-level items for you:
                                                                                                                                                  • > General Resources
                                                                                                                                                  • > OpenBSD Exclusive
                                                                                                                                                  • > Ports
                                                                                                                                                  • > Network Clients
                                                                                                                                                  • > Browser Games
                                                                                                                                                  • > Game Engines
                                                                                                                                                  • > Multiple Game Engines
                                                                                                                                                  • > Multiple System Emulation
                                                                                                                                                  • > Computer Emulation
                                                                                                                                                  • > Game Console Emulation
                                                                                                                                                  • > Live Media Emulation
                                                                                                                                                  • > Operating System Emulation
                                                                                                                                                  • > Games in Other Software
                                                                                                                                                  • Have fun with these games!
                                                                                                                                                  • ***
                                                                                                                                                    Beastie Bits
                                                                                                                                                    • Dragonfly introduces kcollect(8)
                                                                                                                                                    • The Faces of Open Source
                                                                                                                                                    • Edgemesh CEO, Jake Loveless and Joyent CTO, Bryan Cantrill join together for a fireside chat to discuss distributed caching at scale, Docker, Node.js, Mystery Science Theater 3000, and more!
                                                                                                                                                    • UFS: Place the information needed to find alternate superblocks to the end of the area reserved for the boot block
                                                                                                                                                    • Let ‘localhost’ be localhost
                                                                                                                                                    • Hurry up and register for vBSDCon September 7-9 and EuroBSDCon September 21-24
                                                                                                                                                    • ***
                                                                                                                                                      Feedback/Questions
                                                                                                                                                      • Morgan - btrfs deprecated
                                                                                                                                                      • Ben - UEFI, GELI, BEADM, and more
                                                                                                                                                      • Brad - Hostname Clarification
                                                                                                                                                      • M Rod - BSD Laptop
                                                                                                                                                      • Jeremy - Contributing to BSDs
                                                                                                                                                      • ***
                                                                                                                                                        1 hr 25 min
                                                                                                                                                      • 207: Bridge over the river Cam

                                                                                                                                                        We recap our devsummit experiences at BSDCambridge, share why memcmp is more complicated than expected, explore Docker on FreeBSD, and we look at a retro terminal.

                                                                                                                                                        This episode was brought to you by

                                                                                                                                                        Headlines
                                                                                                                                                        BSDCam recap

                                                                                                                                                        The 2017 Cambridge DevSummit took place from 2-4 August 2017. The event took place over three days including a formal dinner at St John's College, and was attended by 55 registered developers and guests.

                                                                                                                                                        • Prior to the start of the conference, we had a doc hacking lounge, the computer lab provided a room where we could meet and try to spend some time on documentation. Sevan walked two interested people through the process of creating a documentation patch and submitting it for the first time. In the process, found ways to improve the documentation on how to write documentation.
                                                                                                                                                        • The event is run "un-conference style" in that we brainstorm the actual session schedule on the first morning, with a focus on interactive topics that reflect the interests and exploit the knowledge of the attendees.

                                                                                                                                                          • The idea is to maximize the amount of discussion and decisions that can be made while we are all in the same room
                                                                                                                                                          • The first morning, we all gather in the slightly too small, and even more slightly under air conditioned FW11 classroom. We go around the room introducing ourselves, and listing a few topics we would be interested in discussing. Eventually the whiteboard is full of topics, with various numbers of ticks beside them to indicate the number of interested people
                                                                                                                                                          • There are breakout rooms of all sizes, so even topics with only a small group of interested folks can get a lot accomplished
                                                                                                                                                          • The most difficult is trying to schedule the sessions, as there is much overlap and people usually want to be in concurrent sessions, or someone's schedule means they won’t be available that day, etc.
                                                                                                                                                          • This years working groups:
                                                                                                                                                            • Toolchain (Compilers, Linkers, External Toolchain, Static analysis and sanitizers)
                                                                                                                                                            • Virtualization (bhyve, xen, jails, docker)
                                                                                                                                                            • Transport (TCP) and Network Performance
                                                                                                                                                            • Security and mitigations (WX, noexec stack, CFI, ASLR, KASLR, Safe Stack, etc)
                                                                                                                                                            • Testing (Status, What to test, How to test, QA for releases)
                                                                                                                                                            • Capsicum (Automation with LLVM etc, Casper, Namespacing, “Services”, capsh)
                                                                                                                                                            • Desktop / WiFi (drm-next, drivers, resume, power, installer, desktop, OOB Experience)
                                                                                                                                                            • Tracing (Blackbox, DTrace, KTR, ptrace, truss, hardware tracing)
                                                                                                                                                            • Packaging and Packaged Base (Sets, Kernels, Ports & flavours, sub-packages, privlib)
                                                                                                                                                            • Architectural Security Features (CPU Features: SGX, PXN/PAN, Pointer Authentication, AMD Memory Encryption, Libcrunch, RISC-V, CheriABI)
                                                                                                                                                            • Architectures and Embedded systems (RISC-V, ARM, ARM64, MIPS(64), SPARC64)
                                                                                                                                                            • Teaching (Audiences, Objectives, Targets, Material, future directions)
                                                                                                                                                            • Provisioning and Management Tools (CfgMgmt tools, Image building, VM/bhyve orchestration, Preconfigured VMs for testing, Wishlist)
                                                                                                                                                            • Storage (ZFS status update, ZFS encryption infrastructure, ZFS Zero Copy / Sendfile, Acceleration of checksums and raidz parity calculations, sesutil, mpsutil)
                                                                                                                                                            • And that wasn’t everything. We then had a series of short talklets:
                                                                                                                                                              • Enhancing and replacing mmap()
                                                                                                                                                              • SDIO support
                                                                                                                                                              • eBPF support for FreeBSD
                                                                                                                                                              • Tracing + Virtualization
                                                                                                                                                              • Practical DMA Attack Protection
                                                                                                                                                              • On Thursday night there was a special dinner at St John's College
                                                                                                                                                              • Overall it was a great DevSummit, and I even managed to get some of the work assigned to me finished. Shortly I will commit an update to the boot loader menu that will automatically populate the kernel selection menu with the automatically detected list of installed kernels. The list is also properly refreshed when you switch boot environments.
                                                                                                                                                              • ***
                                                                                                                                                                Hosts/BSD – for when you need to run your BSD inside a penguin
                                                                                                                                                                • This wiki provides details on how to run each of the various BSDs under QEMU
                                                                                                                                                                • The target audience is Linux developers looking to test their apps etc under BSD
                                                                                                                                                                • The wiki is in need of some love, there are some option questions, and it lacks some polish
                                                                                                                                                                • There are instructions on building qemu from source, but it should likely mention the qemu-devel port
                                                                                                                                                                • There should probably also be instructions on using other architectures, like ARM/MIPS etc
                                                                                                                                                                • If you have used QEMU, or would like to spend the time to learn how, please help update this wiki
                                                                                                                                                                • ***
                                                                                                                                                                  memcmp -- more complicated than you might expect

                                                                                                                                                                  “A suspicious pattern in open-source software”

                                                                                                                                                                  One bug recently found by John using tis-interpreter on a widely used open-source library involved the comparison of strings with memcmp. The unexpected condition was that memcmp was, in one case, called with a pointer to a buffer shorter than the length passed as third argument, breaking one of the two symmetrical pre-conditions in the function’s ACSL contract
                                                                                                                                                                  A reason that may have made this use of memcmp look okay to the developer is that the buffers being passed to it always differed before the end of the buffers were reached.
                                                                                                                                                                  a memcmp implementation based on stopping as soon as a difference is found, would not have caused any out-of-bounds read access
                                                                                                                                                                  The first question raised was whether the pattern memcmp("a", "bc", 3) was problematic according to the letter of the C standard. If it was, the second question was whether the busy maintainer of one of the Open Source packages that make the Internet tick should be bothered with a bug report.
                                                                                                                                                                  I would like to be able to say that memcmp’s ACSL contract was the product of careful deliberation, but unfortunately this is not the case: many standard function contracts were written quickly in order to get most of the standard library covered, and have not been tested by time. Anyway, upon proofreading the relevant clause in the C11 standard, my feeling was that the ACSL formalization was, in this particular case, right, and that it was undefined behavior to pass as memcmp argument a buffer that wasn’t fully valid, even if the implementation sort-of needs to read the buffer’s characters in order for the purpose of finding the first mismatch.

                                                                                                                                                                  • The post then goes on to look at the memcmp code in glibc
                                                                                                                                                                  • There are two distinct optimizations for long buffers, one that applies when both buffers start at the same offset modulo the word size, memcmp_common_alignment, and one that applies when they don’t, memcmp_not_common_alignment.

                                                                                                                                                                    The function memcmp_common_alignment is relatively well-behaved: it reads from the two buffers aligned word by aligned word, and thus reads the entire words that contain differing bytes. If the caller passed buffers that aren’t valid after the differing byte, this amounts to reading out of bounds, but this sort of out-of-bounds access is not detected by the typical MMU, which works at the scale of the page.
                                                                                                                                                                    The “not_common_alignment” case, however, tells a different story. When passed the carefully (mis-)aligned buffers t1 and (char*)t2+1, although these buffers differ in the 8th byte, Glibc’s implementation of memcmp reads 8 bytes beyond the end of t1. By making the 16th byte differ instead of the 8th one, it is also possible to make Glibc’s implementation of memcmp read 16 bytes beyond the end of t1.
                                                                                                                                                                    In conclusion, yes, some implementations of memcmp will crash when invoked with buffers that aren’t valid for the full length, even if they differ early. The circumstances are rare (probably the reason this bug was still there to be found in a library that had already been tested with all the available techniques) but outside the programmer’s control. The pattern described in this post should be reported as a bug when found.

                                                                                                                                                                    • It is interesting to read the detailed analysis of a bug in such a basic libc feature
                                                                                                                                                                    • ***
                                                                                                                                                                      News Roundup
                                                                                                                                                                      Docker on FreeBSD

                                                                                                                                                                      There are two approaches to running Docker on FreeBSD. First one was created back in 2015 and it was a native port of Docker engine to FreeBSD. It was an ambitious project but nobody stepped forward to continuously port the never-ending flow of upstream code to FreeBSD. So the port still exists (sysutils/docker-freebsd) but it wasn't updated since 2015 and it is Docker v1 (it is v17 as of 2017).

                                                                                                                                                                      The other approach is to use official way of running Docker on platforms other than Linux. Well, somewhat official as Docker still does not support FreeBSD as a host officially. This is docker-machine tool which in turn will use VirtualBox to run a virtual machine with Linux and Docker engine. docker utility on the host will communicate with the engine inside VB where all the work will be done. This article describes what needs to be done to start using it.
                                                                                                                                                                      Before we begin you need VirtualBox installed. Do not skip adding /boot/loader.conf and /etc/rc.conf lines mentioned on that page. You won't need user inteface or anything, docker-machine will do all the work, just make sure VirtualBox is present and ready to be used.
                                                                                                                                                                      `pkg install docker docker-machine docker-compose’
                                                                                                                                                                      Docker will store its stuff in ~/.docker. You might not want the virtual machine image files to live in your home, in this case just create a symlink:
                                                                                                                                                                      mkdir ~/.docker
                                                                                                                                                                      ln -s /storage/docker ~/.docker/machine
                                                                                                                                                                      docker-machine create --driver virtualbox \
                                                                                                                                                                      --virtualbox-memory 2048 \
                                                                                                                                                                      --virtualbox-cpu-count 2 \
                                                                                                                                                                      --virtualbox-disk-size 102400 \
                                                                                                                                                                      --virtualbox-hostonly-cidr "10.2.1.1/24" \
                                                                                                                                                                      docker1
                                                                                                                                                                      Here's the example. We are creating machine named docker1. It is using VirtualBox driver, the vm has 2G of memory, 2 cores and 100G of disk space. docker-machine setups VirtualBox to use host-only network adapter (it will create vboxnet0 interface on the host automatically) and we are instructing it to use 10.2.1.1/24 as the address of this adapter — change it to what suits your needs or omit this flag (default is 192.168.99.1/24).
                                                                                                                                                                      And basically that is all. Check if it is running:
                                                                                                                                                                      docker-machine ls
                                                                                                                                                                      If you do open VirtualBox interface you will find a virtual machine named docker1 running. You can start/stop/whatever your machine using docker-machine utility.

                                                                                                                                                                      • Here’s how you can connect to the machine:
                                                                                                                                                                      • docker utility by default tries to talk to Docker engine running on the same host. However with specific environment variables you can instruct it to talk to other host. docker-machine can export these variables for you.

                                                                                                                                                                        eval docker-machine env docker1
                                                                                                                                                                        docker run hello-world

                                                                                                                                                                        • There was quite a bit of discussion about docker at the FreeBSD developers summit in Cambridge during the first week of August. Two docker developers who had worked on the Mac OS X port, one of whom is an OpenBSD advocate, explained how docker has evolved, and the linux-isms have been abstracted away such that a truly native docker solution for FreeBSD can be built and maintained with a lot less headache than before
                                                                                                                                                                        • I look forward to seeing if we can’t make that happen
                                                                                                                                                                        • ***
                                                                                                                                                                          The POSIX Shell And Utilities
                                                                                                                                                                          • The POSIX Shell And Utilities
                                                                                                                                                                          • Compiled for The Shell Hater's Handbook
                                                                                                                                                                          • ***
                                                                                                                                                                            PostgreSQL – logging to a file

                                                                                                                                                                            These steps were carried out on FreeBSD 11.0 with PostgreSQL 9.6 (two of my favorite tools).

                                                                                                                                                                            I like logging. I like logging PostgreSQL. With logs, you can see what happened. Without, you can only guess.
                                                                                                                                                                            Setting up logging for PostgreSQL involves several parts, each of which must be completed or else I don’t get what I want. This is not a criticism of PostgreSQL. It’s a feature.
                                                                                                                                                                            I am documenting this because each time I configure a new PostgreSQL instance, it takes me more than one iteration to get it working. The goal: this post lets both you and me get it right the first time.
                                                                                                                                                                            The parts include:

                                                                                                                                                                            • Telling PostgreSQL to log via syslog
                                                                                                                                                                            • Telling FreeBSD to local postgres to /var/log/postgres.log (my preference).
                                                                                                                                                                            • Telling PostgreSQL the things you want logged.
                                                                                                                                                                            • Changes to postgresql.conf
                                                                                                                                                                            • The file location varies with the version installed. For PostgreSQL 9.6 on FreeBSD, the file is /var/db/postgres/data96/postgresql.conf (adjust 96 according to the version installed).
                                                                                                                                                                              I made these changes to that file.
                                                                                                                                                                              log_destination = 'syslog'
                                                                                                                                                                              log_min_messages = notice
                                                                                                                                                                              log_min_error_statement = notice
                                                                                                                                                                              log_checkpoints = on
                                                                                                                                                                              log_lock_waits = on
                                                                                                                                                                              log_timezone = 'UTC'
                                                                                                                                                                              By default, PostgreSQL logs to the local0 facility and is controlled by the syslog_facility in postgresql.conf. This will be used in syslog.conf (see the next section of this post).
                                                                                                                                                                              The above mentioned changes require a reload:
                                                                                                                                                                              service postgresql reload
                                                                                                                                                                              • Changes to /etc/syslog.conf
                                                                                                                                                                              • Now that we have PostgreSQL logging to syslog, we want to tell syslog where to put those messages.

                                                                                                                                                                                I changed this line in /etc/syslog.conf:*.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
                                                                                                                                                                                With .notice pulling in some local0 messages, adding local0.none to the line will free the messages up for later use in the configuration file. Otherwise, the PostgreSQL messages will be in /var/log/messages.
                                                                                                                                                                                The changed line is:
                                                                                                                                                                                `.notice;authpriv.none;kern.debug;lpr.info;mail.crit;news.err;local0.none /var/log/messages
                                                                                                                                                                                Then, to get the messages into my preferred location, I added this to the file:
                                                                                                                                                                                local0.* /var/log/postgresql.log`

                                                                                                                                                                                • Log file rotation
                                                                                                                                                                                • For rotating my log file, I added a new file: /usr/local/etc/newsyslog.conf.d/postgresql96

                                                                                                                                                                                  /var/log/postgresql.log pgsql:wheel 640 7 * $D0 GB /var/db/postgres/data96/postmaster.pid 30

                                                                                                                                                                                  Before restarting syslog, I did this, so the destination file existed. This isn’t always/strictly necessary, but because the ownership is not chown root:wheel, I do it to get that part set.

                                                                                                                                                                                  touch /var/log/postgresql.log
                                                                                                                                                                                  chown pgsql:wheel

                                                                                                                                                                                  Restarting syslog:

                                                                                                                                                                                  sudo kill -HUP `sudo cat /var/run/syslog.pid `

                                                                                                                                                                                  That’s it Now you should see PostgreSQL logging in /var/log/postgresql.log.

                                                                                                                                                                                  mandoc-1.14.2 released

                                                                                                                                                                                  i just released portable mandoc-1.14.2. It is available now from http://mandoc.bsd.lv/.

                                                                                                                                                                                  ```From: Ingo Schwarze [email protected]

                                                                                                                                                                                  Date: Fri, 28 Jul 2017 20:12:44 +0200
                                                                                                                                                                                  Subject: mandoc-1.14.2 released

                                                                                                                                                                                  Hi,

                                                                                                                                                                                  i just released portable mandoc-1.14.2.

                                                                                                                                                                                  It is available now from http://mandoc.bsd.lv/ .

                                                                                                                                                                                  All downstream maintainers are encouraged to update their ports

                                                                                                                                                                                  and packages from 1.14.1 to 1.14.2.

                                                                                                                                                                                  Mandoc 1.14.2 is a feature release introducing:

                                                                                                                                                                                  • a new -Tmarkdown output mode
                                                                                                                                                                                  • anchors for deep linking into -Thtml manual pages
                                                                                                                                                                                  • a superset of the functionality of the former mdoclint(1) utility
                                                                                                                                                                                  • a new -Wstyle message level with several new messages
                                                                                                                                                                                  • automatic line breaking inside individual tbl(7) cells
                                                                                                                                                                                  • a rewrite of the eqn(7) lexer, and some eqn(7) rendering improvements
                                                                                                                                                                                  • support for many additional low-level roff(7) features
                                                                                                                                                                                  • and various smaller features and bug fixes.
                                                                                                                                                                                  • For more details, see: http://mandoc.bsd.lv/NEWS

                                                                                                                                                                                    With the improved mandoc features, only twenty-five out of the

                                                                                                                                                                                    ten thousand software packages in the OpenBSD ports tree still
                                                                                                                                                                                    need groff to format their manual pages.

                                                                                                                                                                                    Since the project has been called "mandoc" rather than "mdocml"

                                                                                                                                                                                    for several years now, the website, the distribution tarball,
                                                                                                                                                                                    and the source extraction directory are now also called "mandoc"
                                                                                                                                                                                    rather than "mdocml".

                                                                                                                                                                                    The release was tested on the following systems:

                                                                                                                                                                                    • OpenBSD-current and OpenBSD-stable
                                                                                                                                                                                    • NetBSD-current
                                                                                                                                                                                    • illumos
                                                                                                                                                                                    • Debian Linux
                                                                                                                                                                                    • Void Linux x86_64 glibc and musl
                                                                                                                                                                                    • Crux Linux
                                                                                                                                                                                    • SunOS 5.11.2, 5.10, and 5.9
                                                                                                                                                                                    • As before, catman(8) and the regression suite cannot be used on

                                                                                                                                                                                      SunOS 5.10 and SunOS 5.9.
                                                                                                                                                                                      A big thanks to everybody who provided patches, bug reports,
                                                                                                                                                                                      feature suggestions, advice, and help with testing!
                                                                                                                                                                                      Yours,
                                                                                                                                                                                      Ingo```

                                                                                                                                                                                      Beastie Bits
                                                                                                                                                                                      • A good looking terminal emulator which mimics the old cathode display. Available in x11/cool-retro-terminal
                                                                                                                                                                                      • Milestone Complete! OpenRC conversion
                                                                                                                                                                                      • Healthy developer interaction between FreeBSD and IllumOS re: mdb
                                                                                                                                                                                      • Large Batch of Kernel Errata Patches Released
                                                                                                                                                                                      • opnsense 17.7 released
                                                                                                                                                                                      • Twitter Co-Founder and CEO states “FreeBSD rules them all”
                                                                                                                                                                                      • Hurry up and register for vBSDCon September 7-9 and EuroBSDCon September 21-24
                                                                                                                                                                                      • ***
                                                                                                                                                                                        Feedback/Questions
                                                                                                                                                                                        • Dominik - Monitoring Software
                                                                                                                                                                                        • Darren - Wonderful Awk
                                                                                                                                                                                        • Andrew - Thanks
                                                                                                                                                                                        • Jens - Migration Questions
                                                                                                                                                                                        • ***
                                                                                                                                                                                          1 hr 44 min
                                                                                                                                                                                        • 206: To hier is UNIX

                                                                                                                                                                                          Lumina Desktop 1.3 is out, we show you a Plasma 5 on FreeBSD tutorial, explore randomness, and more.

                                                                                                                                                                                          This episode was brought to you by

                                                                                                                                                                                          Headlines
                                                                                                                                                                                          Lumina Desktop v1.3 released
                                                                                                                                                                                          • Notable Changes:
                                                                                                                                                                                          • New Utility: lumina-mediaplayer. Lumina Media Player is a graphic interface for the Qt QMediaPlayer Class, with Pandora internet radio streaming integration. Lumina Media Player supports many audio formats, including .ogg, .mp3, .mp4, .flac, and .wmv. It is also possible to increase the number of playable formats by installing gstreamer-plugins. This utility is found in the Applications → Utilities section, or opened by typing lumina-mediaplayer in a command line.
                                                                                                                                                                                            • New Utility: lumina-xdg-entry. This is another simple utility designed to help users create .desktop entries and shortcuts. Find it in the Utilities application category, or open it by typing lumina-xdg-entry in a command line.
                                                                                                                                                                                            • Lumina Desktop:
                                                                                                                                                                                              • Desktop folders are integrated, and can now be manipulated directly from the desktop.
                                                                                                                                                                                              • Added the automatic settings migration of a desktop monitor (single monitor only, for now).
                                                                                                                                                                                              • Numerous speed and performance improvements with how icons load and the system interacts with the desktop.
                                                                                                                                                                                              • Lumina-FM:
                                                                                                                                                                                                • Now fully integrated with lumina-archiver.
                                                                                                                                                                                                • A “System directory” tree pane is available. Options to enable/disable it are being added later, as it is on by default.
                                                                                                                                                                                                • Numerous speed improvements with caching and loading icons.
                                                                                                                                                                                                • Lumina Texteditor:
                                                                                                                                                                                                  • There is a new json manifest file format for syntax highlighting support. Users can open this file, customize their highlighting options, and immediately see their changes without rebuilding the utility.
                                                                                                                                                                                                  • The text editor now supports more than 10 different file formats.
                                                                                                                                                                                                  • Added options for file-wide preferences in syntax files. Options include: word wrap, character per line limits, excess whitespace highlighting, font style restrictions, and tab-width settings.
                                                                                                                                                                                                  • LTE supports tabs with detach, drag’n’drop, and location customization with the View menu option.
                                                                                                                                                                                                  • Add checkable menu option to show the “unsaved changes” dialogue box on close.
                                                                                                                                                                                                  • Lumina Screenshot:
                                                                                                                                                                                                    • Adjustments to the lumina-screenshot interface.
                                                                                                                                                                                                    • Add an adjustable warning to lumina-screenshot when closing with an unsaved image.
                                                                                                                                                                                                    • Add functionality to select a specific area of the screen for screenshots.
                                                                                                                                                                                                    • Lumina Archiver:
                                                                                                                                                                                                      • Functionality improvements.
                                                                                                                                                                                                      • Bug fixes.
                                                                                                                                                                                                      • Interface changes.
                                                                                                                                                                                                      • General Improvements:
                                                                                                                                                                                                        • Permission checks for settings files (all utilities). When launched with sudo, all tools use or create a root-permissioned copy of the user’s settings file. This prevents a settings file being locked by root.
                                                                                                                                                                                                        • UI text reworks to help re-unify style.
                                                                                                                                                                                                        • Add hooks to update the desktop with icons for the /media directory when a system uses USB automounting functionality.
                                                                                                                                                                                                        • Fix Fluxbox bug with windows workspace assignments.
                                                                                                                                                                                                        • Work on new utility lumina-notify (not fully functional yet).
                                                                                                                                                                                                        • Fix panel reporting error crashing lumina-config.
                                                                                                                                                                                                        • Bug fix for dbus-send calls for Gentoo.
                                                                                                                                                                                                        • Clean up automatic DPI scaling support.
                                                                                                                                                                                                        • Bug fix for the panel clock.
                                                                                                                                                                                                        • Compton compositor is now disabled by default (but can be manually enabled).
                                                                                                                                                                                                        • Translation file updates.
                                                                                                                                                                                                        • Documentation updates.
                                                                                                                                                                                                        • ***
                                                                                                                                                                                                          FreeBSD 11.0 and Plasma 5 HowTo

                                                                                                                                                                                                          Here’s a step-by-step guide to getting a machine with FreeBSD 11 in it, running X, and KDE Plasma 5 Desktop and KDE Applications. It’s the latest thing! (Except that 11-STABLE is in the middle of the pack of what’s supported .. but the KDE bits are fresh. I run 10.3 with KDE4 or Plasma 5 on my physical machines, myself, so the FreeBSD version isn’t that important except that packages are readily available for 11-STABLE, not for 10-STABLE.)

                                                                                                                                                                                                          • We skip the part about installing FreeBSD (it’s in there if you need it) and get right to the important parts that you need:
                                                                                                                                                                                                          • An X Server and a backup X11 environment (ancient):
                                                                                                                                                                                                          • pkg install xorg xterm twm

                                                                                                                                                                                                            • Desktop technologies (modern):
                                                                                                                                                                                                            • pkg install hal dbus

                                                                                                                                                                                                              echo hald_enable=YES >> /etc/rc.conf
                                                                                                                                                                                                              echo dbus_enable=YES >> /etc/rc.conf

                                                                                                                                                                                                              • Next up, test whether the X server works by running startx and exiting out of twm.
                                                                                                                                                                                                              • If running with ZFS, it’s a good idea to snapshot now, just so you can easily roll back to the it-works-with-basic-X11 setup you have now.

                                                                                                                                                                                                                zfs snapshot -r zroot@x11

                                                                                                                                                                                                                • Now swap out the default FreeBSD package repository, for the KDE-FreeBSD community one. This is documented also on the Area51 page.
                                                                                                                                                                                                                • mkdir -p /usr/local/etc/pkg/repos

                                                                                                                                                                                                                  cd /usr/local/etc/pkg/repos
                                                                                                                                                                                                                  cat > FreeBSD.conf <
                                                                                                                                                                                                                  FreeBSD: { enabled: no }
                                                                                                                                                                                                                  EOF
                                                                                                                                                                                                                  cat > Area51.conf <
                                                                                                                                                                                                                  Area51: {
                                                                                                                                                                                                                  url: "http://meatwad.mouf.net/rubick/poudriere/packages/110-amd64-kde/",
                                                                                                                                                                                                                  priority: 2,
                                                                                                                                                                                                                  enabled: yes
                                                                                                                                                                                                                  }
                                                                                                                                                                                                                  EOF

                                                                                                                                                                                                                  • Tell pkg(8) to refresh itself (it may install a newer pkg, too), then install something nicer than xterm + twm, and then do some post-install configuration:
                                                                                                                                                                                                                  • pkg update

                                                                                                                                                                                                                    pkg install konsole plasma5-plasma-desktop
                                                                                                                                                                                                                    echo cuse_load=YES >> /boot/loader.conf
                                                                                                                                                                                                                    echo webcamd_enable=YES >> /etc/rc.conf

                                                                                                                                                                                                                    • Log in as your test user, and set up .xinitrc to start Plasma 5:
                                                                                                                                                                                                                    • cat > .xinitrc <

                                                                                                                                                                                                                      #! /bin/sh
                                                                                                                                                                                                                      /usr/local/bin/xterm -geometry +0+0 &
                                                                                                                                                                                                                      KDE=/usr/local/bin/startkde
                                                                                                                                                                                                                      test -x $KDE && exec /usr/local/bin/ck-launch-session $KDE
                                                                                                                                                                                                                      exec /usr/local/bin/twm
                                                                                                                                                                                                                      EOF
                                                                                                                                                                                                                      chmod 755 .xinitrc

                                                                                                                                                                                                                      • If you really want, you can run startx, but this isn’t the complete Plasma 5 desktop experience... and KDE Applications are not installed, either. So you get a bare xterm (useful to kill X or start konsole) and kwin and not much else. Good thing that getting the rest of KDE Plasma 5 Desktop and KDE Applications is pretty easy (and we could have skipped the intermediate step with konsole and gone straight to the finish:
                                                                                                                                                                                                                      • pkg install kde

                                                                                                                                                                                                                        • This metaport will pull in another 2GiB of stuff, for all the KDE Applications and a complete Plasma desktop. There are intermediate metaports for slightly-less-heavy installations, but this one is easy to remember and will almost certainly get you what you want. So it really comes down to installing X, dbus, hal, and then the kde package. Voila!
                                                                                                                                                                                                                        • ***
                                                                                                                                                                                                                          Full FreeBSD Server on a Raspberry Pi
                                                                                                                                                                                                                          • Disclaimer :
                                                                                                                                                                                                                            • The Raspberry PI is a such a great device. You can do a really huge amount of fun things with this little board...
                                                                                                                                                                                                                            • The goal of this paper is to show how you can build a full personal server on your Raspberry PI, using FreeBSD and it's packages.
                                                                                                                                                                                                                            • Here's how we'll proceed :
                                                                                                                                                                                                                              • Get FreeBSD
                                                                                                                                                                                                                              • Configure FreeBSD
                                                                                                                                                                                                                              • Install and configure sudo
                                                                                                                                                                                                                              • Configure your Wifi with a static IPv4 and IPv6 address
                                                                                                                                                                                                                              • Install and start Packet Filter
                                                                                                                                                                                                                              • Install and configure nginx with "let's encrypt" SSL / PHP / MySQL
                                                                                                                                                                                                                              • Install and configure OpenSMTPd and SPAMd
                                                                                                                                                                                                                              • Install and configure Netdata with nginx to monitor your system
                                                                                                                                                                                                                              • Avoid OS detection
                                                                                                                                                                                                                              • ***
                                                                                                                                                                                                                                News Roundup
                                                                                                                                                                                                                                HardenedBSD, now has openntpd in base
                                                                                                                                                                                                                                • Over the past few months, Bernard Spil has been hard at work importing OpenNTPd 6.0p1 in HardenedBSD base. Starting with 12-CURRENT, HardenedBSD will ship with OpenNTPd by default. Just like with LibreSSL in base, HardenedBSD users have a choice when building world of which NTP daemon to use. Users who want to use the legacy NTPd can set WITHOUT_OPENNTPD and WITH_NTP in src.conf(5). Bernard will continue maintaining LibreSSL and OpenNTPd in HardenedBSD base.
                                                                                                                                                                                                                                • Users who are upgrading from an existing 12-CURRENT system from source and who use the legacy NTP daemon in base will need to perform the following actions:

                                                                                                                                                                                                                                  • Install new world
                                                                                                                                                                                                                                  • Run mergemaster or etcupdate
                                                                                                                                                                                                                                  • sysrc ntpd_enable="NO"
                                                                                                                                                                                                                                  • sysrc local_openntpd_enable="YES"
                                                                                                                                                                                                                                  • A binary update will be published within the next 24 hours that contains OpenNTPd in base. Those who use hbsd-update will only need to perform steps 3 and 4 above.

                                                                                                                                                                                                                                  • Unix: How random is random
                                                                                                                                                                                                                                    • Sandra Henry-Stocker writes on Networkworld:
                                                                                                                                                                                                                                    • On Unix systems, random numbers are generated in a number of ways and random data can serve many purposes. From simple commands to fairly complex processes, the question “How random is random?” is worth asking.

                                                                                                                                                                                                                                      EZ random numbers
                                                                                                                                                                                                                                      If all you need is a casual list of random numbers, the RANDOM variable is an easy choice. Type "echo $RANDOM" and you'll get a number between 0 and 32,767 (the largest number that two bytes can hold).

                                                                                                                                                                                                                                      • Note: this only works in bash, and is generally a silly thing to do
                                                                                                                                                                                                                                      • Of course, this process is actually providing a "pseudo-random" number. As anyone who thinks about random numbers very often might tell you, numbers generated by a program have a limitation. Programs follow carefully crafted steps, and those steps aren’t even close to being truly random. You can increase the randomness of RANDOM's value by seeding it (i.e., setting the variable to some initial value). Some just use the current process ID (via $$) for that. Note that for any particular starting point, the subsequent values that $RANDOM provides are quite predictable.

                                                                                                                                                                                                                                        • More complex random data
                                                                                                                                                                                                                                        • For more serious requirements for random data, such as its use in encryption, some more truly random data comes into play. The /dev/random and /dev/urandom files get beyond the predictability of programming by making use of environmental noise gathered from device drivers and other system sources and stored it in an “entropy pool”.

                                                                                                                                                                                                                                          • Examining entropy
                                                                                                                                                                                                                                          • Randomness vs. entropy
                                                                                                                                                                                                                                          • Generating files with random data
                                                                                                                                                                                                                                          • Generating random numbers
                                                                                                                                                                                                                                          • Beyond /dev/urandom
                                                                                                                                                                                                                                          • ***
                                                                                                                                                                                                                                            Moving firmware to userland
                                                                                                                                                                                                                                            • This is a post from the DragonFlyBSD mailinglist:
                                                                                                                                                                                                                                            • I would like to introduce a few ideas about the new firmware subsystem. I assume that it should not require adding a new system tools or modifying boot process.

                                                                                                                                                                                                                                              Simplification is the first. It would be good to remove parent-child relationship and corresponding functionality. It would significantly simplify firmware handling. Its only practical use is when there are multiple images in one loadable kernel module. The module can be unloaded when all children are not in use. Usage of the children images is tracked through the counter for the parent image. If images will not be placed inside loadable kernel modules, the parent-child mechanism won't have any practical meaning. I think, currently the mechanism is not used anywhere in the DragonFly system and if it was, it could be easily replaced by putting every child image in its own module without modifying drivers.
                                                                                                                                                                                                                                              There are two use cases according to who will provide firmware images to
                                                                                                                                                                                                                                              the system:

                                                                                                                                                                                                                                              • developers of DragonFly BSD (they can modify and rebuild the system)
                                                                                                                                                                                                                                              • third-parties (they should not be required to modify and rebuild the system)
                                                                                                                                                                                                                                              • All firmware images needs to have some information attached (at least,

                                                                                                                                                                                                                                                if ack with a license is needed) which should be d) stored persistently.
                                                                                                                                                                                                                                                The question is where to save the information for non-built-in images.

                                                                                                                                                                                                                                                • Various solutions are proposed that meet some -- but not all -- of the mentioned requirements, along with pros and cons.
                                                                                                                                                                                                                                                • It closes with:
                                                                                                                                                                                                                                                • There would be two firmware sources: kernel and filesystem. In case of the same image names, user could have a choice by setting a kernel environment variable, firmware from which source has higher priority and will be provided to consumer.

                                                                                                                                                                                                                                                  OpenBSD changes of note 625
                                                                                                                                                                                                                                                  • Continue with some cleanup and improvement of the depend step of building. Lots of little things to support lex and yacc better as well.
                                                                                                                                                                                                                                                  • Intel Optane parts are leaking into the wild, some driver fixes to support them.
                                                                                                                                                                                                                                                  • Add support for pattern substitution to variables in ksh using a common syntax borrowed from ksh93. Or not, reverted.
                                                                                                                                                                                                                                                  • Deprecate fgetln.
                                                                                                                                                                                                                                                  • Add detection for missing X sets to syspatch.
                                                                                                                                                                                                                                                  • Refinement of the inteldrm code, including better backlight support.
                                                                                                                                                                                                                                                  • A special edition of slaacd for the installer.
                                                                                                                                                                                                                                                  • After much wailing and gnashing of teeth, fix strtol to parse strings like “0xridiculous”.
                                                                                                                                                                                                                                                  • A fix for malloc and zero sized allocations when using canaries.
                                                                                                                                                                                                                                                  • Add the ability to pause and unpause VMs in vmd.
                                                                                                                                                                                                                                                  • Remove “listen secure” syntax from smtpd.conf. It’s broken since a couple of months and noone complained.
                                                                                                                                                                                                                                                  • Remove sending of router solicitations and processing of router advertisements from the kernel.
                                                                                                                                                                                                                                                  • The lidsuspend sysctl has been fully replaced by lidaction.
                                                                                                                                                                                                                                                  • Fix fortune to filter out unprintable characters. Convert the fortune files to using UTF-8 instead of archaic overprinting. Fortunes with unprintable words may still be obtained with the -o option.
                                                                                                                                                                                                                                                  • Introduce some quirks to the IDE and ATA code to prevent drives from attaching twice on hyper-v.
                                                                                                                                                                                                                                                  • Add vmctl send and receive as well.
                                                                                                                                                                                                                                                  • Update to xterm 330.
                                                                                                                                                                                                                                                  • Remove some magic cleanup from dhclient. It will not deliberately attempt to interfere with other operations on the same interface.
                                                                                                                                                                                                                                                  • Update libexpat to 2.2.2. Fixes NULL parser dereference.
                                                                                                                                                                                                                                                  • Ilja Van Sprundel found a whole mess of kernel bugs in this and that. Some info leaks, some erroneous signal handling, some unbounded malloc calls. Lions, tigers, bears. Try to fix them.
                                                                                                                                                                                                                                                  • ***
                                                                                                                                                                                                                                                    Beastie Bits
                                                                                                                                                                                                                                                    • Heir - description of the file system hierarchy
                                                                                                                                                                                                                                                    • FreeBSD hier(7)
                                                                                                                                                                                                                                                    • sshlockout and your logs
                                                                                                                                                                                                                                                    • net-mgmt/netdata can now monitor ZFS pools
                                                                                                                                                                                                                                                    • Ted Unangst is reviewing some books, chapter by chapter. “Coders at Work”, “Founders at Work”, “the Mythical Man-Month”, “The Pragmatic Programmer”, and “Code: The Hidden Language of Computer Hardware and Software”. This is chapter 5, look for the bookreview tag on the site to find the previous ones
                                                                                                                                                                                                                                                    • pfSense 2.3.4-p1 release now available
                                                                                                                                                                                                                                                    • ***
                                                                                                                                                                                                                                                      Feedback/Questions
                                                                                                                                                                                                                                                      • Ben - Thanks
                                                                                                                                                                                                                                                      • Jay - ZFS and Speed
                                                                                                                                                                                                                                                      • Patrick - Portalfs removed?
                                                                                                                                                                                                                                                      • Sir l33tname - ZFS pool question
                                                                                                                                                                                                                                                      • ***
                                                                                                                                                                                                                                                        1 hr 31 min
                                                                                                                                                                                                                                                      • 205: FreeBSD Turning it up to 11.1

                                                                                                                                                                                                                                                        FreeBSD 11.1-RELEASE is out, we look at building at BSD home router, how to be your own OpenBSD VPN provider, and find that glob matching can be simple and fast.

                                                                                                                                                                                                                                                        This episode was brought to you by

                                                                                                                                                                                                                                                        Headlines
                                                                                                                                                                                                                                                        FreeBSD 11.1-RELEASE
                                                                                                                                                                                                                                                        • FreeBSD 11.1 was released on July 26th
                                                                                                                                                                                                                                                        • You can download it as an ISO or USB image, a prebuilt VM Image (vmdk, vhd, qcow2, or raw), and it is available as a cloud image (Amazon EC2, Microsoft Azure, Google Compute Engine, Vagrant)
                                                                                                                                                                                                                                                        • Thanks to everyone, including the release engineering team who put so much time and effort into managing this release and making sure it came out on schedule, all of the FreeBSD developers who contributed the features, the companies that sponsored that development, and the users who tested the betas and release candidates.
                                                                                                                                                                                                                                                        • Support for blacklistd(8) has been added to OpenSSH
                                                                                                                                                                                                                                                        • The cron(8) utility has been updated to add support for including files within /etc/cron.d and /usr/local/etc/cron.d by default.
                                                                                                                                                                                                                                                        • The syslogd(8) utility has been updated to add the include keyword which allows specifying a directory containing configuration files to be included in addition to syslog.conf(5). The default syslog.conf(5) has been updated to include /etc/syslog.d and /usr/local/etc/syslog.d by default.
                                                                                                                                                                                                                                                        • The zfsbootcfg(8) utility has been added, providing one-time boot.config(5)-style options
                                                                                                                                                                                                                                                        • The efivar(8) utility has been added, providing an interface to manage UEFI variables.
                                                                                                                                                                                                                                                        • The ipsec and tcpmd5 kernel modules have been added, these can now be loaded without having to recompile the kernel
                                                                                                                                                                                                                                                        • A number of new IPFW modules including Network Prefix Translation for IPv6 as defined in RFC 6296, stateless and stateful NAT64, and a module to modify the TCP-MSS of packets
                                                                                                                                                                                                                                                        • A huge array of driver updates and additions
                                                                                                                                                                                                                                                        • The NFS client now supports the Amazon® Elastic File System™ (EFS)
                                                                                                                                                                                                                                                        • The new ZFS Compressed ARC feature was added, and is enabled by default
                                                                                                                                                                                                                                                        • The EFI loader has been updated to support TFTPFS, providing netboot support without requiring an NFS server
                                                                                                                                                                                                                                                        • For a complete list of new features and known problems, please see the online release notes and errata list, available at:
                                                                                                                                                                                                                                                          • FreeBSD 11.1-RELEASE Release Notes
                                                                                                                                                                                                                                                          • FreeBSD 11.1-RELEASE Errata
                                                                                                                                                                                                                                                          • For more information about FreeBSD release engineering activities, please see: Release Engineering Information
                                                                                                                                                                                                                                                          • Availability
                                                                                                                                                                                                                                                            • FreeBSD 11.1-RELEASE is now available for the amd64, i386, powerpc, powerpc64, sparc64, armv6, and aarch64 architectures.
                                                                                                                                                                                                                                                            • FreeBSD 11.1-RELEASE can be installed from bootable ISO images or over the network. Some architectures also support installing from a USB memory stick. The required files can be downloaded as described in the section below.
                                                                                                                                                                                                                                                            • SHA512 and SHA256 hashes for the release ISO, memory stick, and SD card images are included at the bottom of this message.
                                                                                                                                                                                                                                                            • PGP-signed checksums for the release images are also available at: FreeBSD 11.1 Release Checksum Signatures
                                                                                                                                                                                                                                                            • A PGP-signed version of this announcement is available at: FreeBSD 11.1-RELEASE Announcement
                                                                                                                                                                                                                                                            • ***
                                                                                                                                                                                                                                                              Building a BSD home router - ZFS and Jails
                                                                                                                                                                                                                                                              • Part of a series of posts about building a router:
                                                                                                                                                                                                                                                                • Part 1 -- discussing why you want to build your own router and how to assemble the APU2
                                                                                                                                                                                                                                                                • Part 2 -- some Unix history explanation of what a serial console is
                                                                                                                                                                                                                                                                • Part 3 -- demonstrating serial access to the APU and covering firmware update
                                                                                                                                                                                                                                                                • Part 4 -- installing pfSense
                                                                                                                                                                                                                                                                • Part 5 -- installing OPNsense instead
                                                                                                                                                                                                                                                                • Part 6 -- Comparison of pfSense and OPNsense
                                                                                                                                                                                                                                                                • Part 7 -- Advanced installation of OPNsense
                                                                                                                                                                                                                                                                • After the advanced installation in part 7, the tutorials covers converting an unused partition into swap space, and converting the system to ZFS
                                                                                                                                                                                                                                                                • After creating a new pool using the set aside partition, some datasets are created, and the log files, ports, and obj ZFS datasets are mounted
                                                                                                                                                                                                                                                                • The tutorial then goes on to cover how to download the ports tree, and install additional software on the router
                                                                                                                                                                                                                                                                • I wonder what part 9 will be about.
                                                                                                                                                                                                                                                                • ***
                                                                                                                                                                                                                                                                  Be your own VPN provider with OpenBSD (v2)
                                                                                                                                                                                                                                                                  • This article covers how to build your own VPN server with some advanced features including:
                                                                                                                                                                                                                                                                    • Full Disk Encryption (FDE)
                                                                                                                                                                                                                                                                    • Separate CA/signing machine (optional)
                                                                                                                                                                                                                                                                    • Multiple DNSCrypt proxy instances for failover
                                                                                                                                                                                                                                                                    • OpenVPN: Certificate Revocation List/CRL (optional)
                                                                                                                                                                                                                                                                    • OpenVPN: TLS 1.2 only
                                                                                                                                                                                                                                                                    • OpenVPN: TLS cipher based on AES-256-GCM only
                                                                                                                                                                                                                                                                    • OpenVPN: HMAC-SHA512 instead of HMAC-SHA1
                                                                                                                                                                                                                                                                    • OpenVPN: TLS encryption of control channel (makes it harder to identify OpenVPN traffic)
                                                                                                                                                                                                                                                                    • The article starts with an explanation of the differences between OpenVPN and IPSEC.
                                                                                                                                                                                                                                                                    • In the end the author chose OpenVPN because you can select the port it runs on, and it has a better chance of working from hotel or coffee shop WiFi.
                                                                                                                                                                                                                                                                    • The guide them walks through doing an installation on an encrypted disk, with a caution about the limitations of encrypted disk with virtual machines hosted by other parties.
                                                                                                                                                                                                                                                                    • The guide then locks down the newly installed system, configuring SSH for keys only, adding some PF rules, and configuring doas
                                                                                                                                                                                                                                                                    • Then networking is configured, including enabling IP forwarding since this machine is going to act as the VPN gateway
                                                                                                                                                                                                                                                                    • Then a large set of firewall rules are created that NAT the VPN traffic out of the gateway, except for DNS requests that are redirected to the gateways local unbound
                                                                                                                                                                                                                                                                    • Then some python scripts are provided to block brute force attempts
                                                                                                                                                                                                                                                                    • We will use DNSCrypt to make our DNS requests encrypted, and Unbound to have a local DNS cache. This will allow us to avoid using our VPS provider DNS servers, and will also be useful to your future VPN clients which will be able to use your VPN server as their DNS server too

                                                                                                                                                                                                                                                                      Before configuring Unbound, which is the local DNS cache which will make requests to dnscrypt_proxy, we can configure an additional dnscrypt instance, as explained in the pkg readme. Indeed, dnscrypt DNS servers being public ones, they often goes into maintenance, become offline or temporarily unreachable. To address this issue, it is possible to setup multiple dnscrypt instances. Below are the steps to follow to add one, but you can add more if you wish

                                                                                                                                                                                                                                                                      • Then a CA and Certificate are created for OpenVPN
                                                                                                                                                                                                                                                                      • OpenVPN is installed and configured as a server
                                                                                                                                                                                                                                                                      • Configuration is also provided for a client, and a mobile client
                                                                                                                                                                                                                                                                      • Thanks to the author for this great tutorial
                                                                                                                                                                                                                                                                      • You might also want to check out this section from their 2015 version of this post: Security vs Anonymity
                                                                                                                                                                                                                                                                      • ***
                                                                                                                                                                                                                                                                        Essen Hackathon Trip - Benedict Reuschling
                                                                                                                                                                                                                                                                        • Over on the FreeBSD Foundation Blog, Benedict provides a detailed overview of the Essen Hackathon we were at a few weeks ago.
                                                                                                                                                                                                                                                                        • Head over there and give it a read, and get a feel for what these smaller type of community events are like. Hopefully you can attend, or better yet, organize, a similar event in your area.
                                                                                                                                                                                                                                                                        • News Roundup
                                                                                                                                                                                                                                                                          Blog about my self-hosted httpd blog

                                                                                                                                                                                                                                                                          I really like Twitter because it allows me to share short messages, we have a great community, and 140 characters are enough for everybody.

                                                                                                                                                                                                                                                                          And this statement was exactly 140 characters, but sometimes I want to say more than that. And that's why I finally created this new blog. I was never really into blogging because I barely had time or the audience to write long articles. I sometimes wrote short stories for sites like undeadly.org, I collected some of them here, but my own blog was hosted on tumblr and never saw any activity.
                                                                                                                                                                                                                                                                          I want to try it again, and this time I decided to create a self-hosted blog. Something that runs on my own server and with httpd, the web server that I wrote for OpenBSD. So I was looking for potential blogging tools that I could use to run my own blog. Besides the popular and heavyweight ones such as WordPress, there are countless other options: I looked at blogs from fellow developers, such as Ted Unangst's flak (I like the fact that it is written in Lua but the implementation is a bit over my head), or Pelican that is used by Peter Hessler for bad.network (but, sorry, I don't like Python), and finally Kristaps Dzonsons' sblg that is used for all of his projects and blogs. I decided to use sblg.
                                                                                                                                                                                                                                                                          Kristaps keeps on releasing very useful free software. Most well-known is mandoc, at least everyone is using it for manpages these days, but there is is also his BCHS (beaches) web stack which strongly advertises OpenBSD's httpd. Great. I also use kcgi whenever I have to write small CGIs. So sblg seemed like the right choice to me.
                                                                                                                                                                                                                                                                          Let me quickly iterate over my current Makefile. I keep on tweaking this file, so it might have been changed by the time you are reading this article. Please note that the Makefile is written for OpenBSD's make, a distant derivative of pmake which is not like GNU make.
                                                                                                                                                                                                                                                                          I'm not a designer or web developer, but I appreciate good looking web pages. I wanted to have something that is responsive, works on desktops and mobiles, looks somewhat modern, works without JavaScript, but doesn't disqualify me for all the eye candy from a geek point of view.
                                                                                                                                                                                                                                                                          I bootstrapped the theme by creating a simple grid layout with a fairly typical blog style: banner, top menu, middle text, sidebar. In 2017, bootstrap is probably a vintage (or retro) framework but it makes it very easy to create responsive pages with a proper layout and without caring about all the CSS and HTML5 madness too much. I also use Font Awesome because it is awesome, provides some fancy icons, and was suggested in sblg's example templates (let's blame Kristaps for it). I do not include any JavaScript which prevents me from using bootstrap's responsive hamburger menu.
                                                                                                                                                                                                                                                                          I have to admit that "reykfloeter" is not an ideal name for a blog. My actual name is "Reyk Flöter", and I normally just use my first name "reyk" as a user- and nickname, but it was taken when I registered my Twitter account and the related domain. So I picked reykfloeter in a few places.
                                                                                                                                                                                                                                                                          I'm aware that my German last name is nearly unpronounceable for others, so "reykfloeter" appears like a random concatenation of letters. As most of us, I own a number of domains and maybe I should move the blog to bsd.plumbing (which is used as a home for relayd and httpd), arc4random.com (but I intended to use it as a fine OpenBSD-powered Entropy-as-a-Service for poor Linuxers), or even copper.coffee?
                                                                                                                                                                                                                                                                          In addition to the domain, I also need a good blog name or tag line. A very memorable example in the BSD world is Peter Hansteen's THAT GRUMPY BSD GUY blog. So what should I use?

                                                                                                                                                                                                                                                                          • Reyk Flöter's blog
                                                                                                                                                                                                                                                                            • OpenBSD hacker. Coffee nerd. Founder.
                                                                                                                                                                                                                                                                            • Ask Reyk (imaginary how-tos and 10 step guides)
                                                                                                                                                                                                                                                                            • [Sewage, Drainage and BSD Plumbing](bsd.plumbing/blog)
                                                                                                                                                                                                                                                                            • [A Replacement Call for Random](arc4random.com)
                                                                                                                                                                                                                                                                            • [Coffee with Reyk](copper.coffee)
                                                                                                                                                                                                                                                                            • For now it will just be reykfloeter - blog

                                                                                                                                                                                                                                                                              iXsystems releases the X10
                                                                                                                                                                                                                                                                              • TrueNAS X10 is the the 3rd generation of the TrueNAS unified storage line. The X10 is the first of a new TrueNAS series, and will be expandable to up to 360TB with the TrueNAS ES12 expansion shelf.
                                                                                                                                                                                                                                                                              • The X10 is cost effective, at a 30% lower price point than the Z20, making it an effective addition to your backup/DR infrastructure. The street price of a 20TB non-HA model falls under $10K. It’s designed to move with six predefined configurations that match common use cases. The dual controllers for high availability are an optional upgrade to ensure business continuity and avoid downtime.
                                                                                                                                                                                                                                                                              • The X10 boasts 36 hot swap SAS using two expansion shelves, for up to 360TB of storage, allowing you to backup thousands of VMs or share tens of thousands of files. One of the use cases for TrueNAS X10 is for backup, so users can upgrade the X10 to two ports of blazing 10GigE connectivity. The 20TB non-HA model enables you to backup over 7,000 VDI VMs for under $3.00 per VM. Overall, the X10 is a greener solution than the TrueNAS Z product line, with the non-HA version boasting only 138 watts of power and taking up only 2U of space.
                                                                                                                                                                                                                                                                              • Best of all, the TrueNAS X10 starts at $5,500 street. You can purchase a 120TB configuration today for under $20K street.
                                                                                                                                                                                                                                                                              • Glob Matching Can Be Simple And Fast Too

                                                                                                                                                                                                                                                                                Here’s a straightforward benchmark. Time how long it takes to run ls (a*)nb in a directory with a single file named a100, compared to running ls | grep (a.*)nb. Superscripts denote string repetition and parentheses are for grouping only, so that when n is 3, we’re running ls a*a*a*b in a directory containing the single file aaa…aaa (100 a’s), compared against ls | grep a.*a.*a.*b in the same directory.

                                                                                                                                                                                                                                                                                The exception seems to be the original Berkeley csh, which runs in linear time (more precisely, time linear in n). Looking at the source code, it doesn’t attempt to perform glob expansion itself. Instead it calls the C library implementation glob(3), which runs in linear time, at least on this Linux system. So maybe we should look at programming language implementations too.
                                                                                                                                                                                                                                                                                Most programming languages provide some kind of glob expansion, like C’s glob. Let’s repeat the experiment in a variety of different programming languages:
                                                                                                                                                                                                                                                                                Perhaps the most interesting fact evident in the graph is that GNU glibc, the C library used on Linux systems, has a linear-time glob implementation, but BSD libc, the C library used on BSD and macOS systems, has an exponential-time implementation.
                                                                                                                                                                                                                                                                                PHP is not shown in the graph, because its glob function simply invokes the host C library’s glob(3), so that it runs in linear time on Linux and in exponential time on non-Linux systems. (I have not tested what happens on Windows.) All the languages shown in the graph, however, implement glob matching without using the host C library, so the results should not vary by host operating system.
                                                                                                                                                                                                                                                                                The netkit ftpd runs quickly on Linux because it relies on the host C library’s glob function. If run on BSD, the netkit ftpd would take exponential time. ProFTPD ships a copy of the glibc glob, so it should run quickly even on BSD systems. Ironically, Pure-FTPd and tnftpd take exponential time on Linux because they ship a copy of the BSD glob function. Presumably they do this to avoid assuming that the host C library is bug-free, but, at least in this one case, the host C library is better than the one they ship.

                                                                                                                                                                                                                                                                                • Additional Reading
                                                                                                                                                                                                                                                                                • This post is an elaboration of an informal 2012 Google+ post showing that most shells used exponential-time glob expansion. At the time, Tom Duff, the author of Plan 9’s rc shell, commented that, “I can confirm that rc gets it wrong. My excuse, feeble as it is, is that doing it that way meant that the code took 10 minutes to write, but it took 20 years for someone to notice the problem. (That’s 10 ‘programmer minutes’, i.e. less than a day.)” I agree that’s a reasonable decision for a shell. In contrast, a language library routine, not to mention a network server, today needs to be robust against worst-case inputs that might be controlled by remote attackers, but nearly all of the code in question predates that kind of concern. I didn’t realize the connection to FTP servers until I started doing additional research for this post and came across a reference to CVE-2010-2632 in FreeBSD’s glob implementation.

                                                                                                                                                                                                                                                                                  BSD VPS Providers Needed

                                                                                                                                                                                                                                                                                  One of TDP’s recent projects is accumulating a list of virtual private server services (VPS) that provide a BSD option.

                                                                                                                                                                                                                                                                                  VPS’s are generally inexpensive services that enable the user to only concern themselves with software configuration, and not be bothered with hardware or basic operating system setup. In the pre-Cloud era, VPS providers were the “other people’s computers” that users outsourced their systems to.
                                                                                                                                                                                                                                                                                  The same shortcomings of cloud services apply to VPS providers. You don’t control the hardware. Your files are likely viewable by users up the directory hierarchy. The entropy source or pool is a single source for multiple systems. The same time drift applies to all time-keeping services.
                                                                                                                                                                                                                                                                                  Nevertheless, VPS services are often cheap and provide a good spread in terms of geography. All a provider really needs is a few server-grade computers and a decent network connection. VPS’s are still a gateway drug to bare-metal servers, although it seems more and more of these gateway users stop at stage one.
                                                                                                                                                                                                                                                                                  Cheap systems with a public IP are also a great way to tinker with a new operating system.
                                                                                                                                                                                                                                                                                  For this reason, TDP created this list of BSD VPS providers. Some explicitly deny running Tor as a server. Some just reference vague “proxy services.” Others don’t mention Tor or proxies at all.
                                                                                                                                                                                                                                                                                  The list is a start with currently just under 70 VPS providers listed. Input through various channels already started, and TDP intends to update the list over the coming months. A first draft email and open letter addressed to the providers were drafted, and we are looking to speak directly to at least some of the better-known BSD VPS providers.
                                                                                                                                                                                                                                                                                  We may be able to convince a few to allow public Tor relays, or at least published bridges. These providers could be new BSD users’ gateway drug into the world of BSD Tor nodes. Running a Tor relay shouldn’t be considered a particularly risky activity. Maybe we can adjust that perception.
                                                                                                                                                                                                                                                                                  Let us know any input via email or GitHub, and we’ll be glad to make updates.

                                                                                                                                                                                                                                                                                  Beastie Bits
                                                                                                                                                                                                                                                                                  • Avoid OS Detection with OpenBSD
                                                                                                                                                                                                                                                                                  • TrueOS update to fix updating
                                                                                                                                                                                                                                                                                  • MidnightBSD 0.8.5 VirtualBox Install
                                                                                                                                                                                                                                                                                  • BSD Pizza Night in Portland
                                                                                                                                                                                                                                                                                  • ***
                                                                                                                                                                                                                                                                                    Feedback/Questions
                                                                                                                                                                                                                                                                                    • Andrew - BSDCan videos?
                                                                                                                                                                                                                                                                                    • Marc - The Rock64 Board
                                                                                                                                                                                                                                                                                    • Jason - Follow up on UEFI and Bhyve
                                                                                                                                                                                                                                                                                    • Patrick - EFI booting
                                                                                                                                                                                                                                                                                    • ***
                                                                                                                                                                                                                                                                                      1 hr 14 min
                                                                                                                                                                                                                                                                                    • 204: WWF - Wayland, Weston, and FreeBSD

                                                                                                                                                                                                                                                                                      In this episode, we clear up the myth about scrub of death, look at Wayland and Weston on FreeBSD, Intel QuickAssist is here, and we check out OpenSMTP on OpenBSD.

                                                                                                                                                                                                                                                                                      This episode was brought to you by

                                                                                                                                                                                                                                                                                      Headlines
                                                                                                                                                                                                                                                                                      Matt Ahrens answers questions about the “Scrub of Death”
                                                                                                                                                                                                                                                                                      • In working on the breakdown of that ZFS article last week, Matt Ahrens contacted me and provided some answers he has given to questions in the past, allowing me to answer them using HIS exact words.
                                                                                                                                                                                                                                                                                      • “ZFS has an operation, called SCRUB, that is used to check all data in the pool and recover any data that is incorrect. However, if a bug which make errors on the pool persist (for example, a system with bad non-ecc RAM) then SCRUB can cause damage to a pool instead of recover it. I heard it called the “SCRUB of death” somewhere. Therefore, as far as I understand, using SCRUB without ECC memory is dangerous.”
                                                                                                                                                                                                                                                                                      • > I don't believe that is accurate. What is the proposed mechanism by which scrub can corrupt a lot of data, with non-ECC memory?
                                                                                                                                                                                                                                                                                        > ZFS repairs bad data by writing known good data to the bad location on disk. The checksum of the data has to verify correctly for it to be considered "good". An undetected memory error could change the in-memory checksum or data, causing ZFS to incorrectly think that the data on disk doesn’t match the checksum. In that case, ZFS would attempt to repair the data by first re-reading the same offset on disk, and then reading from any other available copies of the data (e.g. mirrors, ditto blocks, or RAIDZ reconstruction). If any of these attempts results in data that matches the checksum, then the data will be written on top of the (supposed) bad data. If the data was actually good, then overwriting it with the same good data doesn’t hurt anything.
                                                                                                                                                                                                                                                                                        > Let's look at what will happen with 3 types of errors with non-ECC memory:
                                                                                                                                                                                                                                                                                        > 1. Rare, random errors (e.g. particle strikes - say, less than one error per GB per second). If ZFS finds data that matches the checksum, then we know that we have the correct data (at least at that point in time, with probability 1-1/2256). If there are a lot of memory errors happening at a high rate, or if the in-memory checksum was corrupt, then ZFS won’t be able to find a good copy of the data , so it won’t do a repair write. It’s possible that the correctly-checksummed data is later corrupted in memory, before the repair write. However, the window of vulnerability is very very small - on the order of milliseconds between when the checksum is verified, and when the write to disk completes. It is implausible that this tiny window of memory vulnerability would be hit repeatedly.
                                                                                                                                                                                                                                                                                        > 2. Memory that pretty much never does the right thing. (e.g. huge rate of particle strikes, all memory always reads 0, etc). In this case, critical parts of kernel memory (e.g. instructions) will be immediately corrupted, causing the system to panic and not be able to boot again.
                                                                                                                                                                                                                                                                                        > 3. One or a few memory locations have "stuck bits", which always read 0 (or always read 1). This is the scenario discussed in the message which (I believe) originally started the "Scrub of Death" myth: https://forums.freenas.org/index.php?threads/ecc-vs-non-ecc-ram-and-zfs.15449/ This assumes that we read in some data from disk to a memory location with a stuck bit, "correct" that same bad memory location by overwriting the memory with the correct data, and then we write the bad memory location to disk. However, ZFS doesn't do that. (It seems the author thinks that ZFS uses parity, which it only does when using RAID-Z. Even with RAID-Z, we also verify the checksum, and we don't overwrite the bad memory location.)
                                                                                                                                                                                                                                                                                        > Here's what ZFS will actually do in this scenario: If ZFS reads data from disk into a memory location with a stuck bit, it will detect a checksum mismatch and try to find a good copy of the data to repair the "bad" disk. ZFS will allocate a new, different memory location to read a 2nd copy of the data, e.g. from the other side of a mirror (this happens near the end of dsl_scan_scrub_cb()). If the new memory location also has a stuck bit, then its checksum will also fail, so we won't use it to repair the "bad" disk. If the checksum of the 2nd copy of the data is correct, then we will write it to the "bad" disk. This write is unnecessary, because the "bad" disk is not really bad, but it is overwriting the good data with the same good data.
                                                                                                                                                                                                                                                                                        > I believe that this misunderstanding stems from the idea that ZFS fixes bad data by overwriting it in place with good data. In reality, ZFS overwrites the location on disk, using a different memory location for each read from disk. The "Scrub of Death" myth assumes that ZFS overwrites the location in memory, which it doesn't do.
                                                                                                                                                                                                                                                                                        > In summary, there's no plausible scenario where ZFS would amplify a small number of memory errors, causing a "scrub of death". Additionally, compared to other filesystems, ZFS checksums provide some additional protection against bad memory.
                                                                                                                                                                                                                                                                                      • “Is it true that ZFS verifies the checksum of every block on every read from disk?”
                                                                                                                                                                                                                                                                                      • > Yes
                                                                                                                                                                                                                                                                                      • “And if that block is incorrect, that ZFS will repair it?”
                                                                                                                                                                                                                                                                                      • > Yes
                                                                                                                                                                                                                                                                                      • “If yes, is it possible set options or flag for change that behavior? For example, I would like for ZFS to verify checksums during any read, but not change anything and only report about issues if it appears. Is it possible?”
                                                                                                                                                                                                                                                                                      • > There isn't any built-in flag for doing that. It wouldn't be hard to add one though.
                                                                                                                                                                                                                                                                                      • If you just wanted to verify data, without attempting to correct it, you could read or scan the data with the pool was imported read-only
                                                                                                                                                                                                                                                                                      • “If using a mirror, when a file is read, is it fully read and verified from both sides of the mirror?”
                                                                                                                                                                                                                                                                                      • > No, for performance purposes, each block is read from only one side of the mirror (assuming there is no checksum error).
                                                                                                                                                                                                                                                                                      • “What is the difference between a scrub and copying every file to /dev/null?”
                                                                                                                                                                                                                                                                                      • > That won't check all copies of the file (e.g. it won't check both sides of the mirror).
                                                                                                                                                                                                                                                                                        ***
                                                                                                                                                                                                                                                                                        Wayland, and Weston, and FreeBSD - Oh My!

                                                                                                                                                                                                                                                                                        KDE’s CI system for FreeBSD (that is, what upstream runs to continuously test KDE git code on the FreeBSD platform) is missing some bits and failing some tests because of Wayland. Or rather, because FreeBSD now has Wayland, but not Qt5-Wayland, and no Weston either (the reference implementation of a Wayland compositor).

                                                                                                                                                                                                                                                                                        Today I went hunting for the bits and pieces needed to make that happen. Fortunately, all the heavy lifting has already been done: there is a Weston port prepared and there was a Qt5-Wayland port well-hidden in the Area51 plasma5/ branch.
                                                                                                                                                                                                                                                                                        I have taken the liberty of pulling them into the Area51 repository as branch qtwayland. That way we can nudge Weston forward, and/or push Qt5-Wayland in separately. Nicest from a testing perspective is probably doing both at the same time.
                                                                                                                                                                                                                                                                                        I picked a random “Hello World” Wayland tutorial and also built a minimal Qt program (using QMessageBox::question, my favorite function to hate right now, because of its i18n characteristics). Then, setting XDG_RUNTIME_DIR to /tmp/xdg, I could start Weston (as an X11 client), wayland-hello (as a Wayland client, displaying in Weston) and qt-hello (as either an X11 client, or as a Wayland client).
                                                                                                                                                                                                                                                                                        So this gives users of Area51 (while shuffling branches, granted) a modern desktop and modern display capabilities. Oh my!
                                                                                                                                                                                                                                                                                        It will take a few days for this to trickle up and/or down so that the CI can benefit and we can make sure that KWin’s tests all work on FreeBSD, but it’s another good step towards tight CI and another small step towards KDE Plasma 5 on the desktop on FreeBSD.

                                                                                                                                                                                                                                                                                        pkgsrcCon 2017 report

                                                                                                                                                                                                                                                                                        This years pkgsrcCon returned to London once again. It was last held in London back in 2014. The 2014 con was the first pkgsrcCon I attended, I had been working on Darwin/PowerPC fixes for some months and presented on the progress I'd made with a 12" G4 PowerBook. I took away a G4 Mac Mini that day to help spare the PowerBook for use and dedicate a machine for build and testing. The offer of PowerPC hardware donations was repeated at this years con, thanks to jperkin@ who showed up with a backpack full of Mac Minis (more on that later).

                                                                                                                                                                                                                                                                                        Since 2014 we have held cons in Berlin (2015) & Krakow (2016). In Krakow we had talks about a wide range of projects over 2 days, from Haiku Ports to Common Lisp to midipix (building native PE binaries for Windows) and back to the BSDs. I was very pleased to continue the theme of a diverse program this year.
                                                                                                                                                                                                                                                                                        Aside from pkgsrc and NetBSD, we had talks about FreeBSD, OpenBSD, Slackware Linux, and Plan 9. Things began with a pub gathering on the Friday for the pre-con social, we hung out and chatted till almost midnight on a wide range of topics, such as supporting a system using NFS on MS-DOS, the origins of pdksh, corporate IT, culture and many other topics.
                                                                                                                                                                                                                                                                                        On parting I was asked about the starting time on Saturday as there was some conflicting information. I learnt that the registration email had stated a later start than I had scheduled for & advertised on the website, by 30 minutes. Lesson learnt: register for your own event! Not a problem, I still needed to setup a webpage for the live video stream, I could do both when I got back. With some trimming here and there I had a new schedule, I posted that to the pkgsrcCon website and moved to trying to setup a basic web page which contained a snippet of javascript to play a live video stream from Scale Engine. 2+ hours later, it was pointed out that the XSS protection headers on pkgsrc.org breaks the functionality. Thanks to jmcneill@ for debugging and providing a working page.
                                                                                                                                                                                                                                                                                        Saturday started off with Giovanni Bechis speaking about pledge in OpenBSD and adding support to various packages in their ports tree, alnsn@ then spoke about installing packages from a repo hosted on the Tor network.
                                                                                                                                                                                                                                                                                        After a quick coffee break we were back to hear Charles Forsyth speak about how Plan 9 and Inferno dealt with portability, building software and the problem which are avoided by the environment there. This was followed by a very energetic rant by David Spencer from the Slackbuilds project on packaging 3rd party software. Slackbuilds is a packaging system for Slackware Linux, which was inspired by FreeBSD ports.
                                                                                                                                                                                                                                                                                        For the first slot after lunch, agc@ gave a talk on the early history of pkgsrc followed by Thomas Merkel on using vagrant to test pkgsrc changes with ease, locally, using vagrant. khorben@ covered his work on adding security to pkgsrc and bsiegert@ covered the benefits of performing our bulk builds in the cloud and the challenges we currently face.
                                                                                                                                                                                                                                                                                        My talk was about some topics and ideas which had inspired me or caught my attention, and how it could maybe apply to my work.The title of the talk was taken from the name of Andrew Weatherall's Saint Etienne remix, possibly referring to two different styles of track (dub & vocal) merged into one or something else. I meant it in terms of applicability of thoughts and ideas. After me, agc@ gave a second talk on the evolution of the Netflix Open Connect appliance which runs FreeBSD and Vsevolod Stakhov wrapped up the day with a talk about the technical implementation details of the successor to pkg_tools in FreeBSD, called pkg, and how it could be of benefit for pkgsrc.
                                                                                                                                                                                                                                                                                        For day 2 we gathered for a hack day at the London Hack Space.
                                                                                                                                                                                                                                                                                        I had burn't some some CD of the most recent macppc builds of NetBSD 8.0_BETA and -current to install and upgrade Mac Minis. I setup the donated G4 minis for everyone in a dual-boot configuration and moved on to taking apart my MacBook Air to inspect the wifi adapter as I wanted to replace it with something which works on FreeBSD. It was not clear from the ifixit teardown photos of cards size, it seemed like a normal mini-PCIe card but it turned out to be far smaller. Thomas had also had the same card in his and we are not alone. Thomas has started putting together a driver for the Broadcom card, the project is still in its early days and lacks support for encrypted networks but hopefully it will appear on review.freebsd.org in the future.
                                                                                                                                                                                                                                                                                        weidi@ worked on fixing SunOS bugs in various packages and later in the night we setup a NetBSD/macppc bulk build environment together on his Mac Mini.
                                                                                                                                                                                                                                                                                        Thomas setup an OpenGrock instance to index the source code of all the software available for packaging in pkgsrc. This helps make the evaluation of changes easier and the scope of impact a little quicker without having to run through a potentially lengthy bulk build with a change in mind to realise the impact. bsiegert@ cleared his ticket and email backlog for pkgsrc and alnsn@ got NetBSD/evbmips64-eb booting on his EdgeRouter Lite.
                                                                                                                                                                                                                                                                                        On Monday we reconvened at the Hack Space again and worked some more. I started putting together the talks page with the details from Saturday and the the slides which I had received, in preparation for the videos which would come later in the week. By 3pm pkgsrcCon was over. I was pretty exhausted but really pleased to have had a few days of techie fun.
                                                                                                                                                                                                                                                                                        Many thanks to The NetBSD Foundation for purchasing a camera to use for streaming the event and a speedy response all round by the board. The Open Source Specialist Group at BCS, The Chartered Institute for IT and the London Hack Space for hosting us. Scale Engine for providing streaming facility. weidi@ for hosting the recorded videos. Allan Jude for pointers, Jared McNeill for debugging, NYCBUG and Patrick McEvoy for tips on streaming, the attendees and speakers. This year we had speakers from USA, Italy, Germany and London E2. Looking forward to pkgsrcCon 2018!
                                                                                                                                                                                                                                                                                        The videos and slides are available here and the Internet Archive.

                                                                                                                                                                                                                                                                                        News Roundup
                                                                                                                                                                                                                                                                                        QuickAssist Driver for FreeBSD is here and pfSense Support Coming

                                                                                                                                                                                                                                                                                        This week we have something that STH readers will be excited about. Before I started writing for STH, I was a reader and had been longing for QuickAssist support ever since STH’s first Rangeley article over three and a half years ago. It was clear from the get-go that Rangeley was going to be the preeminent firewall appliance platform of its day. The scope of products that were impacted by the Intel Atom C2000 series bug showed us it was indeed. For my personal firewalls, I use pfSense on that Rangeley platform so I have been waiting to use QuickAssist with my hardware for almost an entire product generation.

                                                                                                                                                                                                                                                                                        • New Hardware and QuickAssist Incoming to pfSense (Finally)
                                                                                                                                                                                                                                                                                        • pfSense (and a few other firewalls) are based on FreeBSD. FreeBSD tends to lag driver support behind mainstream Linux but it is popular for embedded security appliances. While STH is the only site to have done QuickAssist benchmarks for OpenSSL and IPSec VPNs pre-Skylake, we expect more platforms to use it now that the new Intel Xeon Scalable Processor Family is out. With the Xeon Scalable platforms, the “Lewisburg” PCH has QuickAssist options of up to 100Gbps, or 2.5x faster than the previous generation add-in cards we tested (40Gbps.) We now have more and better hardware for QAT, but we were still devoid of a viable FreeBSD QAT driver from Intel. That has changed.
                                                                                                                                                                                                                                                                                          Our Intel Xeon Scalable Processor Family (Skylake-SP) Launch Coverage Central has been the focus of the STH team’s attention this week. There was another important update from Intel that got buried, a publicly available Intel QuickAssist driver for FreeBSD. You can find the driver on 01.org here dated July 12, 2017.
                                                                                                                                                                                                                                                                                          Drivers are great, but we still need support to be enabled in the OS and at the application layer. Patrick forwarded me this tweet from Jim Thompson (lead at Netgate the company behind pfSense):
                                                                                                                                                                                                                                                                                          The Netgate team has been a key company pushing QuickAssist appliances in the market, usually based on Linux. To see that QAT is coming to FreeBSD and that they were working to integrate into “pfSense soon” is more than welcome.
                                                                                                                                                                                                                                                                                          For STH readers, get ready. It appears to be actually and finally happening. QuickAssist on FreeBSD and pfSense
                                                                                                                                                                                                                                                                                          ***
                                                                                                                                                                                                                                                                                          OpenBSD on the Huawei MateBook X

                                                                                                                                                                                                                                                                                          The Huawei MateBook X is a high-quality 13" ultra-thin laptop with a fanless Core i5 processor. It is obviously biting the design of the Apple 12" MacBook, but it does have some notable improvements such as a slightly larger screen, a more usable keyboard with adequate key travel, and 2 USB-C ports.

                                                                                                                                                                                                                                                                                          It also uses more standard PC components than the MacBook, such as a PS/2-connected keyboard, removable m.2 WiFi card, etc., so its OpenBSD compatibility is quite good.
                                                                                                                                                                                                                                                                                          In contrast to the Xiaomi Mi Air, the MateBook is actually sold (2) in the US and comes with a full warranty and much higher build quality (though at twice the price). It is offered in the US in a "space gray" color for the Core i5 model and a gold color for the Core i7.
                                                                                                                                                                                                                                                                                          The fanless Core i5 processor feels snappy and doesn't get warm during normal usage on OpenBSD. Doing a make -j4 build at full CPU speed does cause the laptop to get warm, though the palmrest maintains a usable temperature.
                                                                                                                                                                                                                                                                                          The chassis is all aluminum and has excellent rigidity in the keyboard area. The 13.0" 2160x1440 glossy IPS "Gorilla glass" screen has a very small bezel and its hinge is properly weighted to allow opening the lid with one hand. There is no wobble in the screen when open, even when jostling the desk that the laptop sits on. It has a reported brightness of 350 nits.
                                                                                                                                                                                                                                                                                          I did not experience any of the UEFI boot variable problems that I did with the Xiaomi, and the MateBook booted quickly into OpenBSD after re-initializing the GPT table during installation.

                                                                                                                                                                                                                                                                                          OpenSMTPD under OpenBSD with SSL/VirtualUsers/Dovecot
                                                                                                                                                                                                                                                                                          • During the 2013 AsiaBSDCon, the team of OpenBSD presented its mail solution named OpenSMTPD.
                                                                                                                                                                                                                                                                                          • Developed by the OpenBSD team, we find the so much appreciated philosophy of its developers : security, simplicity / clarity and advanced features.
                                                                                                                                                                                                                                                                                          • Basic configuration : OpenSMTPD is installed by default, we can immediately start with a simple configuration.
                                                                                                                                                                                                                                                                                          • > We listen on our interfaces, we specify the path of our aliases file so we can manage redirections.
                                                                                                                                                                                                                                                                                            > Mails will be delivered for the domain cagedmonster.net to mbox (the local users mailbox), same for the aliases.
                                                                                                                                                                                                                                                                                            > Finally, we accept to relay local mails exclusively.
                                                                                                                                                                                                                                                                                            > We can now enable smtpd at system startup and start the daemon.
                                                                                                                                                                                                                                                                                          • Advanced configuration including TLS :
                                                                                                                                                                                                                                                                                            • You can use SSL with : A self-signed certificate (which will not be trusted) or a certificate generated by a trusted authority. LetsEncrypt uses Certbot to generated your certificate. You can check this page for further informations. Let's focus on the first.
                                                                                                                                                                                                                                                                                            • Generation of the certificate :
                                                                                                                                                                                                                                                                                            • We fix the permissions :
                                                                                                                                                                                                                                                                                            • We edit the config file :
                                                                                                                                                                                                                                                                                            • > We have a mail server with SSL, it's time to configure our IMAP server, Dovecot, and manage the creation of virtual users.
                                                                                                                                                                                                                                                                                            • Dovecot setup, and creation of Virtual Users : We will use the package system of OpenBSD, so please check the configuration of your /etc/pkg.conf file.
                                                                                                                                                                                                                                                                                              • Enable the service at system startup :
                                                                                                                                                                                                                                                                                              • Setup the Virtual Users structure :
                                                                                                                                                                                                                                                                                              • Adding the passwd table for smtpd :
                                                                                                                                                                                                                                                                                              • Modification of the OpenSMTPD configuration :
                                                                                                                                                                                                                                                                                              • We declare the files used for our Virtual Accounts, we include SSL, and we configure mails delivery via the Dovecot lmtp socket.
                                                                                                                                                                                                                                                                                              • We'll create our user [email protected] and set its password.
                                                                                                                                                                                                                                                                                              • Configure SSL
                                                                                                                                                                                                                                                                                              • Configure dovecot.conf
                                                                                                                                                                                                                                                                                              • Configure mail.con
                                                                                                                                                                                                                                                                                              • Configure login.conf : Make sure that the value of openfiles-cur in /etc/login.conf is equal or superior of 1000 !
                                                                                                                                                                                                                                                                                              • Starting Dovecot
                                                                                                                                                                                                                                                                                              • ***
                                                                                                                                                                                                                                                                                                OpenSMTPD and Dovecot under OpenBSD with MySQL support and SPAMD

                                                                                                                                                                                                                                                                                                This article is the continuation of my previous tutorial OpenSMTPD under OpenBSD with SSL/VirtualUsers/Dovecot. We'll use the same configuration and add some features so we can :

                                                                                                                                                                                                                                                                                                Use our domains, aliases, virtual users with a MySQL database (MariaDB under OpenBSD).
                                                                                                                                                                                                                                                                                                Deploy SPAMD with OpenSMTPD for a strong antispam solution.

                                                                                                                                                                                                                                                                                                • Setup of the MySQL support for OpenSMTPD & Dovecot
                                                                                                                                                                                                                                                                                                • We create our SQL database named « smtpd »
                                                                                                                                                                                                                                                                                                • We create our SQL user « opensmtpd » we give him the privileges on our SQL database and we set its password
                                                                                                                                                                                                                                                                                                • We create the structure of our SQL database
                                                                                                                                                                                                                                                                                                • We generate our password with Blowfish (remember it's OpenBSD !) for our users
                                                                                                                                                                                                                                                                                                • We create our tables and we include our datas
                                                                                                                                                                                                                                                                                                • We push everything to our database
                                                                                                                                                                                                                                                                                                • Time to configure OpenSMTPD
                                                                                                                                                                                                                                                                                                • We create our mysql.conf file and configure it
                                                                                                                                                                                                                                                                                                • Configuration of Dovecot.conf
                                                                                                                                                                                                                                                                                                • Configuration of auth-sql.conf.ext
                                                                                                                                                                                                                                                                                                • Configuration of dovecot-sql.conf.ext
                                                                                                                                                                                                                                                                                                • Restart our services
                                                                                                                                                                                                                                                                                                • OpenSMTPD & SPAMD :
                                                                                                                                                                                                                                                                                                  SPAMD is a service simulating a fake SMTP server and relying on strict compliance with RFC to determine whether the server delivering a mail is a spammer or not.
                                                                                                                                                                                                                                                                                                • Configuration of SPAMD :
                                                                                                                                                                                                                                                                                                • Enable SPAMD & SPAMLOGD at system startup :
                                                                                                                                                                                                                                                                                                • Configuration of SPAMD flags
                                                                                                                                                                                                                                                                                                • Configuration of PacketFilter
                                                                                                                                                                                                                                                                                                • Configuration of SPAMD
                                                                                                                                                                                                                                                                                                • Start SPAMD & SPAMLOGD
                                                                                                                                                                                                                                                                                                • ***
                                                                                                                                                                                                                                                                                                  ###Running a TOR relay on FreeBSD
                                                                                                                                                                                                                                                                                                • There are 2 main steps to getting a TOR relay working on FreeBSD:
                                                                                                                                                                                                                                                                                                  • Installing and configuring Tor
                                                                                                                                                                                                                                                                                                  • Using an edge router to do port translation
                                                                                                                                                                                                                                                                                                  • In my case I wanted TOR to run it’s services on ports 80 and 443 but any port under 1024 requires root access in UNIX systems.
                                                                                                                                                                                                                                                                                                  • +So I used port mapping on my router to map the ports.
                                                                                                                                                                                                                                                                                                    +Begin by installing TOR and ARM from:
                                                                                                                                                                                                                                                                                                    /usr/ports/security/tor/
                                                                                                                                                                                                                                                                                                    /usr/ports/security/arm/
                                                                                                                                                                                                                                                                                                  • Arm is the Anonymizing Relay Monitor: https://www.torproject.org/projects/arm.html.en
                                                                                                                                                                                                                                                                                                  • It provides useful monitoring graph and can be used to configure the torrc file.
                                                                                                                                                                                                                                                                                                  • Next step edit the torrc file (see Blog article for the edit)
                                                                                                                                                                                                                                                                                                  • It is handy to add the following lines to /etc/services so you can more easily modify your pf configuration.
                                                                                                                                                                                                                                                                                                  • torproxy 9050/tcp #torsocks
                                                                                                                                                                                                                                                                                                    torOR 9090/tcp #torOR
                                                                                                                                                                                                                                                                                                    torDIR 9099/tcp #torDIR
                                                                                                                                                                                                                                                                                                  • To allow TOR services my pf.conf has the following lines:
                                                                                                                                                                                                                                                                                                  • # interfaces
                                                                                                                                                                                                                                                                                                    lan_if=”re0″
                                                                                                                                                                                                                                                                                                    wifi_if=”wlan0″
                                                                                                                                                                                                                                                                                                    interfaces=”{wlan0,re0}”
                                                                                                                                                                                                                                                                                                    tcp_services = “{ ssh torproxy torOR torDIR }”
                                                                                                                                                                                                                                                                                                    # options
                                                                                                                                                                                                                                                                                                    set block-policy drop
                                                                                                                                                                                                                                                                                                    set loginterface $lan_if
                                                                                                                                                                                                                                                                                                    # pass on lo
                                                                                                                                                                                                                                                                                                    set skip on lo
                                                                                                                                                                                                                                                                                                    scrub in on $lan_if all fragment reassemble
                                                                                                                                                                                                                                                                                                    # NAT
                                                                                                                                                                                                                                                                                                    nat on $lan_if from $wifi_if:network to !($lan_if) -> ($lan_if)
                                                                                                                                                                                                                                                                                                    block all
                                                                                                                                                                                                                                                                                                    antispoof for $interfaces
                                                                                                                                                                                                                                                                                                    #In NAT
                                                                                                                                                                                                                                                                                                    pass in log on $wifi_if inet
                                                                                                                                                                                                                                                                                                    pass out all keep state
                                                                                                                                                                                                                                                                                                    #ICMP
                                                                                                                                                                                                                                                                                                    pass out log inet proto icmp from any to any keep state
                                                                                                                                                                                                                                                                                                    pass in log quick inet proto icmp from any to any keep state
                                                                                                                                                                                                                                                                                                    #SSH
                                                                                                                                                                                                                                                                                                    pass in inet proto tcp to $lan_if port ssh
                                                                                                                                                                                                                                                                                                    pass in inet proto tcp to $wifi_if port ssh
                                                                                                                                                                                                                                                                                                    #TCP Services on Server
                                                                                                                                                                                                                                                                                                    pass in inet proto tcp to $interfaces port $tcp_services keep state
                                                                                                                                                                                                                                                                                                  • The finally part is mapping the ports as follows:
                                                                                                                                                                                                                                                                                                  • TOR directory port: LANIP:9099 —> WANIP:80
                                                                                                                                                                                                                                                                                                    TOR router port: LANIP:9090 —-> WANIP:443
                                                                                                                                                                                                                                                                                                  • Now enable TOR:
                                                                                                                                                                                                                                                                                                  • $ sudo echo “tor_enable=YES” >> /etc/rc.conf
                                                                                                                                                                                                                                                                                                  • Start TOR:
                                                                                                                                                                                                                                                                                                  • $ sudo service tor start
                                                                                                                                                                                                                                                                                                    ***
                                                                                                                                                                                                                                                                                                    Beastie Bits

                                                                                                                                                                                                                                                                                                    OpenBSD as a “Desktop” (Laptop)

                                                                                                                                                                                                                                                                                                    Sascha Wildner has updated ACPICA in DragonFly to Intel’s version 20170629
                                                                                                                                                                                                                                                                                                    Dport, Rust, and updates for DragonFlyBSD
                                                                                                                                                                                                                                                                                                    OPNsense 17.7 RC1 released
                                                                                                                                                                                                                                                                                                    Unix’s mysterious && and ||
                                                                                                                                                                                                                                                                                                    The Commute Deck : A Homebrew Unix terminal for tight places
                                                                                                                                                                                                                                                                                                    FreeBSD 11.1-RC3 now available
                                                                                                                                                                                                                                                                                                    Installing DragonFlyBSD with ORCA when you’re totally blind
                                                                                                                                                                                                                                                                                                    Who says FreeBSD can’t look good
                                                                                                                                                                                                                                                                                                    Pratik Vyas adds the ability to do paused VM migrations for VMM

                                                                                                                                                                                                                                                                                                    Feedback/Questions

                                                                                                                                                                                                                                                                                                    Hrvoje - OpenBSD MP Networking

                                                                                                                                                                                                                                                                                                    Goran - debuggers
                                                                                                                                                                                                                                                                                                    Abhinav - man-k
                                                                                                                                                                                                                                                                                                    Liam - university setup

                                                                                                                                                                                                                                                                                                    1 hr 22 min
                                                                                                                                                                                                                                                                                                  • 203: For the love of ZFS

                                                                                                                                                                                                                                                                                                    This week on BSD Now, we clear up some ZFS FUD, show you how to write a NetBSD kernel module, and cover DragonflyBSD on the desktop.

                                                                                                                                                                                                                                                                                                    This episode was brought to you by

                                                                                                                                                                                                                                                                                                    Headlines
                                                                                                                                                                                                                                                                                                    ZFS is the best file system (for now)
                                                                                                                                                                                                                                                                                                    • In my ongoing effort to fight misinformation and FUD about ZFS, I would like to go through this post in detail and share my thoughts on the current state and future of OpenZFS.
                                                                                                                                                                                                                                                                                                    • The post starts with:
                                                                                                                                                                                                                                                                                                    • ZFS should have been great, but I kind of hate it: ZFS seems to be trapped in the past, before it was sidelined it as the cool storage project of choice; it’s inflexible; it lacks modern flash integration; and it’s not directly supported by most operating systems. But I put all my valuable data on ZFS because it simply offers the best level of data protection in a small office/home office (SOHO) environment. Here’s why.

                                                                                                                                                                                                                                                                                                      When ZFS first appeared in 2005, it was absolutely with the times, but it’s remained stuck there ever since. The ZFS engineers did a lot right when they combined the best features of a volume manager with a “zettabyte-scale” filesystem in Solaris 10
                                                                                                                                                                                                                                                                                                      The skies first darkened in 2007, as NetApp sued Sun, claiming that their WAFL patents were infringed by ZFS. Sun counter-sued later that year, and the legal issues dragged on.

                                                                                                                                                                                                                                                                                                      • The lawsuit was resolved, and it didn’t really impede ZFS. Some say it is the reason that Apple didn’t go with ZFS, but there are other theories too.
                                                                                                                                                                                                                                                                                                      • By then, Sun was hitting hard times and Oracle swooped in to purchase the company. This sowed further doubt about the future of ZFS, since Oracle did not enjoy wide support from open source advocates.

                                                                                                                                                                                                                                                                                                        • Yes, Oracle taking over Sun and closing the source for ZFS definitely seemed like a setback at the time, but the OpenZFS project was started and active development has continued as an ever increasing pace. As of today, more than half of the code in OpenZFS has been written since the fork from the last open version of Oracle ZFS.
                                                                                                                                                                                                                                                                                                        • the CDDL license Sun applied to the ZFS code was [https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/](judged incompatible) with the GPLv2 that covers Linux, making it a non-starter for inclusion in the world’s server operating system.

                                                                                                                                                                                                                                                                                                          • That hasn’t stopped the ZFS-on-Linux project, or Ubuntu…
                                                                                                                                                                                                                                                                                                          • Although OpenSolaris continued after the Oracle acquisition, and FreeBSD embraced ZFS, this was pretty much the extent of its impact outside the enterprise. Sure, NexentaStor and [http://blog.fosketts.net/2008/09/15/greenbytes-embraces-extends-zfs/](GreenBytes) helped push ZFS forward in the enterprise, but Oracle’s lackluster commitment to Sun in the datacenter started having an impact.

                                                                                                                                                                                                                                                                                                            • Lots of companies have adopted OpenZFS for their products. Before OpenZFS, there were very few non-Sun appliances that used ZFS, now there are plenty.
                                                                                                                                                                                                                                                                                                            • OpenZFS Wiki: Companies with products based on OpenZFS
                                                                                                                                                                                                                                                                                                            • OpenZFS remains little-changed from what we had a decade ago.

                                                                                                                                                                                                                                                                                                              • Other than the fact that half of the current code did not exist a decade ago…
                                                                                                                                                                                                                                                                                                              • Many remain skeptical of deduplication, which hogs expensive RAM in the best-case scenario.

                                                                                                                                                                                                                                                                                                                • This is one of the weaker points in ZFS. As it turns out, the demand for deduplication is actually not that strong. Most of the win can be had with transparent compression.
                                                                                                                                                                                                                                                                                                                • However, there are a number of suggested designs to work around the dedup problems:
                                                                                                                                                                                                                                                                                                                  • Dedup Ceiling: Set a limit on the side of the DDT and just stop deduping new unique blocks when this limit is reached.
                                                                                                                                                                                                                                                                                                                  • Allocation Classes: A feature being developed by Intel for a supercomputer, will allow different types of data to be classified, and dedicated vdevs (or even metaslabs within a vdev), to be dedicated to that class of data. This could be extended to having the DDT live on a fast device like an PCIe NVMe, combined with the Dedup Ceiling when the device is full.
                                                                                                                                                                                                                                                                                                                  • DDT Pruning: Matt Ahrens described a design where items in the DDT with only a single reference, would be expired in an LRU type fashion, to allow newer blocks to live in the DDT in hopes that they would end up with more than a single reference. This doesn’t cause bookkeeping problems since when a block is about to be freed, if it is NOT listed in the DDT, ZFS knows it was never deduplicated, so the current block must be the only reference, and it can safely be freed. This provides a best case scenario compared to Dedup Ceiling, since blocks that will deduplicate well, are likely to be written relatively close together, whereas the chance to a dedup match on a very old block is much lower.
                                                                                                                                                                                                                                                                                                                  • And I do mean expensive: Pretty much every ZFS FAQ flatly declares that ECC RAM is a must-have and 8 GB is the bare minimum. In my own experience with FreeNAS, 32 GB is a nice amount for an active small ZFS server, and this costs $200-$300 even at today’s prices.

                                                                                                                                                                                                                                                                                                                    • As we talked about a few weeks ago, ECC is best, but it is not required. If you want your server to stay up for a long time, to be highly available, you’ll put ECC in it. Don’t let a lack of ECC stop you from using ZFS, you are just putting your data at more risk. The scrub of death is a myth.
                                                                                                                                                                                                                                                                                                                    • ZFS does not ‘require’ lots of ram. Your NAS will work happily with 8 GB instead of 32 GB of RAM. Its cache hit ratio will be much lower, so performance will be worse. It won’t be able to buffer as many writes, so performance will be worse.
                                                                                                                                                                                                                                                                                                                    • Copy-on-Write has some drawbacks, data tends to get scattered and fragmented across the drives when it is written gradually. The ARC (RAM Cache) lessens the pain of this, and allows ZFS to batch incoming writes up into nice contiguous writes. ZFS purposely alternates between reading and writing, since both are faster when the other is not happening. So writes are batched up until there is too much dirty data, or the timeout expires. Then reads are held off while the bulk linear write finishes as quickly as possible, and reads are resumed.
                                                                                                                                                                                                                                                                                                                    • Obviously all of this works better and more efficiently in larger batches, which you can do if you have more RAM.
                                                                                                                                                                                                                                                                                                                    • ZFS can be tuned to use less RAM, and if you do not have a lot of RAM, or you have a lot of other demand on your RAM, you should do that tuning.
                                                                                                                                                                                                                                                                                                                    • And ZFS never really adapted to today’s world of widely-available flash storage: Although flash can be used to support the ZIL and L2ARC caches, these are of dubious value in a system with sufficient RAM, and ZFS has no true hybrid storage capability. It’s laughable that the ZFS documentation obsesses over a few GB of SLC flash when multi-TB 3D NAND drives are on the market. And no one is talking about NVMe even though it’s everywhere in performance PC’s.

                                                                                                                                                                                                                                                                                                                      • Make up your mind, is 32GB of ram too expensive or not…
                                                                                                                                                                                                                                                                                                                      • the L2ARC exists specifically for the case where it is not possible to just install more RAM. Be it because there are no more slots, of limits of the processor, or limits of your budget.
                                                                                                                                                                                                                                                                                                                      • The SLOG is optional, but it never needs to be very big. A number of GBs of SLC flash is all you need, it is only holding writes that have not been flushed to the regular storage devices yet. The reason the documentation talks about SLC specifically is because your SLOG needs a very high write endurance, something never the newest NVMe devices cannot yet provide.
                                                                                                                                                                                                                                                                                                                      • Of course you can use NVMe devices with ZFS, lots of people do. All flash ZFS arrays are for sale right now. Other than maybe a little tuning of the device queue depths, ZFS just works and there is nothing to think about.
                                                                                                                                                                                                                                                                                                                      • However, to say there is nothing happening in this space is woefully inaccurate.
                                                                                                                                                                                                                                                                                                                      • The previously mentioned allocation classes code can be used to allocate metadata (4 KB blocks) on SSD or NVMe, while allocating bulk storage data (up to 16 MB blocks) on spinning disks. Extended a bit beyond what Intel is building for their super computer, this will basically create hybrid storage for ZFS.
                                                                                                                                                                                                                                                                                                                      • With the metaslab classes feature, it will even be possible to mix classes on the same device, grouping small allocations and large allocations in different areas, decreasing fragmentation.
                                                                                                                                                                                                                                                                                                                      • Then there’s the question of flexibility, or lack thereof. Once you build a ZFS volume, it’s pretty much fixed for life. There are only three ways to expand a storage pool:

                                                                                                                                                                                                                                                                                                                        1. Replace each and every drive in the pool with a larger one (which is great but limiting and expensive)
                                                                                                                                                                                                                                                                                                                          • It depends on your pool layout. If you design with this in mind using ZFS Mirrors, it can be quite useful
                                                                                                                                                                                                                                                                                                                            1. Add a stripe on another set of drives (which can lead to imbalanced performance and redundancy and a whole world of potential stupid stuff)
                                                                                                                                                                                                                                                                                                                              • The unbalanced LUNs performance issues were sorted out in 2013-2016.
                                                                                                                                                                                                                                                                                                                              • 2014: OpenZFS Allocation Performance
                                                                                                                                                                                                                                                                                                                              • 2016: OpenZFS space allocation: doubling performance on large and fragmented pools
                                                                                                                                                                                                                                                                                                                              • These also mostly solved the performance issues when a pool gets full, you can run a lot closer to the edge now
                                                                                                                                                                                                                                                                                                                                1. Build a new pool and “zfs send” your datasets to it (which is what I do, even though it’s kind of tricky)
                                                                                                                                                                                                                                                                                                                                  • This is one way to do it, yes.
                                                                                                                                                                                                                                                                                                                                  • There is another way coming, but I can’t talk about it just yet. Look for big news later this year.
                                                                                                                                                                                                                                                                                                                                  • Apart from option 3 above, you can’t shrink a ZFS pool.

                                                                                                                                                                                                                                                                                                                                    • Device removal is arriving now. It will not work for RAIDZ*, but for Mirrors and Stripes you will be able to remove a device.
                                                                                                                                                                                                                                                                                                                                    • I’ve probably made ZFS sound pretty unappealing right about now. It was revolutionary but now it’s startlingly limiting and out of touch with the present solid-state-dominated storage world.

                                                                                                                                                                                                                                                                                                                                      • I don’t feel like ZFS is out of touch with solid state. Lots of people are running SSD only pools. I will admit the tiered storage options in ZFS are a bit limited still, but there is a lot of work being done to overcome this.
                                                                                                                                                                                                                                                                                                                                      • After all, reliably storing data is the only thing a storage system really has to do. All my important data goes on ZFS, from photos to music and movies to office files. It’s going to be a long time before I trust anything other than ZFS!

                                                                                                                                                                                                                                                                                                                                        • I agree.
                                                                                                                                                                                                                                                                                                                                        • ZFS has a great track record of doing its most important job, keeping your data safe.
                                                                                                                                                                                                                                                                                                                                        • Work is ongoing to make ZFS more performance, and more flexible. The import thing is that this work is never allowed to compromise job #1, keeping your data safe.
                                                                                                                                                                                                                                                                                                                                        • Hybrid/tiered storage features, re-RAID-ing, are coming
                                                                                                                                                                                                                                                                                                                                        • There is a lot going on with OpenZFS, check out the notes from the last two OpenZFS Developer Summits just to get an idea of what some of those things are:
                                                                                                                                                                                                                                                                                                                                        • 2015 & 2016

                                                                                                                                                                                                                                                                                                                                          • Some highlights:

                                                                                                                                                                                                                                                                                                                                            • Compressed ARC
                                                                                                                                                                                                                                                                                                                                            • Compressed send/recv
                                                                                                                                                                                                                                                                                                                                            • ABD (arc buf scatter/gather)
                                                                                                                                                                                                                                                                                                                                            • ZFS Native Encryption (scrub/resilver, send/recv, etc without encryption keys loaded)
                                                                                                                                                                                                                                                                                                                                            • Channel Programs (do many administrative operations as one atomic transaction)
                                                                                                                                                                                                                                                                                                                                            • Device Removal
                                                                                                                                                                                                                                                                                                                                            • Redacted send/recv
                                                                                                                                                                                                                                                                                                                                            • ZStandard Compression
                                                                                                                                                                                                                                                                                                                                            • TRIM Support (FreeBSD has its own, but this will be more performant and universal)
                                                                                                                                                                                                                                                                                                                                            • Faster Scrub/Resilver
                                                                                                                                                                                                                                                                                                                                            • Declustered RAID
                                                                                                                                                                                                                                                                                                                                            • Allocation Classes
                                                                                                                                                                                                                                                                                                                                            • Multi-mount protection (for Active/Passive failover)
                                                                                                                                                                                                                                                                                                                                            • Zpool Checkpoint (undo almost anything)
                                                                                                                                                                                                                                                                                                                                            • Even more Improved Allocator Performance
                                                                                                                                                                                                                                                                                                                                            • vdev spacemap log
                                                                                                                                                                                                                                                                                                                                            • ZIL performance improvements (w/ or w/o SLOG)
                                                                                                                                                                                                                                                                                                                                            • Persistent L2ARC
                                                                                                                                                                                                                                                                                                                                            • What I don’t think the author of this article understands is how far behind every other filesystem is. 100s of Engineer years have gone into OpenZFS, and the pace is accelerating. I don’t see how BtrFS can ever catch up, without a huge cash infusion.

                                                                                                                                                                                                                                                                                                                                            • Writing a NetBSD kernel module

                                                                                                                                                                                                                                                                                                                                              Kernel modules are object files used to extend an operating system’s kernel functionality at run time.

                                                                                                                                                                                                                                                                                                                                              In this post, we’ll look at implementing a simple character device driver as a kernel module in NetBSD. Once it is loaded, userspace processes will be able to write an arbitrary byte string to the device, and on every successive read expect a cryptographically-secure pseudorandom permutation of the original byte string.

                                                                                                                                                                                                                                                                                                                                              • You will need the NetBSD Source Code.
                                                                                                                                                                                                                                                                                                                                                • This doc will explain how you can get it.
                                                                                                                                                                                                                                                                                                                                                • The article gives an easy line by line walkthrough which is easy to follow and understand.
                                                                                                                                                                                                                                                                                                                                                • The driver implements the bare minimum: open, close, read, and write, plus the module initialization function
                                                                                                                                                                                                                                                                                                                                                • It explains the differences in how memory is allocated and freed in the kernel
                                                                                                                                                                                                                                                                                                                                                • It also describes the process of using UIO to copy data back and forth between userspace and the kernel
                                                                                                                                                                                                                                                                                                                                                • Create a Makefile, and compile the kernel module
                                                                                                                                                                                                                                                                                                                                                • Then, create a simple userspace program to use the character device that the kernel module creates
                                                                                                                                                                                                                                                                                                                                                • All the code is available here
                                                                                                                                                                                                                                                                                                                                                • ***
                                                                                                                                                                                                                                                                                                                                                  DragonFlyBSD Desktop!

                                                                                                                                                                                                                                                                                                                                                  If you read my last post, you know that I set up a machine (Thinkpad x230) with UEFI and four operating systems on it. One, I had no experience with – DragonFlyBSD (other than using Matthew Dillon’s C compiler for the Amiga back in the day!) and so it was uncharted territory for me. After getting the install working, I started playing around inside of DragonFlyBSD and discovered to my delight that it was a great operating system with some really unique features – all with that BSD commitment to good documentation and a solid coupling of kernel and userland that doesn’t exist (by design) in Linux.

                                                                                                                                                                                                                                                                                                                                                  So my goal for my DragonFlyBSD desktop experience was to be as BSD as I possibly could. Given that (and since I’m the maintainer of the port on OpenBSD ), I went with Lumina as the desktop environment and XDM as the graphical login manager. I have to confess that I really like the xfce terminal application so I wanted to make sure I had that as well. Toss in Firefox, libreOffice and ownCloud sync client and I’m good to go!
                                                                                                                                                                                                                                                                                                                                                  OK. So where to start. First, we need to get WiFi and wired networking happening for the console at login. To do that, I added the following to /etc/rc.conf:

                                                                                                                                                                                                                                                                                                                                                  wlans_iwn0=”wlan0″
                                                                                                                                                                                                                                                                                                                                                  ifconfig_wlan0=”WPA DHCP”
                                                                                                                                                                                                                                                                                                                                                  ifconfig_em0=”DHCP”

                                                                                                                                                                                                                                                                                                                                                  I then edited /etc/wpa_supplicant.conf to put in the details of my WiFi network:

                                                                                                                                                                                                                                                                                                                                                  network={
                                                                                                                                                                                                                                                                                                                                                  ssid=”MY-NETWORK-NAME”
                                                                                                                                                                                                                                                                                                                                                  psk=”my-super-secret-password”
                                                                                                                                                                                                                                                                                                                                                  }

                                                                                                                                                                                                                                                                                                                                                  A quick reboot showed that both wired and wireless networking were functional and automatically were assigned IP addresses via DHCP. Next up is to try getting into X with whatever DragonFlyBSD uses for its default window manager. A straight up “startx” met with, shall we say, less than stellar results. Therefore, I used the following command to generate a simple /etc/X11/xorg.conf file:

                                                                                                                                                                                                                                                                                                                                                  # Xorg -configure
                                                                                                                                                                                                                                                                                                                                                  # cp /root/xorg.conf.new /etc/X11/xorg.conf

                                                                                                                                                                                                                                                                                                                                                  With that file in place, I could get into the default window manager, but I had no mouse. After some searching and pinging folks on the mailing list, I was able to figure out what I needed to do. I added the following to my /etc/rc.conf file:

                                                                                                                                                                                                                                                                                                                                                  moused_enable=”YES”
                                                                                                                                                                                                                                                                                                                                                  moused_type=”auto”
                                                                                                                                                                                                                                                                                                                                                  moused_port=”/dev/psm0″

                                                                                                                                                                                                                                                                                                                                                  I rebooted (I’m sure there is an easier way to get the changes but I don’t know it… yet) and was able to get into a basic X session and have a functional mouse. Next up, installing and configuring Lumina! To do that, I went through the incredibly torturous process of installing Lumina:

                                                                                                                                                                                                                                                                                                                                                  # pkg install lumina

                                                                                                                                                                                                                                                                                                                                                  Wow! That was really, really hard. I might need to pause here to catch my breath. 🙂

                                                                                                                                                                                                                                                                                                                                                  Next up, jumping into Lumina from the console. To do that, I created a .xinitrc file in my home directory with the following:

                                                                                                                                                                                                                                                                                                                                                  exec start-lumina-desktop

                                                                                                                                                                                                                                                                                                                                                  From there, I could “startx” until my heart was content and bounce into Lumina. That wasn’t good enough though! I want a graphical login (specifically xdm). To do that, I had to do a little research. The trick on DragonFlyBSD is not to add anything to /etc/rc.conf like you do in other BSDs, it’s a bit more old school. Basically you need to edit the /etc/ttys file and update ttyv8 to turn on the xdm daemon:

                                                                                                                                                                                                                                                                                                                                                  ttyv8 “/usr/X11R6/bin/xdm -nodaemon” xterm on secure

                                                                                                                                                                                                                                                                                                                                                  The other thing you need to do is set it up to use your desktop environment of choice. In my case, that’s Lumina. To do that, I needed to edit /usr/local/lib/X11/xdm/Xsession and change the next to the last line in the file to launch Lumina:

                                                                                                                                                                                                                                                                                                                                                  exec /usr/local/bin/start-lumina-desktop

                                                                                                                                                                                                                                                                                                                                                  I then crossed my fingers, rebooted and lo and behold had a graphical login that, when I actually didn’t fat finger my password from excitement, put me into the Lumina desktop environment!

                                                                                                                                                                                                                                                                                                                                                  Next up – I need a cool desktop wallpaper. Of course that’s way more important that installing application or other stuff! After some searching, I found this one that met my needs. I downloaded it to a local ~/Pictures directory and then used the Lumina wallpaper preference application to add the directory containing the picture and set it to automatic layout. Voila! I had a cool DragonFlyBSD wallpaper.
                                                                                                                                                                                                                                                                                                                                                  Next I installed the xfce4 terminal program by doing:

                                                                                                                                                                                                                                                                                                                                                  # pkg install xfce4-terminal

                                                                                                                                                                                                                                                                                                                                                  I then went into the Lumina “All Desktop Settings” preferences, found the applet for the “Menu” under “Interface Configuration” and swapped out “terminal” for “Xfce Terminal”. I then configured Lumina further to have a 26 pixel thick, 99% length bottom center panel with the following gadgets in it (in this order):

                                                                                                                                                                                                                                                                                                                                                  Start Menu
                                                                                                                                                                                                                                                                                                                                                  Task Manager (No Groups)
                                                                                                                                                                                                                                                                                                                                                  Spacer
                                                                                                                                                                                                                                                                                                                                                  System Tray
                                                                                                                                                                                                                                                                                                                                                  Time/Date
                                                                                                                                                                                                                                                                                                                                                  Battery Monitor

                                                                                                                                                                                                                                                                                                                                                  I then went into my Appearance | Window Manager gadget and set my Window Theme to “bora_blue” (my favorite out of the defaults supplied). I then installed my remaining applications that I needed in order to have a functioning desktop:

                                                                                                                                                                                                                                                                                                                                                  # pkg install owncloudclient qtkeychain evolution evolution-ews firefox libreoffice

                                                                                                                                                                                                                                                                                                                                                  After that, I really had a nicely functioning desktop environment! By the way, the performance of DragonFlyBSD is pretty impressive in terms of its day to day usage. Keep in mind I’m not doing any official benchmarking or anything, but it sure feels to me to be just as fast (if not faster) than OpenBSD and FreeBSD. I know that the kernel team has done a lot to unlock things (which FreeBSD has done and we are starting to do on OpenBSD) so perhaps I can attribute the “snappiness” to that?

                                                                                                                                                                                                                                                                                                                                                  As you can see, although there isn’t as much documentation on the Internet for this BSD, you can get a really nice, functional desktop out of it with some simple (and intuitive) configuration. I’m really looking forward to living in this system for a while and learning about it. Probably the first thing I’ll do is ring up the port maintainer for Lumina and see if we can’t collaborate on getting Lumina 1.3 moved over to it! Give this one a try – I think you’ll find that its a very nice operating system with some very cool features (the HAMMER filesystem for one!).

                                                                                                                                                                                                                                                                                                                                                  News Roundup
                                                                                                                                                                                                                                                                                                                                                  Porting NetBSD to Alwinner H3 SoCs
                                                                                                                                                                                                                                                                                                                                                  • Jared McNeill writes on the the NetBSD blog:
                                                                                                                                                                                                                                                                                                                                                  • A new SUNXI evbarm kernel has appeared recently in NetBSD -current with support for boards based on the Allwinner H3 system on a chip (SoC). The H3 SoC is a quad-core Cortex-A7 SoC designed primarily for set-top boxes, but has managed to find its way into many single-board computers (SBC). This is one of the first evbarm ports built from the ground up with device tree support, which helps us to use a single kernel config to support many different boards.

                                                                                                                                                                                                                                                                                                                                                    To get these boards up and running, first we need to deal with low-level startup code. For the SUNXI kernel this currently lives in sys/arch/evbarm/sunxi/. The purpose of this code is fairly simple; initialize the boot CPU and initialize the MMU so we can jump to the kernel. The initial MMU configuration needs to cover a few things -- early on we need to be able to access the kernel, UART debug console, and the device tree blob (DTB) passed in from U-Boot. We wrap the kernel in a U-Boot header that claims to be a Linux kernel; this is no accident! This tells U-Boot to use the Linux boot protocol when loading the kernel, which ensures that the DTB (loaded by U-Boot) is processed and passed to us in r2.
                                                                                                                                                                                                                                                                                                                                                    Once the CPU and MMU are ready, we jump to the generic ARM FDT implementation of initarm in sys/arch/evbarm/fdt/fdt_machdep.c. The first thing this code does is validate and relocate the DTB data. After it has been relocated, we compare the compatible property of the root node in the device tree with the list of ARM platforms compiled into the kernel. The Allwinner sunxi platform code lives in sys/arch/arm/sunxi/sunxi_platform.c. The sunxi platform code provides SoC-specific versions of code needed early at boot. We need to know how to initialize the debug console, spin up application CPUs, reset the board, etc.
                                                                                                                                                                                                                                                                                                                                                    With a bit of luck, we're now booting and enumerating devices. Apart from a few devices, almost nothing works yet as we are missing a driver for the CCU. The CCU in the Allwinner H3 SoC controls PLLs and most of the clock generation, division, muxing, and gating. Since there are many similarities between Allwinner SoCs, I opted to write generic CCU code and then SoC-specific frontends. The resulting code lives in sys/arch/arm/sunxi/; generic code as sunxi_ccu.c and H3-specific code in sun8i_h3_ccu.c.

                                                                                                                                                                                                                                                                                                                                                    • Jared has more information about porting and also provides a boot log.
                                                                                                                                                                                                                                                                                                                                                    • ***
                                                                                                                                                                                                                                                                                                                                                      TrueOS Community Spotlight: Reset ZFS Replication using the command line

                                                                                                                                                                                                                                                                                                                                                      We’d like to spotlight TrueOS community member Brad Alexander for documenting his experience repairing ZFS dataset replication with TrueOS. Thank you! His notes are posted here, and they’ve been added to the TrueOS handbook Troubleshooting section for later reference.

                                                                                                                                                                                                                                                                                                                                                      • Original indications
                                                                                                                                                                                                                                                                                                                                                      • The SysAdm Client tray icon was pulsing red. Right-clicking on the icon and clicking Messages would show the message:

                                                                                                                                                                                                                                                                                                                                                        FAILED replication task on NCC74602 -> 192.168.47.20: LOGFILE: /var/log/lpreserver/lpreserver_failed.log

                                                                                                                                                                                                                                                                                                                                                        /var/log/lpreserver/lastrep-send.log shows very little information:

                                                                                                                                                                                                                                                                                                                                                        send from @auto-2017-07-12-01-00-00 to NCC74602/ROOT/12.0-CURRENT-up-20170623_120331@auto-2017-07-14-01-00-00
                                                                                                                                                                                                                                                                                                                                                        total estimated size is 0
                                                                                                                                                                                                                                                                                                                                                        TIME SENT SNAPSHOT

                                                                                                                                                                                                                                                                                                                                                        And no useful errors were being written to the lpreserver_failed.log.

                                                                                                                                                                                                                                                                                                                                                        • Repairing replication
                                                                                                                                                                                                                                                                                                                                                          • First attempt:
                                                                                                                                                                                                                                                                                                                                                          • The first approach I tried was to use the Sysadm Client:

                                                                                                                                                                                                                                                                                                                                                            I clicked on the dataset in question, then clicked Initialize. After waiting a few minutes, I clicked Start. I was immediately rewarded with a pulsing red icon in the system tray and received the same messages as above.

                                                                                                                                                                                                                                                                                                                                                            • Second attempt:
                                                                                                                                                                                                                                                                                                                                                            • I was working with, and want to specially thank @RodMyers and @NorwegianRockCat. They suggested I use the lpreserver command line. So I issued these commands:

                                                                                                                                                                                                                                                                                                                                                              sudo lpreserver replicate init NCC74602 192.168.47.20
                                                                                                                                                                                                                                                                                                                                                              sudo lpreserver replicate run NCC74602 192.168.47.20

                                                                                                                                                                                                                                                                                                                                                              Unfortunately, the replication failed again. I got these messages in the logs:

                                                                                                                                                                                                                                                                                                                                                              Fri Jul 14 09:03:34 EDT 2017: Removing NX80101/archive/yukon.sonsofthunder.nanobit.org/ROOT - re-created locally
                                                                                                                                                                                                                                                                                                                                                              cannot unmount '/mnt/NX80101/archive/yukon.sonsofthunder.nanobit.org/ROOT': Operation not permitted
                                                                                                                                                                                                                                                                                                                                                              Failed creating remote dataset!
                                                                                                                                                                                                                                                                                                                                                              cannot create 'NX80101/archive/yukon.sonsofthunder.nanobit.org/ROOT': dataset already exists

                                                                                                                                                                                                                                                                                                                                                              It turned out there were a number of children. I logged into luna (the FreeNAS) and issued this command as root:

                                                                                                                                                                                                                                                                                                                                                              zfs destroy -r NX80101/archive/defiant.sonsofthunder.nanobit.org

                                                                                                                                                                                                                                                                                                                                                              I then ran the replicate init and replicate run commands again from the TrueOS host, and replication worked! It has continued to work too, at least until the next fiddly bit breaks.

                                                                                                                                                                                                                                                                                                                                                              Kernel relinking status from Theo de Raadt

                                                                                                                                                                                                                                                                                                                                                              As you may have heard (and as was mentioned in an earlier article), on recent OpenBSD snapshots we have KARL, which means that the kernel is relinked so each boot comes with a new kernel where all .o files are linked in random order and with random offsets. Theo de Raadt summarized the status in a message to the tech@ mailing list, subject kernel relinking as follows:

                                                                                                                                                                                                                                                                                                                                                              5 weeks ago at d2k17 I started work on randomized kernels. I've been having conversations with other developers for nearly 5 years on the topic... but never got off to a good start, probably because I was trying to pawn the work off on others.

                                                                                                                                                                                                                                                                                                                                                              Having done this, I really had no idea we'd end up where we are today.
                                                                                                                                                                                                                                                                                                                                                              Here are the behaviours:
                                                                                                                                                                                                                                                                                                                                                              The base set has grown, it now includes a link-kit
                                                                                                                                                                                                                                                                                                                                                              At install time, a unique kernel is built from this link-kit
                                                                                                                                                                                                                                                                                                                                                              At upgrade time, a unique kernel is built
                                                                                                                                                                                                                                                                                                                                                              At boot time, a unique kernel is built and installed for the next boot
                                                                                                                                                                                                                                                                                                                                                              If someone compiles their own kernel and uses 'make install', the link-kit is also updated, so that the next boot can do the work
                                                                                                                                                                                                                                                                                                                                                              If a developer cp's a kernel to /, the mechanism dis-engages until a 'make install" or upgrade is performed in the future. That may help debugging.
                                                                                                                                                                                                                                                                                                                                                              A unique kernel is linked such that the startup assembly code is kept in the same place, followed by randomly-sized gapping, followed by all the other .o files randomly re-organized. As a result the distances between functions and variables are entirely new. An info leak of a pointer will not disclose other pointers or objects. This may also help reduce gadgets on variable-sized architectures, because polymorphism in the instruction stream is damaged by nested offsets changing.
                                                                                                                                                                                                                                                                                                                                                              At runtime, the kernel can unmap it's startup code. On architectures where an unmap isn't possible due to large-PTE use, the code can be trashed instead.
                                                                                                                                                                                                                                                                                                                                                              I did most of the kernel work on amd64 first, then i386. I explained what needed to be done to visa and patrick, who handled the arm and mips platforms. Then I completed all the rest of the architectures. Some architecture are missing the unmap/trashing of startup code, that's a step we need to get back to.
                                                                                                                                                                                                                                                                                                                                                              The next part was tricky and I received assistance from tb and rpe. We had to script the behaviours at build time, snapshot time, relink time, boot time, and later on install/upgrade time also.
                                                                                                                                                                                                                                                                                                                                                              While they helped, I also worked to create the "gap.o" file without use of a C compiler so that relinks can occur without the "comp" set installed. This uses the linkscript feature of ld. I don't think anyone has done this before. It is little bit fragile, and the various linkers may need to receive some fixes due to what I've encountered.
                                                                                                                                                                                                                                                                                                                                                              To ensure this security feature works great in the 6.2 release, please test snapshots. By working well, I mean it should work invisibly, without any glitch such as a broken kernel or anything. If there are ugly glitches we would like to know before the release.

                                                                                                                                                                                                                                                                                                                                                              You heard the man, now is the time to test and get a preview of the new awsomeness that will be in OpenBSD 6.2.

                                                                                                                                                                                                                                                                                                                                                              Beastie Bits
                                                                                                                                                                                                                                                                                                                                                              • Beta Undeadly call for testing
                                                                                                                                                                                                                                                                                                                                                              • Absolute FreeBSD 3rd Edition Update
                                                                                                                                                                                                                                                                                                                                                              • New home for the NetBSD repository conversion
                                                                                                                                                                                                                                                                                                                                                              • TrueOS unstable Update: 7/14/17
                                                                                                                                                                                                                                                                                                                                                              • Interview with George Neville-Neil - President of the FreeBSD Foundation
                                                                                                                                                                                                                                                                                                                                                              • LibreSSL 2.5.5, 2.6.0 released
                                                                                                                                                                                                                                                                                                                                                              • ***
                                                                                                                                                                                                                                                                                                                                                                Feedback/Questions
                                                                                                                                                                                                                                                                                                                                                                • Jason - Byhve VM UEFI woes
                                                                                                                                                                                                                                                                                                                                                                • Donald - Several Questions
                                                                                                                                                                                                                                                                                                                                                                • Dan - Several Questions
                                                                                                                                                                                                                                                                                                                                                                • Bryson - Jails
                                                                                                                                                                                                                                                                                                                                                                • ***
                                                                                                                                                                                                                                                                                                                                                                  Final Note
                                                                                                                                                                                                                                                                                                                                                                  • We’ve decided to do something different for a change of pace and let you the audience interview Allan and Benedict.
                                                                                                                                                                                                                                                                                                                                                                  • Getting our entire audience live when we record would be a challenge, so instead we want you to send in your questions for Allan and Benedict.
                                                                                                                                                                                                                                                                                                                                                                  • This interview is not going to be like our typical support feedback questions. This is a chance for you, our audience, to ask Allan and Benedict any questions that you’ve been wondering over the years.
                                                                                                                                                                                                                                                                                                                                                                  • Questions like… “Of all the conferences you've gone to, what was your favorite and why?”
                                                                                                                                                                                                                                                                                                                                                                  • We will answer the questions during a random week during the month of September. Send all your questions to [email protected] with the subject of “viewer interview questions”
                                                                                                                                                                                                                                                                                                                                                                  • We reserve the right to not answer questions which we feel are inappropriate or trolling.
                                                                                                                                                                                                                                                                                                                                                                  • ***
                                                                                                                                                                                                                                                                                                                                                                    1 hr 58 min
                                                                                                                                                                                                                                                                                                                                                                  • 202: Brokering Bind

                                                                                                                                                                                                                                                                                                                                                                    We look at an OpenBSD setup on a new laptop, revel in BSDCan trip reports, and visit daemons and friendly ninjas.

                                                                                                                                                                                                                                                                                                                                                                    This episode was brought to you by

                                                                                                                                                                                                                                                                                                                                                                    Headlines
                                                                                                                                                                                                                                                                                                                                                                    OpenBSD and the modern laptop
                                                                                                                                                                                                                                                                                                                                                                    • Peter Hansteen has a new blog post about OpenBSD on laptops:
                                                                                                                                                                                                                                                                                                                                                                    • Did you think that OpenBSD is suitable only for firewalls and high-security servers? Think again. Here are my steps to transform a modern mid to high range laptop into a useful Unix workstation with OpenBSD.

                                                                                                                                                                                                                                                                                                                                                                      One thing that never ceases to amaze me is that whenever I'm out and about with my primary laptop at conferences and elsewhere geeks gather, a significant subset of the people I meet have a hard time believing that my laptop runs OpenBSD, and that it's the only system installed.
                                                                                                                                                                                                                                                                                                                                                                      and then it takes a bit of demonstrating that yes, the graphics runs with the best available resolution the hardware can offer, the wireless network is functional, suspend and resume does work, and so forth. And of course, yes, I do use that system when writing books and articles too. Apparently heavy users of other free operating systems do not always run them on their primary workstations.

                                                                                                                                                                                                                                                                                                                                                                      • Peter goes on to describe the laptops he’s had over the years (all running OpenBSD) and after BSDCan 2017, he needed a new one due to cracks in the display.
                                                                                                                                                                                                                                                                                                                                                                      • So the time came to shop around for a replacement. After a bit of shopping around I came back to Multicom, a small computers and parts supplier outfit in rural Åmli in southern Norway, the same place I had sourced the previous one.

                                                                                                                                                                                                                                                                                                                                                                        One of the things that attracted me to that particular shop and their own-branded offerings is that they will let you buy those computers with no operating system installed. That is of course what you want to do when you source your operating system separately, as we OpenBSD users tend to do.
                                                                                                                                                                                                                                                                                                                                                                        The last time around I had gone for a "Thin and lightweight" 14 inch model (Thickness 20mm, weight 2.0kg) with 16GB RAM, 240GB SSD for system disk and 1TB HD for /home (since swapped out for a same-size SSD, as the dmesg will show).
                                                                                                                                                                                                                                                                                                                                                                        Three years later, the rough equivalent with some added oomph for me to stay comfortable for some years to come ended me with a 13.3 inch model, 18mm and advertised as 1.3kg (but actually weighing in at 1.5kg, possibly due to extra components), 32GB RAM, 512GB SSD and 2TB harddisk. For now the specification can be viewed online here (the site language is Norwegian, but product names and units of measure are not in fact different).
                                                                                                                                                                                                                                                                                                                                                                        The OpenBSD installer is a wonder of straightforward, no-nonsense simplicity that simply gets the job done. Even so, if you are not yet familiar with OpenBSD, it is worth spending some time reading the OpenBSD FAQ's installation guidelines and the INSTALL.platform file (in our case, INSTALL.amd64) to familiarize yourself with the procedure. If you're following this article to the letter and will be installing a snapshot, it is worth reading the notes on following -current too.
                                                                                                                                                                                                                                                                                                                                                                        The main hurdle back when I was installing the 2014-vintage 14" model was getting the system to consider the SSD which showed up as sd1 the automatic choice for booting (I solved that by removing the MBR, setting the size of the MBR on the hard drive that showed up as sd0 to 0 and enlarging the OpenBSD part to fill the entire drive).

                                                                                                                                                                                                                                                                                                                                                                        • He goes on to explain the choices he made in the installer and settings made after the reboot to set up his work environment. Peter closes with:
                                                                                                                                                                                                                                                                                                                                                                        • If you have any questions on running OpenBSD as a primary working environment, I'm generally happy to answer but in almost all cases I would prefer that you use the mailing lists such as [email protected] or the OpenBSD Facebook group so the question and hopefully useful answers become available to the general public. Browsing the slides for my recent OpenBSD and you user group talk might be beneficial if you're not yet familiar with the system. And of course, comments on this article are welcome.
                                                                                                                                                                                                                                                                                                                                                                          ***
                                                                                                                                                                                                                                                                                                                                                                          BSDCan 2017 Trip Report: Roller Angel
                                                                                                                                                                                                                                                                                                                                                                          • We could put this into next week’s show, because we have another trip report already that’s quite long.
                                                                                                                                                                                                                                                                                                                                                                          • After dropping off my luggage, I headed straight over to the Goat BoF which took place at The Royal Oak. There were already a number of people there engaged in conversation with food and drink. I sat down at a table and was delighted that the people sitting with me were also into the BSD’s and were happy to talk about it the whole time. I felt right at home from the start as people were very nice to me, and were interested in what I was working on. I honestly didn’t know that I would fit in so well.

                                                                                                                                                                                                                                                                                                                                                                            I had a preconceived notion that people may be a bit hard to approach as they are famous and so technically advanced. At first, people seemed to only be working in smaller circles. Once you get more familiar with the faces, you realize that these circles don’t always contain the same people and that they are just people talking about specific topics. I found that it was easy to participate in the conversation and also found out that people are happy to get your feedback on the subject as well.
                                                                                                                                                                                                                                                                                                                                                                            I was actually surprised how easily I got along with everyone and how included I felt in the activities. I volunteered to help wherever possible and got to work on the video crew that recorded the audio and slides of the talks. The people at BSDCan are incredibly easy to talk to, are actually interested in what you’re doing with BSD, and what they can do to help. It’s nice to feel welcome in the community. It’s like going home. Dan mentioned in his welcome on the first day of BSDCan that the conference is like home for many in the community.

                                                                                                                                                                                                                                                                                                                                                                            • The trip report is very detailed and chronicles the two days of the developer summit, and the two days of the conference
                                                                                                                                                                                                                                                                                                                                                                            • There was some discussion about a new code of conduct by Benno Rice who mentioned that people are welcome to join a body of people that is forming that helps work out issues related to code of conduct and forwards their recommendations on to core. Next, Allan introduced the idea of creating a process for formally discussing big project changes or similar discussions that is going to be known as FCP or FreeBSD Community Proposal. In Python we have the Python Enhancement Proposal or PEP which is very similar to the idea of FCP. I thought this idea is a great step for FreeBSD to be implementing as it has been a great thing for Python to have.

                                                                                                                                                                                                                                                                                                                                                                              There was some discussion about taking non-code contributions from people and how to recognize those people in the project. There was a suggestion to have a FreeBSD Member status created that can be given to people whose non-code contributions are valuable to the project. This idea seemed to be on a lot of people’s minds as something that should be in place soon. The junior jobs on the FreeBSD Wiki were also brought up as a great place to look for ideas on how to get involved in contributing to FreeBSD.

                                                                                                                                                                                                                                                                                                                                                                              • Roller wasted no time, and started contributing to EdgeBSD at the conference.
                                                                                                                                                                                                                                                                                                                                                                              • On the first day of BSDCan I arrived at the conference early to coordinate with the team that records the talks. We selected the rooms that each of us would be in to do the recording and set up a group chat via WhatsApp for coordination.

                                                                                                                                                                                                                                                                                                                                                                                • Thanks to Roller, Patrick McAvoy, Calvin Hendryx-Parker, and all of the others who volunteered their time to run the video and streaming production at BSDCan, as well as all others who volunteered, even if it was just to carry a box. BSDCan couldn’t happen without the army of volunteers.
                                                                                                                                                                                                                                                                                                                                                                                • After the doc lounge, I visited the Hacker Lounge. There were already several tables full of people talking and working on various projects. In fact, there was a larger group of people who were collaborating on the new libtrue library that seemed to be having a great time. I did a little socializing and then got on my laptop and did some more work on the documentation using my new skills. I really enjoyed having a hacker lounge to go to at night.

                                                                                                                                                                                                                                                                                                                                                                                  I want to give a big thank you to the FreeBSD Foundation for approving my travel grant. It was a great experience to meet the community and participate in discussions. I’m very grateful that I was able to attend my first BSDCan. After visiting the doc lounge a few times, I managed to get comfortable using the tools required to edit the documentation. By the end of the conference, I had submitted two documentation patches to the FreeBSD Bugzilla with several patches still in progress. Prior to the conference I expected that I would be spending a lot of time working on my Onion Omega and Edge Router Lite projects that I had with me, but I actually found that there was always something fun going on that I would rather do or work on. I can always work on those projects at home anyway. I had a good time working with the FreeBSD community and will continue working with them by editing the documentation and working with Bugzilla.

                                                                                                                                                                                                                                                                                                                                                                                  • One of the things I enjoy about these trip reports is when they help convince other people to make the trip to their first conference. Hopefully by sharing their experience, it will convince you to come to the next conference:
                                                                                                                                                                                                                                                                                                                                                                                    • vBSDCon in Virginia, USA: Sept 7-9
                                                                                                                                                                                                                                                                                                                                                                                    • EuroBSDCon in Paris, France: Sept 21-24
                                                                                                                                                                                                                                                                                                                                                                                    • BSDTW in Taipei, Taiwan: November 11-12 (CFP ends July 31st)
                                                                                                                                                                                                                                                                                                                                                                                    • ***
                                                                                                                                                                                                                                                                                                                                                                                      BSDCan 2017 - Trip report double-p
                                                                                                                                                                                                                                                                                                                                                                                      • Prologue
                                                                                                                                                                                                                                                                                                                                                                                      • Most overheard in Tokyo was "see you in Ottawaaaaah", so with additional "personal item" being Groff I returned home to plan the trip to BSDCan.

                                                                                                                                                                                                                                                                                                                                                                                        Dan was very helpful with getting all the preparations (immigration handling), thanks for that. Before I could start, I had to fix something: the handling of the goat. With a nicely created harness, I could just hang it along my backpack.
                                                                                                                                                                                                                                                                                                                                                                                        Done that it went to the airport of Hamburg and check-in for an itinerary of HAM-MUC-YUL. While the feeder leg was a common thing, boarding to YUL was great - cabin-crew likes Groff :)
                                                                                                                                                                                                                                                                                                                                                                                        Arriving in Montreal was like entering a Monsoon zone or something, sad! After the night the weather was still rain-ish but improving and i shuttled to Dorval VIARail station to take me to Ottawa (ever avoid AirCanada, right?). Train was late, but the conductor (or so) was nice to talk to - and wanted to know about Groff's facebook page :-P.
                                                                                                                                                                                                                                                                                                                                                                                        Picking a cab in Ottawa to take me to "Residence" was easy at first - just that it was the wrong one. Actually my fault and so I had a "nice, short" walk to the actual one in the rain with wrong directions. Eventually I made it and after unpacking, refreshment it was time to hit the Goat BOF!

                                                                                                                                                                                                                                                                                                                                                                                        • Day 1
                                                                                                                                                                                                                                                                                                                                                                                        • Since this was my first BSDCan I didnt exactly knew what to expect from this BOF. But it was like, we (Keeper, Dan, Allan, ..) would talk about "who's next" and things like that. How mistaken I was :). Besides the sheer amount of BSD people entering the not-so-yuuge Oak some Dexter sneaked in camouflage. The name-giver got a proper position to oversee the mess and I was glad I did not leave him behind after almost too many Creemores.

                                                                                                                                                                                                                                                                                                                                                                                          • Day 2
                                                                                                                                                                                                                                                                                                                                                                                          • Something happened it's crystal blue on the "roof" and sun is trying its best to wake me up. To start the day, I pick breakfast at 'Father+Sons' - I can really recommend that. Very nice home made fries (almost hashbrowns) and fast delivery! Stuffed up I trott along to get to phessler's tutorial about BGP-for-sysadmins-and-developers.

                                                                                                                                                                                                                                                                                                                                                                                            Peter did a great job, but the "lab" couldn't happen, since - oh surprise - the wifi was sluggish as hell. Must love the first day on a conference every time.
                                                                                                                                                                                                                                                                                                                                                                                            Went to Hackroom in U90 afterwards, just to fix stuff "at home". IPsec giving pains again.
                                                                                                                                                                                                                                                                                                                                                                                            Time to pick food+beer afterwards and since it's so easy to reach, we went to the Oak again. Having a nice backyard patio experience it was about time to meet new people. Cheers to Tom, Aaron, Nick, Philip and some more, we'd an awesome night there. I also invited some not-really-computer local I know by other means who was completly overwhelmed by what kind of "nerds" gather around BSD. He planned to stay "a beer" - and it was rather some more and six hours. Looks like "we" made some impression on him :).

                                                                                                                                                                                                                                                                                                                                                                                            • Day 3
                                                                                                                                                                                                                                                                                                                                                                                            • Easy day, no tutorials at hand, so first picking up breakfast at F+S again and moving to hackroom in U90. Since I promised phessler to help with an localized lab-setup, I started to hack on a quick vagrant/ansible setup to mimic his BGP-lab and went quickly through most of it. Plus some more IPsec debugging and finally fixing it, we went early in the general direction of the Red Lion to pick our registration pack.

                                                                                                                                                                                                                                                                                                                                                                                              But before that could happen it was called to have shawarma at 3brothers along. Given a tight hangover it wasn't the brightest idea to order a poutine m-(. Might be great the other day, it wasn't for me at the very time and had to throw away most of it :(. Eventually passing on to the Red Lion I made the next failure with just running into the pub - please stay at the front desk until "seated". I never get used to this concept.
                                                                                                                                                                                                                                                                                                                                                                                              So after being "properly" seated, we take our beers and the registration can commence after we had half of it. So I register myself; btw it's a great idea to grant "not needed" stuff to charity. So dont pick "just because", think about it if you really need this or that gadget.
                                                                                                                                                                                                                                                                                                                                                                                              Then I register Groff - he really needs badges - just to have Dru coming back to me some minutes later one to hand me the badge for Henning. That's just "amazing"; I dont know IF i want to break this vicious circle the other day, since it's so funny.
                                                                                                                                                                                                                                                                                                                                                                                              Talked to Theo about the ongoing IPsec problems and he taught me about utrace(2) which looks "complicated" but might be an end of the story the other day. Also had a nice talk to Peter (H.) about some other ideas along books.
                                                                                                                                                                                                                                                                                                                                                                                              BTW, did I pay for ongoing beers? I think Tom did - what a guy :).
                                                                                                                                                                                                                                                                                                                                                                                              Arriving at the Residence, I had to find my bathroom door locked (special thing).. crazy thing is they dont have a master key at the venue, but to have to call in one from elsewhere.
                                                                                                                                                                                                                                                                                                                                                                                              Short night shortened by another 30minutes :(.

                                                                                                                                                                                                                                                                                                                                                                                              • Day 4
                                                                                                                                                                                                                                                                                                                                                                                              • Weather is improving into beach+sun levels - and it's Conference Day! The opening keynote from Geist was very interesting ("citation needed"). Afterwards I went to zfs-over-ssh, nothing really new (sorry Allan). But then Jason had a super interesting talk on how about to apply BSD for the health-care system in Australia. I hope I can help him with the last bits (rdomain!) in the end.

                                                                                                                                                                                                                                                                                                                                                                                                While lunch I tried to recall my memories about utrace(2) while talking to Theo.
                                                                                                                                                                                                                                                                                                                                                                                                Then it was about to present my talk and I think it was well perceipted. One "not so good" feedback was about not taking the audience more into account. I think I was asking every other five slides or so - but, well. The general feedback (in spoken terms) was quite good. I was a bit "confused" and I did likely a better job in Tokyo, but well.
                                                                                                                                                                                                                                                                                                                                                                                                Happened we ended up in the Oak again.. thanks to mwl, shirkdog, sng, pitrh, kurtm for having me there :)

                                                                                                                                                                                                                                                                                                                                                                                                • Day 5
                                                                                                                                                                                                                                                                                                                                                                                                • While the weather had to decide "what next", I rushed to the venue just to gather Reyk's talk about vmd(8). Afterwards it was MSTP from Paeps which was very interesting and we (OpenBSD) should look into it. Then happened BUG BOF and I invite all "coastal Germans" to cbug.de :)

                                                                                                                                                                                                                                                                                                                                                                                                  I had to run off for other reasons and came back to Dave's talk which was AWESOME.
                                                                                                                                                                                                                                                                                                                                                                                                  Following was Rod's talk.. well. While I see his case, that was very poor.
                                                                                                                                                                                                                                                                                                                                                                                                  The auction into closing was awesome again, and I spend $50 on a Tshirt. :)

                                                                                                                                                                                                                                                                                                                                                                                                  • Epilogue
                                                                                                                                                                                                                                                                                                                                                                                                  • I totally got the exit dates wrong. So first cancel a booking of an Hotel and then rebook the train to YUL. So I have plenty of time "in the morning" to get breakfast with the local guy. After that he drives me to VIARail station and I dig into "business" cussions.
                                                                                                                                                                                                                                                                                                                                                                                                    Well, see you in Ottawa - or how about Paris, Taipei?
                                                                                                                                                                                                                                                                                                                                                                                                    ***
                                                                                                                                                                                                                                                                                                                                                                                                    Bind Broker
                                                                                                                                                                                                                                                                                                                                                                                                    • Ted Unangst writes about an interesting idea he has
                                                                                                                                                                                                                                                                                                                                                                                                    • He has a single big server, and lots of users who would like to share it, many want to run web servers.
                                                                                                                                                                                                                                                                                                                                                                                                    • This would be great, but alas, archaic decisions made long ago mean that network sockets aren’t really files and there’s this weird concept of privileged ports. Maybe we could assign each user a virtual machine and let them do whatever they want, but that seems wasteful. Think of the megabytes! Maybe we could setup nginx.conf to proxy all incoming connections to a process of the user’s choosing, but that only works for web sites and we want to be protocol neutral. Maybe we could use iptables, but nobody wants to do that.

                                                                                                                                                                                                                                                                                                                                                                                                      What we need is a bind broker. At some level, there needs to be some kind of broker that assigns IPs to users and resolves conflicts. It should be possible to build something of this nature given just the existing unix tools we have, instead of changing system design. Then we can deploy our broker to existing systems without upgrading or disrupting their ongoing operation. The bind broker watches a directory for the creation, by users, of unix domain sockets. Then it binds to the TCP port of the same name, and transfers traffic between them.
                                                                                                                                                                                                                                                                                                                                                                                                      A more complete problem specification is as follows. A top level directory, which contains subdirectories named after IP addresses. Each user is assigned a subdirectory, which they have write permission to. Inside each subdirectory, the user may create unix sockets named according to the port they wish to bind to. We might assign user alice the IP 10.0.0.5 and the user bob the IP 10.0.0.10. Then alice could run a webserver by binding to net/10.0.0.5/80 and bob could run a mail server by binding to net/10.0.0.10/25. This maps IP ownership (which doesn’t really exist in unix) to the filesystem namespace (which does have working permissions).

                                                                                                                                                                                                                                                                                                                                                                                                      • So this will be a bit different than jails. The idea is to use filesystem permissions to control which users can bind to which IP addresses and ports
                                                                                                                                                                                                                                                                                                                                                                                                      • The broker is responsible for watching each directory. As new sockets are created, it should respond by binding to the appropriate port. When a socket is deleted, the network side socket should be closed as well. Whenever a connection is accepted on the network side, a matching connection is made on the unix side, and then traffic is copied across.

                                                                                                                                                                                                                                                                                                                                                                                                        • A full set of example code is provided
                                                                                                                                                                                                                                                                                                                                                                                                        • There’s no completely portable way to watch a directory for changes. I’m using a kevent extension. Otherwise we might consider a timeout and polling with fstat, or another system specific interface (or an abstraction layer over such an interface). Otherwise, if one of our mappings is ready to read (accept), we have a new connection to handle.

                                                                                                                                                                                                                                                                                                                                                                                                          The first half is straightforward. We accept the connection and make a matching connect call to the unix side. Then I broke out the big cheat stick and just spliced the sockets together. In reality, we’d have to set up a read/copy/write loop for each end to copy traffic between them. That’s not very interesting to read though.
                                                                                                                                                                                                                                                                                                                                                                                                          The full code, below, comes in at 232 lines according to wc. Minus includes, blank lines, and lines consisting of nothing but braces, it’s 148 lines of stuff that actually gets executed by the computer. Add some error handling, and working read/write code, and 200 lines seems about right.

                                                                                                                                                                                                                                                                                                                                                                                                          • A very interesting idea. I wonder about creating a virtual file system that would implement this and maybe do a bit more to fully flesh out this idea.
                                                                                                                                                                                                                                                                                                                                                                                                          • What do you think?
                                                                                                                                                                                                                                                                                                                                                                                                          • ***
                                                                                                                                                                                                                                                                                                                                                                                                            News Roundup
                                                                                                                                                                                                                                                                                                                                                                                                            Daemons and friendly Ninjas

                                                                                                                                                                                                                                                                                                                                                                                                            There’s quite a lot of software that uses CMake as a (meta-)buildsystem. A quick count in the FreeBSD ports tree shows me 1110 ports (over a thousand) that use it. CMake generates buildsystem files which then direct the actual build — it doesn’t do building itself.

                                                                                                                                                                                                                                                                                                                                                                                                            There are multiple buildsystem-backends available: in regular usage, CMake generates Makefiles (and does a reasonable job of producing Makefiles that work for GNU Make and for BSD Make). But it can generate Ninja, or Visual Studio, and other buildsystem files. It’s quite flexible in this regard.
                                                                                                                                                                                                                                                                                                                                                                                                            Recently, the KDE-FreeBSD team has been working on Qt WebEngine, which is horrible. It contains a complete Chromium and who knows what else. Rebuilding it takes forever.
                                                                                                                                                                                                                                                                                                                                                                                                            But Tobias (KDE-FreeBSD) and Koos (GNOME-FreeBSD) noticed that building things with the Ninja backend was considerably faster for some packages (e.g. Qt WebEngine, and Evolution data-thingy). Tobias wanted to try to extend the build-time improvements to all of the CMake-based ports in FreeBSD, and over the past few days, this has been a success.
                                                                                                                                                                                                                                                                                                                                                                                                            Ports builds using CMake now default to using Ninja as buildsystem-backend.
                                                                                                                                                                                                                                                                                                                                                                                                            Here’s a bitty table of build-times. These are one-off build times, so hardly scientifically accurate — but suggestive of a slight improvement in build time.

                                                                                                                                                                                                                                                                                                                                                                                                            Name Size GMake Ninja
                                                                                                                                                                                                                                                                                                                                                                                                            liblxt 50kB 0:32 0:31
                                                                                                                                                                                                                                                                                                                                                                                                            llvm38 1655kB * 19:43
                                                                                                                                                                                                                                                                                                                                                                                                            musescore 47590kB 4:00 3:54
                                                                                                                                                                                                                                                                                                                                                                                                            webkit2-gtk3 14652kB 44:29 37:40

                                                                                                                                                                                                                                                                                                                                                                                                            Or here’s a much more thorough table of results from tcberner@, who did 5 builds of each with and without ninja. I’ve cut out the raw data, here are just the average-of-five results, showing usually a slight improvement in build time with Ninja.

                                                                                                                                                                                                                                                                                                                                                                                                            Name av make av ninj Delta D/Awo
                                                                                                                                                                                                                                                                                                                                                                                                            compiler-rt 00:08 00:07 -00:01 -14%
                                                                                                                                                                                                                                                                                                                                                                                                            openjpeg 00:06 00:07 +00:01 +17%
                                                                                                                                                                                                                                                                                                                                                                                                            marble 01:57 01:43 -00:14 -11%
                                                                                                                                                                                                                                                                                                                                                                                                            uhd 01:49 01:34 -00:15 -13%
                                                                                                                                                                                                                                                                                                                                                                                                            opencacscade 04:08 03:23 -00:45 -18%
                                                                                                                                                                                                                                                                                                                                                                                                            avidemux 03:01 02:49 -00:12 – 6%
                                                                                                                                                                                                                                                                                                                                                                                                            kdevelop 01:43 01:33 -00:10 – 9%
                                                                                                                                                                                                                                                                                                                                                                                                            ring-libclient 00:58 00:53 -00:05 – 8%

                                                                                                                                                                                                                                                                                                                                                                                                            Not everything builds properly with Ninja. This is usually due to missing dependencies that CMake does not discover; this shows up when foo depends on bar but no rule is generated for it. Depending on build order and speed, bar may be there already by the time foo gets around to being built. Doxygen showed this, where builds on 1 CPU core were all fine, but 8 cores would blow up occasionally.

                                                                                                                                                                                                                                                                                                                                                                                                            In many cases, we’ve gone and fixed the missing implicit dependencies in ports and upstreams. But some things are intractable, or just really need GNU Make. For this, the FreeBSD ports infrastructure now has a knob attached to CMake for switching a port build to GNU Make.

                                                                                                                                                                                                                                                                                                                                                                                                            Normal: USES=cmake

                                                                                                                                                                                                                                                                                                                                                                                                            Out-of-source: USES=cmake:outsource
                                                                                                                                                                                                                                                                                                                                                                                                            GNU Make: USES=cmake:noninja gmake
                                                                                                                                                                                                                                                                                                                                                                                                            OoS, GMake: USES=cmake:outsource,noninja gmake
                                                                                                                                                                                                                                                                                                                                                                                                            Bad: USES=cmake gmake

                                                                                                                                                                                                                                                                                                                                                                                                            For the majority of users, this has no effect, but for our package-building clusters, and for KDE-FreeBSD developers who build a lot of CMake-buildsystem software in a day it may add up to an extra coffee break. So I’ll raise a shot of espresso to friendship between daemons and ninjas.

                                                                                                                                                                                                                                                                                                                                                                                                            Announcing the pkgsrc-2017Q2 release
                                                                                                                                                                                                                                                                                                                                                                                                            • For the 2017Q2 release we welcome the following notable package additions and changes to the pkgsrc collection:
                                                                                                                                                                                                                                                                                                                                                                                                              • Firefox 54
                                                                                                                                                                                                                                                                                                                                                                                                              • GCC 7.1
                                                                                                                                                                                                                                                                                                                                                                                                              • MATE 1.18
                                                                                                                                                                                                                                                                                                                                                                                                              • Ruby 2.4
                                                                                                                                                                                                                                                                                                                                                                                                              • Ruby on Rails 4.2
                                                                                                                                                                                                                                                                                                                                                                                                              • TeX Live 2017
                                                                                                                                                                                                                                                                                                                                                                                                              • Thunderbird 52.1
                                                                                                                                                                                                                                                                                                                                                                                                              • Xen 4.8
                                                                                                                                                                                                                                                                                                                                                                                                              • We say goodbye to:
                                                                                                                                                                                                                                                                                                                                                                                                                • Ruby 1.8
                                                                                                                                                                                                                                                                                                                                                                                                                • Ruby 2.1
                                                                                                                                                                                                                                                                                                                                                                                                                • The following infrastructure changes were introduced:
                                                                                                                                                                                                                                                                                                                                                                                                                  • Implement optional new pkgtasks and init infrastructure for pkginstall.
                                                                                                                                                                                                                                                                                                                                                                                                                  • Various enhancements and fixes for building with ccache.
                                                                                                                                                                                                                                                                                                                                                                                                                  • Add support to USE_LANGUAGES for newer C++ standards.
                                                                                                                                                                                                                                                                                                                                                                                                                  • Enhanced support for SSP, FORTIFY, and RELRO.
                                                                                                                                                                                                                                                                                                                                                                                                                  • The GitHub mirror has migrated to https://github.com/NetBSD/pkgsrc
                                                                                                                                                                                                                                                                                                                                                                                                                  • In total, 210 packages were added, 43 packages were removed, and 1,780 package updates were processed since the pkgsrc-2017Q1 release.
                                                                                                                                                                                                                                                                                                                                                                                                                  • ***
                                                                                                                                                                                                                                                                                                                                                                                                                    OpenBSD changes of note 624
                                                                                                                                                                                                                                                                                                                                                                                                                    • There are a bunch, but here are a few that jump out:

                                                                                                                                                                                                                                                                                                                                                                                                                      • Start plugging some leaks. Compile kernels with umask 007. Install them minus read permissions.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Pure preprocessor implementation of the roff .ec and .eo requests, though you are warned that very bad things will happen to anybody trying to use these macros in OpenBSD manuals.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Random linking for arm64. And octeon. And alpha. And hppa. There’s some variation by platform, because every architecture has the kernel loaded with different flavors of initial physical and virtual mappings. And landisk. And loongson. And sgi. And macppc. And a gap file for sparc64, but nobody yet dares split locore. And arm7.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Errata for perl File::Path race condition.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Some fixes for potential link attacks against cron.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Add pledge violations to acct reporting.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Take random linking to the next stage. More about KARL - kernel address randomized link. As noted, a few difficulties with hibernate and such, but the plan is coming together. Add a new function reorder_kernel() that relinks and installs the new kernel in the background on system startup. Add support for the bootblocks to detect hibernate and boot the previous kernel.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Remove the poorly described “stuff” from ksh.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Replace usage of TIOCSTI in csh using a more common IO loop. Kind of like the stuff in ksh, but part of the default command line editing and parsing code, csh would read too many characters, then send the ones it didn’t like back into the terminal. Which is weird, right? Also, more importantly, eliminating the code that uses TIOCSTI to inject characters into ttys means that maybe TIOCSTI can be removed.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Revamp some of the authentication logging in ssh.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Add a verbose flag to rm so you can panic immediately upon seeing it delete the wrong file instead of waiting to discover your mistake after the fact.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Update libexpat to version 2.2.1 which has some security fixes. Never trust an expat, that’s my motto.
                                                                                                                                                                                                                                                                                                                                                                                                                      • Update inteldrm to code based on Linux 4.4.70. This brings us support for Skylake and Cherryview and better support for Broadwell and Valleyview. Also adds MST support. Fun times for people with newish laptops.
                                                                                                                                                                                                                                                                                                                                                                                                                      • ***
                                                                                                                                                                                                                                                                                                                                                                                                                        OPNsense 17.1.9 released
                                                                                                                                                                                                                                                                                                                                                                                                                        • firewall: move gateway switching from system to firewall advanced settings
                                                                                                                                                                                                                                                                                                                                                                                                                        • firewall: keep category selection when changing tabs
                                                                                                                                                                                                                                                                                                                                                                                                                        • firewall: do not skip gateway switch parsing too early (contributed by Stephane Lesimple)
                                                                                                                                                                                                                                                                                                                                                                                                                        • interfaces: show VLAN description during edit
                                                                                                                                                                                                                                                                                                                                                                                                                        • firmware: opnsense-revert can now handle multiple packages at once
                                                                                                                                                                                                                                                                                                                                                                                                                        • firmware: opnsense-patch can now handle permission changes from patches
                                                                                                                                                                                                                                                                                                                                                                                                                        • dnsmasq: use canned –bogus-priv for no_private_reverse
                                                                                                                                                                                                                                                                                                                                                                                                                        • dnsmasq: separate log file, ACL and menu entries
                                                                                                                                                                                                                                                                                                                                                                                                                        • dynamic dns: fix update for IPv6 (contributed by Alexander Leisentritt)
                                                                                                                                                                                                                                                                                                                                                                                                                        • dynamic dns: remove usage of CURLAUTH_ANY (contributed by Alexander Leisentritt)
                                                                                                                                                                                                                                                                                                                                                                                                                        • intrusion detection: suppress “fast mode available” boot warning in PCAP mode
                                                                                                                                                                                                                                                                                                                                                                                                                        • openvpn: plugin framework adaption
                                                                                                                                                                                                                                                                                                                                                                                                                        • unbound: add local-zone type transparent for PTR zone (contributed by Davide Gerhard)
                                                                                                                                                                                                                                                                                                                                                                                                                        • unbound: separate log file, ACL and menu entries
                                                                                                                                                                                                                                                                                                                                                                                                                        • wizard: remove HTML from description strings
                                                                                                                                                                                                                                                                                                                                                                                                                        • mvc: group relation to something other than uuid if needed
                                                                                                                                                                                                                                                                                                                                                                                                                        • mvc: rework “item in” for our Volt templates
                                                                                                                                                                                                                                                                                                                                                                                                                        • lang: Czech to 100% translated (contributed by Pavel Borecki)
                                                                                                                                                                                                                                                                                                                                                                                                                        • plugins: zabbix-agent 1.1 (contributed by Frank Wall)
                                                                                                                                                                                                                                                                                                                                                                                                                        • plugins: haproxy 1.16 (contributed by Frank Wall)
                                                                                                                                                                                                                                                                                                                                                                                                                        • plugins: acme-client 1.8 (contributed by Frank Wall)
                                                                                                                                                                                                                                                                                                                                                                                                                        • plugins: tinc fix for switch mode (contributed by Johan Grip)
                                                                                                                                                                                                                                                                                                                                                                                                                        • plugins: monit 1.3 (contributed by Frank Brendel)
                                                                                                                                                                                                                                                                                                                                                                                                                        • src: support dhclient supersede statement for option 54 (contributed by Fabian Kurtz)
                                                                                                                                                                                                                                                                                                                                                                                                                        • src: add Intel Atom Cherryview SOC HSUART support
                                                                                                                                                                                                                                                                                                                                                                                                                        • src: add the ID for the Huawei ME909S LTE modem
                                                                                                                                                                                                                                                                                                                                                                                                                        • src: HardenedBSD Stack Clash mitigations[1]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: sqlite 3.19.3[2]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: openvpn 2.4.3[3]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: sudo 1.8.20p2[4]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: dnsmasq 2.77[5]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: openldap 2.4.45[6]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: php 7.0.20[7]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: suricata 3.2.2[8]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: squid 3.5.26[9]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: ca_root_nss 3.31
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: bind 9.11.1-P2[10]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: unbound 1.6.3[11]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ports: curl 7.54.1[12]
                                                                                                                                                                                                                                                                                                                                                                                                                        • ***
                                                                                                                                                                                                                                                                                                                                                                                                                          Beastie Bits
                                                                                                                                                                                                                                                                                                                                                                                                                          • Thinkpad x230 - trying to get TrackPoint / Touchpad working in X
                                                                                                                                                                                                                                                                                                                                                                                                                          • FreeBSD deprecates all r-cmds (rcp, rlogin, etc.)
                                                                                                                                                                                                                                                                                                                                                                                                                          • Bashfill - art for your terminal
                                                                                                                                                                                                                                                                                                                                                                                                                          • Go 1.9 release notes: NetBSD support is broken, please help
                                                                                                                                                                                                                                                                                                                                                                                                                          • Jest, A ReST api for creating and managing FreeBSD jails written in Go
                                                                                                                                                                                                                                                                                                                                                                                                                          • ***
                                                                                                                                                                                                                                                                                                                                                                                                                            Feedback/Questions
                                                                                                                                                                                                                                                                                                                                                                                                                            • John - zfs send/receive
                                                                                                                                                                                                                                                                                                                                                                                                                            • Callum - laptops & An update
                                                                                                                                                                                                                                                                                                                                                                                                                            • Lars - Snapshot of VM datadisk
                                                                                                                                                                                                                                                                                                                                                                                                                            • Daryl - Jail managers
                                                                                                                                                                                                                                                                                                                                                                                                                            • ***
                                                                                                                                                                                                                                                                                                                                                                                                                              1 hr 17 min