openbsd/src
View on GitHub ↗ ★ 3,923 C
Read-only git conversion of OpenBSD's CVS src repository. This only includes the main branch; use CVS for -stable or release branches. Send any diffs to the tech@ mailing list.
146 mentions on Hacker News by 108 people: 6 stories, 140 comments · first 2016-10-17 · latest 2026-10-20
20082026
-
Specifically in this script https://github.com/openbsd/src/blob/master/distrib/miniroot/... Just look for `fw_update`
comment by rootnod3 · 2026-10-20 · in OpenBSD 8.0 release will have inteldrm/radeondrm/amdgpu drivers from Linux 6.18 -
…are already MIT/X licensed for historical reasons, same goes for the Mesa GL and Xorg components. https://github.com/openbsd/src/tree/master/sys/dev/pci/drm
comment by brynet · 2026-10-19 · in OpenBSD 8.0 release will have inteldrm/radeondrm/amdgpu drivers from Linux 6.18 -
Although Theo seems to imply AI code is not welcome, this commit says Claude was used: https://github.com/openbsd/src/commit/9c2b8e445a0bdfafdd6148...
comment by ranger_danger · 2026-10-19 · in Wine ported to OpenBSD -
See also BSD queue.h: https://man.openbsd.org/queue.3 https://github.com/openbsd/src/blob/master/sys/sys/queue.h
comment by mrdomino- · 2026-10-07 · in Type Safe Generic Data Structures in C (2025) -
…to have something like OpenBSD's ed[0] or dmesg[1], which you only touch every few years or so [0] https://github.com/openbsd/src/commits/master/bin/ed [1] https://github.com/openbsd/src/commits/master/sbin/dmesg/dme...
comment by skydhash · 2026-08-02 · in Karpathy’s Pelican -
…is as simple as it gets[2]. [1]: https://github.com/coreutils/coreutils/blob/master/src/yes.c [2]: https://github.com/openbsd/src/blob/master/usr.bin/yes/yes.c
comment by rootnod3 · 2026-07-08 · in OpenBSD has a use-after-free allowing local privilege escalation to root -
No. https://github.com/openbsd/src/blob/d5b0ed23b6fe61f0278c37a4... Perhaps relevant, Students from the University of Southern Denmark released a paper earlier this month, which once again noted the fact that over ~90% of the OpenBSD base…
comment by brynet · 2026-07-08 · in OpenBSD has a use-after-free allowing local privilege escalation to root -
…discovered that it could have been used for LPE. Again, just my guess I could be wrong. [0] https://github.com/openbsd/src/commit/1957873d2063db11dab780...
comment by justthehuman · 2026-07-08 · in OpenBSD has a use-after-free allowing local privilege escalation to root -
…without checking `waitpid()` for errors. This is UB since `status` is uninitialized. ( https://github.com/openbsd/src/blob/ae684bfaed6cae797cd90e27... ) The reason is my previous experience with OpenBSD where the reply may be "<some…
comment by thomashabets2 · 2026-05-20 · in OpenBSD 7.9 -
Is this really that hard to type? https://github.com/openbsd/src/blob/master/etc/rc.d/watchdog...
comment by bandrami · 2026-02-03 · in Linux From Scratch ends SysVinit support -
…excuse to use it someday, hopefully in something high visibility so I can blow people's minds. [1] https://github.com/openbsd/src/blob/17290de/share/mk/bsd.lib... [2] https://github.com/NetBSD/src/blob/7d8184e/share/mk/bsd.lib....
comment by wahern · 2025-10-27 · in An overengineered solution to `sort | uniq -c` with 25x throughput (hist) -
…I did for openbsd; it's around 700 lines, including the gunk to interface with the hypervisor. https://github.com/openbsd/src/blob/master/usr.sbin/vmd/vioq... It's not a good choice for computing diffs, but you can run your VM directly off…
comment by ori_b · 2025-10-01 · in Blockdiff: We built our own file format for VM disk snapshots -
…on the other hand is extremely active, there's no way OpenSSH will be dethroned anytime soon. https://github.com/openbsd/src/commits/master/
comment by jhatemyjob · 2025-09-27 · in SSH3: Faster and rich secure shell using HTTP/3 -
The actual commit referred to in the mailing list: https://github.com/openbsd/src/commit/ee2db53800abe0382657ec...
comment by LeonM · 2025-09-02 · in Raspberry Pi 5 support (OpenBSD) -
…you can see all data structures indexing the object. Here are some of the more common examples: https://github.com/openbsd/src/blob/master/sys/sys/queue.h https://github.com/openbsd/src/blob/master/sys/sys/tree.h sys/queue.h is actually…
comment by ryao · 2025-08-28 · in Object-oriented design patterns in C and kernel development -
…code and some other breadcrumbs: 1. Apparently OpenBSD gave up on trying to fix desync'd TSCs. See https://github.com/openbsd/src/commit/78156938567f79506a923c... 2. Relevant OpenBSD kernel code: https://github.com/openbsd/src/blob/master/s…
comment by wahern · 2025-08-18 · in OpenBSD is so fast, I had to modify the program slightly to measure itself -
…and write the packet header status and flags fields, and that original code is still used today: https://github.com/openbsd/src/blob/master/include/arpa/name... It does rely on implementation-defined behavior--it swaps the order of fields…
comment by wahern · 2025-07-30 · in Writing memory efficient C structs -
…(glibc may be a different story). However, on OpenBSD, it did seem to have some user-visible bits: https://github.com/openbsd/src/commit/b7f6c2eb760a2da367dd51... If you expose it, someone will probably sooner or later use it, but probably…
comment by recipe19 · 2025-07-20 · in Stdio(3) change: FILE is now opaque -
…Here's OpenBSD's MBR code, just for starters. It has no range checking for zero size partitions. * https://github.com/openbsd/src/blob/9213be19d4b9057bbb074ab1...
comment by JdeBP · 2025-06-05 · in A critical look at NetBSD’s installer -
…and see how httpd's config [2] got started as a fork of relayd [3]. [1] http://augeas.net/ [2] https://github.com/openbsd/src/blob/master/usr.sbin/httpd/pa... [3] https://github.com/openbsd/src/blob/master/usr.sbin/relayd/p...
comment by synack · 2025-06-02 · in Ask HN: What is our history on trying to standardize configuration languages? -
…is 100 times faster[3]. [1] https://github.com/coreutils/coreutils/blob/master/src/yes.c [2] https://github.com/openbsd/src/blob/master/usr.bin/yes/yes.c [3] https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes...
comment by unscaled · 2025-05-27 · in Yes-rs: A fast, memory-safe rewrite of the classic Unix yes command -
…mode. [1] https://en.wikipedia.org/wiki/User_space_and_kernel_space [2] Mirror is available at: https://github.com/openbsd/src/tree/master/sys/kern [3] https://github.com/openbsd/src/blob/master/sys/kern/sched_bs...
comment by quietbritishjim · 2025-04-23 · in MinC Is Not Cygwin -
The "dsb nsh; isb" sequence after "svc 0" is part of OpenBSD's mitigations for Spectre. https://github.com/openbsd/src/commit/bbeaada4689520859307d5... https://github.com/openbsd/src/commit/0c401ffc2a2550c32105ce...…
comment by jmillikin · 2025-03-12 · in A more robust raw OpenBSD syscall demo -
…Tries [0] and Allotment Routing Tables [1]. [0] https://news.ycombinator.com/item?id=3015246 [1] https://github.com/openbsd/src/blob/2bd42e97200bee/sys/net/a...
comment by ignoramous · 2024-10-27 · in Using less memory to look up IP addresses in Mess With DNS -
…patch that added '/' protection, because that's the only character that's not allowed in filenames. https://github.com/openbsd/src/commit/46f7109a9e03df89b66ada...
comment by ben_bai · 2024-09-24 · in OpenBSD now enforcing no invalid NUL characters in shell scripts -
…OpenBSD's libc asr implementation, written by Eric Faurot. https://man.openbsd.org/man3/asr_run.3 https://github.com/openbsd/src/tree/master/lib/libc/asr
comment by brynet · 2024-09-18 · in Warning: DNS encryption in Little Snitch 6.1 may occasionally fail -
Seems to be a trivia quiz game included in OpenBSD. https://github.com/openbsd/src/tree/a6105854a9e3aab642e6a0fc... In datfiles/index there's a list of categories and with some interpretation you can see what they're asking. Like "chinese"…
comment by Jtsummers · 2024-08-23 · in We have reached OpenBSD of Theseus -
…people have a local checkout of the repo on their local computers. URLs aren't needed (for them). https://github.com/openbsd/src/commit/a6105854a9e3aab642e6a0...
comment by runjake · 2024-08-23 · in We have reached OpenBSD of Theseus -
Here's the change itself: https://github.com/openbsd/src/commit/a6105854a9e3aab642e6a0... I know that OpenBSD doesn't actually use GitHub, but it was the easiest way I could find the diff. I don't know how to otherwise get it from that…
comment by rany_ · 2024-08-23 · in We have reached OpenBSD of Theseus -
…of args is 0, and uses the Linux read function to read character by character. The [OpenBSD]( https://github.com/openbsd/src/blob/master/usr.bin/wc/wc.c ) version is just *nice*. It reads from stdin by default, and uses a bit of buffering…
comment by NunoSempere · 2024-06-20 · in Wc2: Investigates optimizing 'wc', the Unix word count program -
…max:600 min:15 max-sources:65536 overflow:permissive [1] https://cvsweb.openbsd.org/ [2] https://github.com/openbsd/src [3] https://www.openssh.com/portable.html [4] https://anongit.mindrot.org/openssh.git [5]…
comment by mananaysiempre · 2024-06-07 · in OpenSSH introduces options to penalize undesirable behavior -
They do use CVS for version control. https://cvsweb.openbsd.org/ from their github: https://github.com/openbsd/src > Read-only git conversion of OpenBSD's official CVS src repository. Pull requests not accepted - send diffs to the tech@…
comment by natebc · 2024-05-16 · in Add sysctl to disable Nagle's algorithm (RFC 896 – Congestion Control) -
…handlers by adding a new reason code, ILL_BTCFI, to SIGILL info (siginfo_t). The full patch is at https://github.com/openbsd/src/commit/88580652a3669007813512... I'm not sure if this patch is noteworthy on its own, but perhaps it was…
comment by wahern · 2024-02-22 · in New code for SIGILL faults to help identify misbranches on OpenBSD -
…would be an interesting project. Here is the source code of the OpenBSD implementation of cat: > https://github.com/openbsd/src/blob/master/bin/cat/cat.c and here of the GNU coreutils implementation: >…
comment by aleph_minus_one · 2023-12-22 · in From Nand to Tetris (2017) -
> I don't know how they define `MAX`, but I'm guessing it's a typical "a>b?a:b" Indeed: https://github.com/openbsd/src/blob/master/sys/sys/param.h#L... > Then `SYS_kbind` seems to be a signed int. It's an untyped #define:…
comment by LukeShu · 2023-12-12 · in OpenBSD – pinning all system calls -
…really change your conclusion, but I think that’s the wrong file. This is the real doas afaict: https://github.com/openbsd/src/blob/master/usr.bin/doas/doas... Still just a tidy 1072 lines in that folder though. I spent 5 minutes staring…
comment by xerxes901 · 2023-11-03 · in Sudo-rs' first security audit -
…C. sudo and doas are not equivalent in functionality, but it shows how simple things can really be. https://github.com/openbsd/src/blob/master/distrib/special/d...
comment by cedws · 2023-11-03 · in Sudo-rs' first security audit -
…syscall "dispatcher" or emulator for the Perl syscall function so that it calls the libc stubs. https://github.com/openbsd/src/commit/312e26c80be876012ae979... The ports tree is being cleansed of syscall(2) usage, until they're all gone.…
comment by notaplumber1 · 2023-10-27 · in OpenBSD: Removing syscall(2) from libc and kernel -
Actually, I got it wrong, too many vulnerabilities in flight. They did fix it: https://github.com/openbsd/src/commit/375ccafb2eb77de6cf240e...
comment by dgl · 2023-10-22 · in "<ESC>[31M"? ANSI Terminal security in 2023 and finding 10 CVEs -
This is the commit for those curious: https://github.com/openbsd/src/commit/c778c0d73570b51def4f06... > Packets sent over loopback got their checksums calculated twice. In the output path they were filled in and during TCP/IP input all…
comment by petee · 2023-10-16 · in OpenBSD 7.4 -
Also, take a look at openbsd's version of yes https://github.com/openbsd/src/blob/master/usr.bin/yes/yes.c
comment by rcr · 2023-09-09 · in Decoded: GNU Coreutils (2018) -
also quite interesting to compare with other implementations from the present and the past: https://github.com/openbsd/src/blob/master/usr.bin/yes/yes.c https://github.com/freebsd/freebsd-src/blob/release/4.0.0/us...
comment by m1keil · 2023-09-09 · in Decoded: GNU Coreutils (2018) -
…looked at the source for traceroute. This heading comment is quite great and informative as well: https://github.com/openbsd/src/blob/master/usr.sbin/tracerou... They also use the event APIs to implement the loop of traceroute. Seems like…
comment by seeknotfind · 2023-08-02 · in Traceroute isn't real -
For comparison, the OpenBSD version: https://github.com/openbsd/src/blob/master/usr.bin/yes/yes.c That’s a lot simpler, but also slower (see https://www.reddit.com/r/unix/comments/6gxduc/how_is_gnu_yes... , discussed in…
comment by Someone · 2023-06-28 · in Yes command – output a string repeatedly until killed -
…is actually even more permissive than me when it comes to letting stuff through pledge("stdio"). https://github.com/openbsd/src/blob/fb5793d3d4d0fd4795586dd9... Also surface area isn't a weakness, it's a paradigm. If a weakness actually…
comment by jart · 2023-06-18 · in Redbean Systems -
…figure out how to get the actual changes from this page, here's the commit in the github mirror... https://github.com/openbsd/src/commit/e208b5629e93dc00cc4301...
comment by winrid · 2023-04-22 · in OpenBSD: Viogpu(4), a VirtIO GPU driver, added to -current -
Can't find any documentation but here is the source on the GitHub mirror of their CVS: https://github.com/openbsd/src/blob/e208b5629e93dc00cc43012e... https://github.com/openbsd/src/blob/e208b5629e93dc00cc43012e...
comment by nazgulsenpai · 2023-04-21 · in OpenBSD: Viogpu(4), a VirtIO GPU driver, added to -current -
…' '\n' | sort -R` ${LDADD} ./sshd -V && install -o root -g wheel -m ${BINMODE} sshd /usr/sbin/sshd https://github.com/openbsd/src/commit/898412097f87ba70d4012f...
comment by codesniperjoe · 2023-01-20 · in SSHD: Random boot time relinking, OpenBSD -
…from Linux and other Unix like projects was a source of inspiration. I'd recommend OpenBSD libc. https://github.com/openbsd/src/tree/master/lib/libc String functions especially are a good way to get into the C way of thinking. Since C's…
comment by asveikau · 2022-12-23 · in Ask HN: Learn C in 2023?