Unix Archive

Bringing memory safety to sudo and su by rewriting them in Rust

The sudo and su utilities mediate a critical privilege boundary on just about every open source operating system that powers the Internet. Unfortunately, these utilities have a long history of memory safety issues. By rewriting sudo and su in Rust we can make sure they don’t suffer from any more memory safety vulnerabilities. We’re going to get it done. Like I said – Rust is everywhere. Of course, these specific rewrites are not necessarily going to be picked up by the various Linux distributions, but the fact people are starting projects like this means it won’t be long before we’re going to see core UNIX utilities rewritten in Rust making their way to our machines.

The mass extinction of UNIX workstations

Back in the ’90s and very early 2000s, a whole market segment of computers existed that we don’t really talk about anymore today: the UNIX workstation. They were non-x86 machines running one of the many commercial UNIX variants, and were used for the very high end of computing. They were expensive, unique, different, and quite often incredibly overengineered. Countless companies made and sold these UNIX workstation. SGI was a big player in this market, with their fancy, colourful machines with MIPS processors running IRIX. There was also Sun Microsystems (and Oracle in the tail end), selling ever more powerful UltraSPARC workstations running Solaris. Industry legend DEC sold Alpha machines running Digital UNIX (later renamed to Tru64 UNIX when DEC was acquired by Compaq in 1998). IBM of course also sold UNIX workstations, powered by their PowerPC architecture and AIX operating system. As x86 became ever more powerful and versatile, and with the rise of Linux as a capable UNIX replacement and the adoption of the NT-based versions of Windows, the days of the UNIX workstations were numbered. A few years into the new millennium, virtually all traditional UNIX vendors had ended production of their workstations and in some cases even their associated architectures, with a lacklustre collective effort to move over to Intel’s Itanium – which didn’t exactly go anywhere and is now nothing more than a sour footnote in computing history. Approaching roughly 2010, all the UNIX workstations had disappeared. Development of MIPS, UltraSPARC (for workstations), Alpha, and others had all been wound down, and with a few exceptions, the various commercial UNIX variants started to languish in extended support purgatory, and by now, they’re all pretty much dead (save for Solaris). Users and industries moved on to x86 on the hardware side, and Linux, Windows, and in some cases, Mac OS X on the software side. I’ve always been fascinated by these UNIX workstations. They were this mysterious, unique computers running software that was entirely alien to me, and they were impossibly expensive. Over the years, I’ve owned exactly one of these machines – a Sun Ultra 5 running Solaris 9 – and I remember enjoying that little machine greatly. I was a student living in a tiny apartment with not much money to spare, but back in those days, you couldn’t load a single page on an online auction website without stumbling over piles of Ultra 5s and other UNIX workstations, so they were cheap and plentiful. Even as my financial situation improved and money wasn’t short anymore, my apartment was still far too small to buy even more computers, especially since UNIX workstations tended to be big and noisy. Fast forward to the 2020s, however, and everything’s changed. My house has plenty of space, and I even have my own dedicated office for work and computer nonsense, so I’ve got more than enough room to indulge and buy UNIX workstations. It was time to get back in the saddle. But soon I realised times had changed. Over the past few years, I have come to learn that If you want to get into buying, using, and learning from UNIX workstations today, you’ll run into various problems which can roughly be filed into three main categories: hardware availability, operating system availability, and third party software availability. I’ll walk through all three of these and give some examples that I’ve encountered, most of them based on the purchase of a UNIX workstation from a vendor I haven’t mentioned yet: Hewlett Packard. Hardware availability: a tulip for a house The first place most people would go to in order to buy a classic UNIX workstation is eBay. Everyone’s favourite auction site and online marketplace is filled with all kinds of UNIX workstations, from the ’80s all the way up to the final machines from the early 2000s. You’ll soon notice, however, that pricing seems to have gone absolutely – pardon my Gaelic – absolutely batshit insane. Are you interested in a Sun Ultra 45, from 2005, without any warranty and excluding shipping? That’ll be anywhere from €1500 to €2500. Or are you more into SGI, and looking to buy a a 175 Mhz Indigo 2 from the mid-’90s? Better pony up at least €1250. Something as underpowered as a Sun Ultra 10 from 1998 will run for anything between €700 and €1300. Getting something more powerful like an SGI Fuel? Forget about it. Going to refurbishers won’t help you much either. Just these past few days I was in contact with a refurbisher here in Sweden who is charging over €4000 for a Sun Ultra 45. For a US perspective, a refurbisher like UNIX HQ, for instance, has quite a decent selection of machines, but be ready to shell out $2000 for an IBM IntelliStation POWER 285 running AIX, $1300 for a Sun Blade 2500, or $2000-$2500 for an SGI Fuel, to list just a few. Of course, these prices are without shipping or possible customs fees. It will come as no surprise that shipping these machines is expensive. Shipping a UNIX workstation from the US – where supply is relatively ample – to Europe often costs more than the computer itself, easily doubling your total costs. On top of that, there’s the crapshoot lottery of customs fees, which, depending on the customs official’s mood, can really be just about anything. I honestly have no idea why pricing has skyrockted as much as it has. Machines like these were far, far cheaper only 5-10 years ago, but it seems something happened that pushed them up – quite a few of them are definitely not rare, so I doubt rarity is the cause. Demand can’t exactly be high either, so I doubt there’s so many people buying these that they’re forcing the price to go up. I do have a few theories, such as some machines being absolutely required in some specific niche somewhere and sellers just sitting on them until one breaks and must be replaced, whatever the cost,

