HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
freebsd
freebsd-src
C2012–2026
freebsd / freebsd-src

freebsd-src

The FreeBSD src tree publish-only repository. Experimenting with 'simple' pull requests....

122Distinct people
189Mentions
1Explicit recommenders
9.5KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The FreeBSD src tree publish-only repository. Experimenting with 'simple' pull requests....

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

My favorite piece of man trivia is from the source of the tunefs BSD man page, which contains: .\" Take this out and a Unix Daemon will dog your steps from now until .\" the…

beej71 used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 8–Nov 15 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/15/2026, 12:45:45 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year189 dated mentions

Observed mentions: 2012-05-14 23:44:07 UTC to 2026-10-26 20:08:28 UTC.

01020302012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 7 mentions; 0 submissions, 7 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 16 mentions; 1 submissions, 15 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 17 mentions; 0 submissions, 17 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 14 mentions; 1 submissions, 13 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 28 mentions; 2 submissions, 26 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 20 mentions; 1 submissions, 19 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 24 mentions; 0 submissions, 24 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 23 mentions; 0 submissions, 23 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 10 mentions; 2 submissions, 8 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 10 mentions; 1 submissions, 9 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC101
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC202
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC707
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC808
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC404
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC16115
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC17017
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC14113
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC28226
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC20119
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC24024
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC23023
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC1028
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC1019
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC505

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
FreeBSD Source: This is the top level of the FreeBSD source directory. FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms. A large community has continually developed it for more than thirty years. Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices. For copyright information, please see the file COPYRIGHT in this directory. Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information. The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree. See build(7), config(8), FreeBSD handbook on building userland, and Handbook for kernels for more information, including setting make(1) variables. For information on the CPU architectures and platforms supported by FreeBSD, see the FreeBSD website's Platforms page. For official FreeBSD bootable images, see the release page. Source Roadmap: Directory Description bin System/user commands. cddl Source code for third-party software under the Common Development and Distribution License. contrib Source code for third-party software. crypto Source code for cryptographic libraries and commands (see crypto/README). etc Template files for /etc. include System include files. kerberos5 Build system for Kerberos 5 (Heimdal). krb5 Build system for Kerberos 5 (MIT). lib System libraries. libexec System commands intended to be executed by other commands or daemons. packages Base system packages. release Makefiles and scripts used for building releases and VM images. rescue Build system for statically linked /rescue commands. sbin System commands. secure Build system for cryptographic libraries and commands (excluding Kerberos). share Shared resources. stand Boot loader sources. sys Kernel sources (see sys/README.md). targets Support for experimental DIRDEPS_BUILD tests Tests which can be run by Kyua. See tests/README for additional information. tools Ancillary utilities and tests (not included in the build). usr.bin User commands. usr.sbin System administration commands. For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see FreeBSD Handbook.
Read the full README on GitHub

What Hacker News says

