BSD Kernel Question from A Linux User reddit / BSD ---------------------------------------------------------------------- gerowen · 2019-07-03 16:14 I'm a long time Linux user and have found myself curious about BSD as of late and had a question I haven't seen brought up before. Regarding the kernel, is there a central kernel team that all the derivative projects like OpenBSD, FreeBSD, Dragonfly, etc. all pull from, or is maintaining and updating the kernel completely the job of the developers of each project? Example, regarding something like Spectre mitigations, did each team have to do duplicate work and figure out their own solutions independently, or is there some central kernel group that implemented a fix that was then pushed out to all of the derivative BSD projects? ---------------------------------------------------------------------- PitifulView · 2019-07-03 16:17 Nope, every BSD does it on their own. Some people are involved with more than 1 project but it is their decision. ---------------------------------------------------------------------- BanazirGalbasi · 2019-07-03 18:53 One key thing to mention here is that Linux is one OS with multiple distributions, while each BSD is its own OS. They have shared history going back to the original BSD but they're not variations of each other the same way Linux distros are. With that in mind, core development on each one is done separately as far as I can tell. ---------------------------------------------------------------------- freakinunoriginal · 2019-07-03 20:52 FreeBSD and NetBSD forked from BSD4.4, and then OpenBSD from NetBSD if I remember right. Each develops both their kernel and userland, independently of the other BSDs. This is from 2017 about attack surface and response to vulnerabilities among the BSDs: [https://youtu.be/rRg2vuwF1hY](https://youtu.be/rRg2vuwF1hY) that might illustrate some differences. Meanwhile, Debian, Arch, Fedora, etc can usually boot any of the contemporary Linux kernel builds. No one has forked the Linux kernel for anything other than pointless Code of Conduct protests. ---------------------------------------------------------------------- Kernigh · 2019-07-04 04:55 There's no "central kernel group", but the BSDs do help each other sometimes. If you search the [OpenBSD commit messages](https://marc.info/?l=openbsd-cvs&r=1&w=2), you may find mentions of DragonFly, FreeBSD, and NetBSD. For example, the [bwi(4)](https://man.openbsd.org/bwi) driver came to OpenBSD from DragonFly. More recently, part of the Meltdown fix in OpenBSD was ["inspired by DragonFlyBSD"](https://marc.info/?l=openbsd- cvs&m=151924107018358&w=2). Maxime Villard, author of [NetBSD's NVMM](https://blog.netbsd.org/tnf/entry/from_zero_to_nvmm), also [reports bugs](https://marc.info/?l=openbsd-cvs&m=153735762609963&w=2) in OpenBSD's [vmm(4)](https://man.openbsd.org/vmm), though the 2 kernels use different code. ---------------------------------------------------------------------- brynet · 2019-07-05 14:26 All the BSD's have separately maintained their own kernel and userlands for well over 20 years. They're different operating systems, but part of a family of systems descended from the original work done during the CSRG days at Berkeley. ---------------------------------------------------------------------- jdrch · 2019-07-08 17:33 >Linux is one OS with multiple distributions Linux is a centrally maintained *kernel*. Each distro (OS) uses a specific version of said kernel, compiled for their supported platforms. Each distro also configures the non-kernel aspects of itself as it sees fit. BSDs are independently maintained *as a whole* (kernel + everything else), with the overarching goal across all BSDs of being an [open source UNIX implementation](https://www.reddit.com/r/BSD/comments/catk 2d/what_is_the_overarching_philosophy_of_bsd_that/etb1n9i/). It's hard to compared the two because they use completely different paradigms. But if I were to boil it down to one sentence, I'd say this: In Linux each distro is responsible for everything but the kernel while each BSD is responsible for everything, period, subject to that implementation goal. In Linux, the common thread among distros is the kernel, while in BSD/Unix the common thread among OSes is UNIX implementation. ---------------------------------------------------------------------- BanazirGalbasi · 2019-07-08 18:27 Thanks for the correction. I wasn't sure about how much BSDs have in common with each other so I went with the basic "one OS vs many OSes" description, albeit at the cost of accuracy. ---------------------------------------------------------------------- jdrch · 2019-07-08 18:38 > Thanks for the correction All good. It's not an easy distinction to make because most posts on the topic are written by fanatics of one side or the other, and so the comparison devolves into "Which is better?" as opposed to simply describing their differences. This is why I run all 3 major OS paradigms (Windows 10 (NT kernel), Ubuntu (Linux), and BSD (Unix)) so I don't fall into the trap of defending my OS choice as opposed to ensuring I use each OS for what it's best at. /soapbox > how much BSDs have in common with each other In a very general theoretical sense, code developed to run on UNIX- implementation OSes should run on all UNIX-implementation OSes. Reality is slightly more complicated. For one, UNIX is a commercial trademark that requires expensive licensing, which poses a problem for projects that are open source, not sold for money, and developed by volunteers. Because none of the BSDs have gone through the licensing process, UNIX portability can't be *guaranteed* with them. From my experience, though, code *compiled* for one should run on the other, but not necessarily run well. For example, a package that was written for an OS that uses rc.d will still run on one that uses OpenRC, but running it as a service will be problematic (or requires a matching OpenRC script, which you'll mostly likely have to write yourself.) However, the similarities among the BSDs are sufficient for code to be ported "easily" enough between them while retaining core functionality (read: most basic/critical features will work). Anyway, the important thing here is not being "right" or "wrong," it's the willingness to learn, which you certainly have :) ---------------------------------------------------------------------- zinsuddu · 2019-07-16 17:40 >But if I were to boil it down to one sentence, I'd say this: In Linux each distro is responsible for everything but the kernel while each BSD is responsible for everything There may be a misunderstanding that Linux distros of themselves maintain anything. It hides the way that the Linux operating system is actually developed. Debian, Fedora, OpenSUSE, Arch, Gentoo, Mint, ..., do not write operating system code. They are not the maintainers of any operating system code. Not the kernel, not the compiler and toolchain, not the networking stack, not the filesystems, not the X or Wayland gui, not the applications. I think it's misleading to say that "in Linux each distro is responsible for everything but the kernel." **All** of the component parts of the Linux operating system are written, tested, and maintained *elsewhere* (e.g. the kernel by Linus and his lieutenants, the GCC compiler and libc by gnu folk, systemd by Poettering and team, ..., etc.). What each Linux distro does is assemble a set of compatible source tarballs from that *elsewhere* and compile it into packages. And fight the endless and noble battle of making it all work together. I'm not trying to "dis" Linux. Quite the opposite! That Linux can be developed by a loosely-coupled set of sub-projects with thousands of developers who have no "manager" and no single source repository is a modern miracle. I *am* dissing the notion that *distros* are responsible for that operating system: Distros don't write code. They exist to package code. BSDs do write code, lots of code, and consider it their primary mission to develop source code for the world to use. The packaging work for the "ports tree" is often, especially in FreeBSD, considered secondary and even unimportant. **If I were to boil it down to one sentence, I'd say this: In Linux there is more or less only one operating system developed by numerous broadly distributed sub-projects** ***(the source code is all over the world)*** **and packaged into usable form by numerous distros while in BSD there are several operating systems each developed by one cohesive group** ***(the source code is on one server)*** **and packaged into usable form by that same group.** The difference is my one sentence is too long :) ---------------------------------------------------------------------- jdrch · 2019-07-16 19:55 > misleading to say that "in Linux each distro is responsible for everything but the kernel." Only a BSD greybeard would worry *this much* about wording :P > Linux distro does is assemble a set of compatible source tarballs from that elsewhere and compile it into packages. And fight the endless and noble battle of making it all work together. That's kind of what I meant by "responsible for," but I can see how you'd interpret that phrase differently. > In Linux there is more or less only one operating system developed by numerous broadly distributed sub-projects (the source code is all over the world) and packaged into usable form by numerous distros while in BSD there are several operating systems each developed by one cohesive group (the source code is on one server) and packaged into usable form by that same group. Yeah that's better than what I came up with. Thanks! ---------------------------------------------------------------------- Ishiken · 2019-07-17 02:24 This is old, but always a fun and informative read: [http://www.over- yonder.net/\~fullermd/rants/bsd4linux/01](http://www.over- yonder.net/~fullermd/rants/bsd4linux/01)