The HP-UX Porting and Archive Centre

The HP-UX Porting and Archive Centre was established in August 1992 in the Department of Computer Science at Liverpool University in the United Kingdom, but has been run by Liverpool-based Connect Internet Solutions Limited since 1995. Its primary aim is to make public domain, freeware and Open Source software more readily available to users of Hewlett-Packard UNIX systems. The archive began with an initial collection of 150 packages, all of which had been successfully compiled and tested locally by staff at the Liverpool centre before being installed and made available on the archive. The centre continues to act as a porting body as well as an archive site – all software held in the archive has been verified to run successfully on HP-UX PA-RISC (and now Itanium) systems. As of October 2012, the Centre held over 1,500 packages! For reasons that will become apparent somewhere in the coming weeks, I’ve been spending a lot of time exploring and using HP-UX, and the HP-UX Porting and Archive Centre is one of those things that the four enthusiasts running HP-UX might find useful. It’s a vast collection of open source and freeware software built for HP-UX, installable either manually or using a specific script to resolve dependencies. This is one heck of a labour of love, considering HP-UX’, shall we say, unpopular status. Sadly, the Archive has a major limitation, one that I ran into: since 2017, only the very latest version of HP-UX – 11.31, also known as 11i v3 – is supported, meaning packages for the version I’m running, 11.11 or 11i v1, have long ago been deleted. On top of that, since 2020, all PA-RISC packages are marked as deprecated, meaning they’re no longer updated and will, at some point, be deleted too, leaving only Itanium 2 packages up for download. Using HP-UX as an enthusiast is one hell of a challenge, I can tell you that.

Transcending POSIX: the end of an era?

In this article, we provide a holistic view of the Portable Operating System Interface (POSIX) abstractions by a systematic review of their historical evolution. We discuss some of the key factors that drove the evolution and identify the pitfalls that make them infeasible when building modern applications. Some light reading to start the week.

The MGR Window System

MGR, sometimes said to be short for “ManaGeR”, sometimes short for “Munger”, is a simple network transparent window system. It was originally developed for the Sun 3 series of workstations by Stephen Uhler and colleagues beginning in 1984 while at Bellcore (later Telcordia, now part of Ericsson) and later enhanced by many others. The window system ran on many different hardware platforms, at least these: Sun 3/xx workstations running SunOS, which was the the original development platform, Sun SPARCstations (SunOS and then ported by me to Solaris), Intel x86 based PCs (Coherent, Minix, FreeBSD or Linux), Atari ST (under MiNT), AT&T UnixPC (SysV) and the Macintosh. I had never heard of MGR before, so this was a great read.

Why V7 Unix matters so much

When I talk about things involving the history of Unix, I often wind up mentioning V7, also known as Seventh Edition of Research Unix from Bell Labs (for a recent example, in my entry on when Unix got stack size limits). If you’re relatively new to the history of Unix, you might wonder why V7 keeps coming up so often. There are a number of reasons that V7 matters so much both for the history of Unix and for what is what we think of as being ‘Unix’ and the Unix way. The history of Unix is… Complicated.

A new path: vm86-based Venix emulator

So, I stole the bulk of my old 86sim-based Venix implementation, installed a i386 VM using bhyve on my FreeBSD/amd64 box and write a quick little test program. The test program worked, so in a fit of “why not give this a try” I ported the pcvenix.cc from 86sim to being driven from SIGSEGV in vm86 mode. Hello world quickly worked. I didn’t even know what Venix was before coming across this post, but it turns out it was a lightweight UNIX implementation for a variety of platforms.