20 sources
Darwin and MacOS aren't really all that related to NeXTSTEP, on purpose. NeXTSTEP had proprietary UNIX code in it, and required a UNIX license from AT&T to distribute. Additionally, the display manager (infamously) was based on Display Postscript, which also required a license from Adobe. My understanding (which is by no means 100% certain! the following is my best guess) is XNU and Darwin were almost complete "rewrites" of NeXTSTEP, preserving the "idea" but with new code. NeXT's Mach 2 based kernel and BSD userland, which seems to have been very similar to the system developed by Avie Tevanian at CMU and used on their VAXen, was replaced with XNU, which used a Mach 3 derivative from DEC's OSF/1 project, coupled with a new (non-AT&T encumbered!) BSD userland and kernel "module"/personality based on an amalgam of then forks of 4.4BSD-Lite
Read the rest
/386BSD, namely FreeBSD and NetBSD (several big bits of libc are from NetBSD). Point being, I doubt they've copied/pasted large chunks of Free/NetBSD into Darwin/XNU since the late 90s/early 2000s. There was been code flow between the two, but I doubt they'd backport big features like jails (and linux emulation). (not to mention that Apple's own MACF framework seems to take the place of jails in the code -- see https://github.com/apple/darwin-xnu/blob/main/bsd/kern/kern_... vs https://github.com/freebsd/freebsd-src/blob/main/sys/kern/ke...)
In Podman, the open source Docker alternative ported to M1 (Apple Silicon) machines
Try "ls -f" (don't sort)? Which filesystem you use will also make a big difference here. You could imagine some filesystem that uses the getdirentries(2) binary format for dirents, and that could literally memcpy cached directory pages for a syscall. In FreeBSD, UFS gets somewhat close, but 'struct direct' differs from the ABI 'struct dirent'. And the FS attempts to validate the disk format, too. FWIW, FreeBSD uses 4kB (x86 system page size) where glibc uses 32kB in this article[1]. To the extent libc is actually the problem (I'm not confident of that yet based on the article), this will be worse than glibc's larger buffer. [1]: https://github.com/freebsd/freebsd-src/blob/main/lib/libc/ge...
In You can list a directory containing 8M files, but not with ls
This 8 descriptor per packet limit is HORRIFIC. I debugged and fixed this issue on FreeBSD when we first moved to the new iflib based ixl (i40e's name on FreeBSD). They had a routine (ixl_tso_detect_sparse()) which was AFU. I wrote a userspace unit test that proved it was AFU, and then fixed it. I fed them back the routine & the unit test, and they hilariously left my commented debug prints in the routine. https://github.com/freebsd/freebsd-src/blob/412b5e40a721430a... And their 100GbE NIC has the same limit, which is just so sad. All these fancy features, and they cannot handle 8 segments per emitted packet on the wire.
In Hunting a bug in the i40e Intel driver
I don’t think they archived their benchmarks. Even then, I think that would be a multi-month project, to verify whether the test cases still are representative of real-world usage. A factor of 2 would IMO be worth it, though. Cursory reading https://github.com/freebsd/freebsd-src/blob/de1aa3dab23c06fe..., I get the impression FreeBSD switches over to a ¿bubble sort? (I didn’t look close) at <7 elements. That function also seems newer (it claims to implement https://cs.fit.edu/~pkc/classes/writing/papers/bentley93engi..., which is from 1993)
In Do Low-Level Optimizations Matter? (2020)
I honestly had issues with audio also on Windows, so I don't think what you are saying is completely true. Even on Windows you play the lottery every time you buy a motherboard or a laptop, and if you lose, you're stuck with a shitty sound card with worse drivers. For instance, my workplace gave me an HP Zbook which has a builtin Realtek sound card whose Windows drivers do not support separate volumes for speakers and headphones. If you unplug your headphone jack by mistake, the embedded speakers will promptly start blasting the entire room with whatever you were listening to at the same audio level you set for the headphones. The output source is even called "Speakers/Headphones". If you uninstall the official Realtek drivers, Windows uses the generic HDA driver from Microsoft which supports different, separate sound outputs for the he
Read the rest
adphones and speakers, but it doesn't have all the weird hacks required to make the HDA codec actually work fine, so setting the volume at more than 10% creates clicks and audio artifacts. On Linux the drivers have been patched to avoid these issues, so both jack sensing and separate audio levels work fine. Someone mentioned Pulseaudio having issues with front jack detection - this is an issue I had myself, and I discovered that the underlying cause in the case of my desktop machine was due to the sound card triggering random jack plugged/unplugged events. This sent Pulseaudio's jacksense logic haywire, because it repeatedly saw sinks appearing and disappearing. I tried to remove the Realtek drivers on Windows on the same machine and - voilà! A very similar issue occurs with the Microsoft generic driver, which leads me to think that the OEM driver does some black magic stuff underneath to get jack sensing work fine on their sound card. To get an idea of how buggy and terribile are the builtin soundcards shipped in consumer hardware, just look at FreeBSD's HDA audio driver, which is forced to apply hacks depending on the __specific model of laptop__ just to avoid audio glitches: https://github.com/freebsd/freebsd-src/blob/40923b0c81cc2c15...
In Ubuntu 21.04 significantly faster than windows 10 on Threadripper
How is that a remotely real comparison? The ansible mv function deals with preserving SELinux context, which mv doesn't do, and it automatically deals with a whole lot of common error conditions, whereas mv just fails. If you just want to replicate mv, Python has shutil.move, one line of code. Ansible is trying to do a lot more. By the way, I don't know if this is the canonical implementation, but FreeBSD mv is 481 lines of C: https://github.com/freebsd/freebsd-src/blob/master/bin/mv/mv...
In JavaScript for Shell Scripting
This quote from the article is interesting: > Find me a file in a codebase that has been under active development for more than three years, and it will be hard to follow. It might be true of enterprise [1] software, but is not generally the case. The question is whether code quality is valued in a given environment. If it's not, it doesn't matter what language is used, a mess will be created. Despite words to the contrary from most enterprise software shops, code quality is usually not valued at all - if it were the patterns which prevail would... not. By contrast, at random just now, I chose a popular device (Intel E1000 NICs), and looked at one of the files from the FreeBSD driver code for it [2]. This code written in C was added in 2008. The code is not "hard to follow" despite not being an expert on FreeBSD drivers, it has not atroph
Read the rest
ied or suffered from rot, while remaining under active development for at least 13 years. I didn't track the history beyond the addition of that file, so it's likely the code is actually older. I could have performed this experiment on any project that values quality: Illumos, the Linux Kernel, LLVM, the Go standard library, and I'd wager the results would be similar more often than not. [1]: "Enterprise" software is the (pejorative) term I tend to use to mean over engineered software with liberal use of frameworks and ORMs, generally at least 4-5 layers of mapping code adding no value, and an "architecture committee" - even if that committee consists of a single individual who also writes all the code for the project... [2]: https://github.com/freebsd/freebsd-src/blob/main/sys/dev/e10...
In Green vs. Brown Programming Languages
Related, maybe interesting to this crowd: In FreeBSD, the RB tree implementation has been replaced with a "weak AVL" tree implementation: https://github.com/freebsd/freebsd-src/commit/504ba65c8c9f7a... > Weak AVL (Wavl) trees sit between AVL and red-black trees in terms of how strictly balance is enforced. They have the stricter balance of AVL trees as the tree is built - a wavl tree is an AVL tree until the first deletion. Once removals start, wavl trees are lazier about rebalancing than AVL trees, so that removals can be fast, but the balance of the tree can decay to that of a red-black tree. Subsequent insertions can push balance back toward the stricter AVL conditions. > ... > Testing has shown that for the cases where red-black trees do worst, wavl trees better balance leads to faster lookups, so that if lookups outnumber insertions
Read the rest
by a nontrivial amount, lookup time saved exceeds the extra cost of balancing.
In Tree.h in OpenBSD: dependency-free intrusive binary tree (2002)
It's saying that because it's using getopt to parse any initial option arguments. That diagnostic message is the standard default message printed by the getopt function whenever encountering an invalid option flag. It means all utilities using getopt will, unless you disable the default behavior, display the same initial diagnostic. It's idiomatic for utilities to then print a short usage message of its own. Judging by the usage message you printed, you were almost certainly using a BSD implementation, probably on macOS, which in turn is probably sync'd from FreeBSD. `find -name something` will fail early in main. See https://github.com/freebsd/freebsd-src/blob/b422540/usr.bin/... When processing the 'n' in '-name' getopt() will return '?', which will end up calling usage(). The GNU implementation of find is completely different, though I
Read the rest
'm not sure it does what you expect: $ find -name something That prints nothing and returns a successful exit code. But if you remove the "something" operand you get what I presume you were originally expecting as an error message: $ find -name find: missing argument to `-name' But try deciphering the option processing of GNU find to understand why it behaves that way: https://git.savannah.gnu.org/cgit/findutils.git/tree/find/ft... Hint, see https://git.savannah.gnu.org/cgit/findutils.git/tree/find/ut... Not rocket science, but as a programmer and maintainer which approach do you think makes more sense? Is trying to do the supposedly intuitive thing worth it, especially considering find's already arcane and irregular syntax? As an experienced command-line user I'd just be thankful that the option flags (as opposed to the filter directives) are parsed regularly.
In Why do long options start with two dashes? (2019)
Ok I see, that helps, thank you. That seems to be mostly similar to evdev on Linux after all, except it requires you to use coroutines instead of having an option for a poll/select type interface. To me the problem with saying "no special cases" seems to make it quite limited on the kernel side and prevent optimization opportunities. For example if you look at the file node vtables on Linux [0] and FreeBSD [1] there are quite a lot of other functions there that don't fit in 9p. So you lose out on all that stuff if you try to fit everything into a 9p server or a FUSE filesystem or something else of that nature. [0]: https://elixir.bootlin.com/linux/v5.11.8/source/include/linu... [1]: https://github.com/freebsd/freebsd-src/blob/master/sys/kern/...
In Plan 9 from Bell Labs in Cyberspace
It's possible to browse the before-changes-started version of the FreeBSD code, through either CVS or the FreeBSD Git mirror. To save people the effort of finding the right git revision and the path, the kernel module starts here: https://github.com/freebsd/freebsd-src/tree/95331c228a39b44c... On a casual inspection, there are at least kernel printfs in crypto code in __chacha20poly1305_decrypt (in module/crypto/zinc/chacha20poly1305.c) that were not in the original version of this from Linux.
In FreeBSD kernel-mode WireGuard moves forward out-of-tree
"Is there a rock-solid git server that I can use on a home server for versioned immutable backups ..." A few things ... First, 'git' is built into the rsync.net platform and you can do anything you like with it, remotely, over ssh: ssh user@rsync.net "git clone git://github.com/freebsd/freebsd.git freebsd" I personally track a number of repos I consider important and keep my own source trees up to date without running git locally. Second, the ZFS snapshots that are taken, nightly, of your entire rsync.net account are immutable (read-only) so if you clone/update your git repos into your account, they are protected from ransomeware/mallory. Third, we finally have LFS / git-lfs support which pleases me greatly.
In How Git servers work, and how to keep yours secure
I think that the author hasn't checked them all. Even this isn't checking them all. The MUSL C library' sscanf() does not do this, but does call memchr() on limited substrings of the input string as it refills its input buffer, so it's not entirely free of this behaviour. * https://git.musl-libc.org/cgit/musl/tree/src/stdio/vsscanf.c The sscanf() in Microsoft's C library does this because it all passes through a __stdio_common_vsscanf() function which uses length-counted rather than NUL-terminated strings internally. * https://github.com/tpn/winsdk-10/blob/master/Include/10.0.16... * https://github.com/huangqinjin/ucrt/blob/master/inc/corecrt_... The GNU C library does something similar, using a FILE structure alongside a special "operations" table, with a _rawmemchr() in the initialization. * https://github.com/bminor/glibc/blob/master/
Read the rest
libio/strops.c#L... * https://github.com/bminor/glibc/blob/master/libio/strfile.h#... The FreeBSD C library does not use a separate "operations" table. * https://github.com/freebsd/freebsd-src/blob/main/lib/libc/st... A glib summary is that sscanf() in these implementations has to set up state on every call that fscanf() has the luxury of keeping around over multiple calls in the FILE structure. They're setting up special nonce FILE objects for each sscanf() call, and that involves finding out how long the input string is every time. It is food for thought. How much could life be improved if these implementations exported the way to set up these nonce FILE structures from a string, and callers used fscanf() instead of sscanf()? How many applications are scanning long strings with lots of calls to sscanf()?
In How I cut GTA Online loading times by 70%

Showing the 15 most recent of 20 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.