The HP-UX Porting and Archive Centre

The HP-UX Porting and Archive Centre was established in August 1992 in the Department of Computer Science at Liverpool University in the United Kingdom, but has been run by Liverpool-based Connect Internet Solutions Limited since 1995. Its primary aim is to make public domain, freeware and Open Source software more readily available to users of Hewlett-Packard UNIX systems. I’m about to buy a HP-UX workstation for OSNews (become an OSNews Patreon if you want to help!) since I’ve found an amazing deal, so I’ve been diving into the – to me – unknown world of HP-UX. I stumbled upon this software archive, which could prove to be quite useful to other people considering snapping up an old HP-UX workstation.

v7/x86: the last true UNIX, ported to x86

V7/x86 is a port of the Seventh Edition of the UNIX operating system to the x86 (i386) based PC. UNIX V7 was the last general distribution (around 1979) to come from the Research group at Bell Labs, the original home of UNIX. The port was done mostly around 1999 when “Ancient UNIX” source code licenses first became available, and was revised for release, with some enhancements, during 2006-7. The distribution includes the full UNIX Version 7 operating system, with source code, pre-built binaries, man pages, and original Version 7 documentation. Also included are a custom UNIX-style x86 assembler, an ACK-based C compiler, and several key early UCB software components such as the C shell, the editors ex and vi, and the pager more. I’m inclined to try and run this virtually, to see just how bastardised and messy UNIX has become in our current UNIX derivatives.

Unix v6 for Qemu RISC-V

xv6 is a re-implementation of Dennis Ritchie’s and Ken Thompson’s Unix Version 6 (v6). xv6 loosely follows the structure and style of v6, but is implemented for a modern RISC-V multiprocessor using ANSI C. Exactly what it says on the tin. It runs on Qemu’s RISC-V target.

Unix at 50: How the OS that powered smartphones started from failure

Maybe its pervasiveness has long obscured its origins. But Unix, the operating system that in one derivative or another powers nearly all smartphones sold worldwide, was born 50 years ago from the failure of an ambitious project that involved titans like Bell Labs, GE, and MIT. Largely the brainchild of a few programmers at Bell Labs, the unlikely story of Unix begins with a meeting on the top floor of an otherwise unremarkable annex at the sprawling Bell Labs complex in Murray Hill, New Jersey. I acknowledge the importance of UNIX – who doesn’t – but I hate how it has become a huge roadblock to any meaningful rethinking and improvement in lower-level operating system design. The best we can do seems to be to hide the ’60s guts underneath ever more layers, instead of addressing the actual shortcomings of such an old design. But hey, I’ve learned over the years that criticizing UNIX is akin to drowning kittens, so maybe I should just fall in line and parrot the party line – UNIX is great, UNIX is perfect, and UNIX needs zero modernisation because it was instantly perfect.

Commodore’s forgotten UNIX workstation

Commodore built this prototype UNIX workstation/server computer in the same time frame as the Amiga and their PC-Clone and then decided that they only had production capacity for two out of three, and the CBM900 lost. All the approx 300-500 prototypes were recalled for destruction, but due to some kind of “mistake” this particular machine, which was on loan to a favored customer in Denmark, never made it back. The machine resurfaced when this company cleaned up their basement, and sent 3 euro-pallets of Commodore artifacts our way. I never knew Commodore tried to build a UNIX workstation. I shouldn’t be surprised though; virtually everyone dabbled in UNIX workstations in the ’80s. This page has more information about the CBM900.

Vintage gaming on Xenix

This post is about vintage gaming in vintage unusual operating systems, focused on Xenix/x86. Tried Hampa’s turnkey xenix86 images while they had been tested in fake86, 8086tiny and other emulators. The installation was surprisingly easy, because most software packages in floppy/tape images are basically in .tar format, so let’s check GAMES 360k floppy image’s content on host. I can’t get enough of articles like these.

RetroBSD: Unix for microcontrollers

RetroBSD is a port of 2.11BSD Unix intended for embedded systems with fixed memory mapping. The current target is Microchip PIC32 microcontroller with 128 kbytes of RAM and 512 kbytes of Flash. PIC32 processor has MIPS M4K architecture, executable data memory and flexible RAM partitioning between user and kernel modes.