<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: markjdb</title><link>https://news.ycombinator.com/user?id=markjdb</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Fri, 19 Jun 2026 21:53:26 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=markjdb" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by markjdb in "Gathering Linux Syscall Numbers in a C Table"]]></title><description><![CDATA[
<p>At least FreeBSD's syscall ABI is guaranteed to be stable, one can run ancient binaries on a modern kernel.  I believe the same is not true of OpenBSD and maybe NetBSD however.</p>
]]></description><pubDate>Thu, 22 Jan 2026 16:27:24 +0000</pubDate><link>https://news.ycombinator.com/item?id=46721423</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=46721423</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46721423</guid></item><item><title><![CDATA[New comment by markjdb in "Moving from OpenBSD to FreeBSD for firewalls"]]></title><description><![CDATA[
<p>The pf maintainer in FreeBSD has been doing a ton of work to bring more recent improvements over from OpenBSD, trying to bring them in sync as much as possible without breaking compatibility:
<a href="https://cgit.freebsd.org/src/log/sys/netpfil/pf" rel="nofollow">https://cgit.freebsd.org/src/log/sys/netpfil/pf</a><p>The state of affairs you described is much less the case now than in the past.</p>
]]></description><pubDate>Tue, 25 Nov 2025 02:16:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=46041691</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=46041691</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=46041691</guid></item><item><title><![CDATA[New comment by markjdb in "BSD kqueue is a mountain of technical debt (2021)"]]></title><description><![CDATA[
<p>A design that works by default isn't automatically better either though.  You have to look at the details.<p>> I guess one might be tempted to forgive a few warts in the interface layers<p>... well, yeah, that's exactly my sentiment about kqueue here.  What you're talking about is basically a small wart that no one's bothered to address because it's inconsequential.</p>
]]></description><pubDate>Mon, 30 Dec 2024 16:12:17 +0000</pubDate><link>https://news.ycombinator.com/item?id=42550587</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=42550587</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42550587</guid></item><item><title><![CDATA[New comment by markjdb in "BSD kqueue is a mountain of technical debt (2021)"]]></title><description><![CDATA[
<p>The article clearly isn't talking about technical debt within the kernel implementations of epoll and kqueue, and if one wanted, it'd be easy to define fallback EVFILT_READ/WRITE filters using a device's poll implementation.<p>I don't really understand what argument you're making.  Is io_uring also a bad design because it requires new file_operations?</p>
]]></description><pubDate>Mon, 30 Dec 2024 14:35:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=42549607</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=42549607</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42549607</guid></item><item><title><![CDATA[New comment by markjdb in "BSD kqueue is a mountain of technical debt (2021)"]]></title><description><![CDATA[
<p>Well, no, it's "this interface works fine for you if you implement it."<p>The kernel doesn't magically know whether your device file has data available to read, your device file has to define what that means.  That's all I'm referring to.  Hooking that up to kqueue usually involves writing 5-10 lines of code.</p>
]]></description><pubDate>Mon, 30 Dec 2024 01:05:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=42545299</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=42545299</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42545299</guid></item><item><title><![CDATA[New comment by markjdb in "BSD kqueue is a mountain of technical debt (2021)"]]></title><description><![CDATA[
<p>I'm not sure.  Maybe it's "wait for events that aren't tied to an fd."<p>For instance, FreeBSD (and I think other BSDs) also have EVFILT_PROC, which lets you monitor a PID (not an fd) for events.  One such event is NOTE_FORK, i.e., the monitored process just forked.  Can you wait for such events with epoll?  I'm not sure.<p>More generally, suppose you wanted to automatically start watching all descendants of the process for events as well.  If I was required to use a separate fd to monitor that child process, then upon getting the fork event I'd have to somehow obtain an fd for that child process and then tell epoll about it, and in that window I may have missed the child process forking off a grandchild.<p>I'm not sure how to solve this kind of problem in the epoll world.  I guess you could introduce a new fd type which represents a process and all of its descendants, and define some semantics for how epoll reports events on that fd type.  In FreeBSD we can just have a dedicated EVFILT_PROC filter, no need for a new fd type.  I'm not really sure whether that's better or worse.</p>
]]></description><pubDate>Sun, 29 Dec 2024 20:08:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=42542611</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=42542611</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42542611</guid></item><item><title><![CDATA[New comment by markjdb in "BSD kqueue is a mountain of technical debt (2021)"]]></title><description><![CDATA[
<p>I don't think the article does a good job of arguing its premise, which I think is that kqueue is a less general interface than epoll.<p>When adding a new descriptor type, one can define semantics for existing filters (e.g., EVFILT_READ) as one pleases.<p>To give an example, FreeBSD has EVFILT_PROCDESC to watch for events on process descriptors, which are basically analogous to pidfds.  Right now, using that filter kevent() can  tell you that the process referenced by a procdesc has exited.  That could have been defined using the EVFILT_READ filter instead of or in addition to adding EVFILT_PROCDESC.  There was no specific need to introduce EVFILT_PROCDESC, except that the implementor presumably wanted to leave space to add additional event types, and it seemed cleaner to introduce a new EVFILT_PROCDESC filter.  Process descriptors don't implement EVFILT_READ today, but there's no reason they can't.<p>So if one wants to define a new event type using kevent(), one has the option of adding a new definition (new filter, new note type for an existing filter, etc.), or adding a new type of file descriptor which implements EVFILT_READ and other "standard" filters.  kqueue doesn't really constrain you either way.<p>In FreeBSD, most of the filter types correspond to non-fd-based events.  But nothing stops one from adding new fd types for similar purposes.  For instance, we have both EVFILT_TIMER (a non-fd event filter) and timerfd (which implements EVFILT_READ and in particular didn't need a new filter).  Both are roughly equivalent; the latter behaves more like a regular file descriptor from kqueue's perspective, which might be better, but it'd be nice to see an example illustrating how.<p>One could argue that the simultaneous existence of timerfds and EVFILT_TIMER is technical debt, but that's not really kqueue's fault.  EVFILT_TIMER has been around forever, and timerfd was added to improve Linux compatibility.<p>So, I think the article is misguided.  In particular, the claim that "any time you want kqueue to do something new, you have to add a new type of event filter" is just wrong.  I'm not arguing that there isn't technical debt here, but it's not really because of kqueue's design.</p>
]]></description><pubDate>Sun, 29 Dec 2024 19:17:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=42542166</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=42542166</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42542166</guid></item><item><title><![CDATA[New comment by markjdb in "BSD kqueue is a mountain of technical debt (2021)"]]></title><description><![CDATA[
<p>The same is true of kqueue/kevent though... the driver just needs to decide which filters it wants to implement.  There's no need to extend kqueue when adding some custom driver or fd type.  One just needs to define some semantics for the existing filters.</p>
]]></description><pubDate>Sun, 29 Dec 2024 18:46:53 +0000</pubDate><link>https://news.ycombinator.com/item?id=42541946</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=42541946</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=42541946</guid></item><item><title><![CDATA[New comment by markjdb in "Why laptop support, why now: FreeBSD's strategic move toward broader adoption"]]></title><description><![CDATA[
<p>For what it's worth, the default root shell is now /bin/sh instead of csh.  I think that's true as of 14.0.  /bin/sh is also a better interactive shell than it used to be, though yeah, I don't use it to do anything other than install my preferred shell.</p>
]]></description><pubDate>Tue, 01 Oct 2024 09:12:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=41706186</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=41706186</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41706186</guid></item><item><title><![CDATA[New comment by markjdb in "Early performance results from the prototype CHERI ARM Morello microarchitecture"]]></title><description><![CDATA[
<p>CHERI does more than help eliminate security vulnerabilities. Consider that today we rely on the MMU to provide memory isolation between Unix processes; CHERI enables isolation without switching page tables, at a smaller hardware cost (though it's not like you can drop unmodified software into such an architecture). So I don't think it's correct to consider this yet another layer of complexity. If anything it has the potential to lead to simpler system designs.</p>
]]></description><pubDate>Tue, 19 Sep 2023 08:48:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=37567143</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=37567143</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=37567143</guid></item><item><title><![CDATA[New comment by markjdb in "The Tower of Weakenings: Memory Models for Everyone"]]></title><description><![CDATA[
<p>CHERI does permit tricks like storing flags in the low bits of a pointer, at least to some extent.  Quite a lot of low level C code (including some in the CheriBSD kernel) needs that to work.</p>
]]></description><pubDate>Wed, 06 Apr 2022 22:19:32 +0000</pubDate><link>https://news.ycombinator.com/item?id=30938182</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=30938182</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30938182</guid></item><item><title><![CDATA[New comment by markjdb in "eBPF for tracing how Firefox uses page faults to load libraries"]]></title><description><![CDATA[
<p>I use "ktrace -t f" once in a while for debugging and it's really handy.  Output looks like<p>78436 cat      PFLT  0x6c71f99cda8 0x2<VM_PROT_WRITE>
 78436 cat      PRET  KERN_SUCCESS
 78436 cat      PFLT  0x3c6efd36c280 0x2<VM_PROT_WRITE>
 78436 cat      PRET  KERN_SUCCESS
 78436 cat      PFLT  0x3c6efd36e158 0x2<VM_PROT_WRITE>
 78436 cat      PRET  KERN_SUCCESS
 ...<p>Obviously not nearly as flexible as ebpf though.  For instance it'll log all page faults happening in the context of the process, and so includes page faults that happen in the kernel due to copyin()/copyout() etc.  Sometimes it's helpful and other times confusing.</p>
]]></description><pubDate>Wed, 23 Feb 2022 23:03:12 +0000</pubDate><link>https://news.ycombinator.com/item?id=30447870</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=30447870</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=30447870</guid></item><item><title><![CDATA[New comment by markjdb in "Benchmarks: FreeBSD 13 vs. NetBSD 9.2 vs. OpenBSD 7 vs. DragonFlyBSD 6 vs. Linux"]]></title><description><![CDATA[
<p>I'd be amazed if it isn't a configuration error of some kind.</p>
]]></description><pubDate>Fri, 10 Dec 2021 15:01:29 +0000</pubDate><link>https://news.ycombinator.com/item?id=29510642</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=29510642</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=29510642</guid></item><item><title><![CDATA[New comment by markjdb in "Serving Netflix Video at 400Gb/s on FreeBSD [pdf]"]]></title><description><![CDATA[
<p>How much data ends up being served from RAM?  I had the impression that it was negligible and that the page cache was mostly used for file metadata and infrequently accessed data.</p>
]]></description><pubDate>Sun, 19 Sep 2021 19:09:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=28587003</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=28587003</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=28587003</guid></item><item><title><![CDATA[New comment by markjdb in "Fun with Unix domain sockets"]]></title><description><![CDATA[
<p>You can even send a Unix socket over itself.  The kernel has to be careful to handle that correctly. :)</p>
]]></description><pubDate>Sat, 24 Jul 2021 22:27:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=27944938</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=27944938</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=27944938</guid></item><item><title><![CDATA[New comment by markjdb in "Implement unprivileged chroot"]]></title><description><![CDATA[
<p>This is mostly true on FreeBSD as well.  The real problem is that capability mode also disallows openat(AT_FDCWD) - there has to be an explicit directory descriptor.</p>
]]></description><pubDate>Thu, 22 Jul 2021 14:31:03 +0000</pubDate><link>https://news.ycombinator.com/item?id=27919308</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=27919308</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=27919308</guid></item><item><title><![CDATA[New comment by markjdb in "CVE-2021-22555: Turning \x00\x00 into 10000$"]]></title><description><![CDATA[
<p>It depends on the bug.  syzkaller does an excellent job finding race conditions, but it can be difficult to generate a reliable reproducer for them.  It often succeeds nonetheless.  In other cases there can be a wide gap between the proximate and root causes of a crash.  For instance some system call bug might corrupt memory in a way that only results in a crash some time later, when some asynchronous task runs, in which case it's also difficult to find a reproducer.  Sanitizers can help identify such bugs earlier and so reduce the amount of manual analysis needed in the absence of a reproducer.<p>I'm not sure what happened in this case.  The linked report does indeed have an associated reproducer.</p>
]]></description><pubDate>Thu, 15 Jul 2021 13:56:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=27844756</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=27844756</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=27844756</guid></item><item><title><![CDATA[New comment by markjdb in "Buffer overruns, license violations, and bad code: FreeBSD 13’s close call"]]></title><description><![CDATA[
<p>That's fair.  At the time, though, it wasn't clear that the author's angle was that FreeBSD doesn't have a culture of doing code reviews.  We do, and I don't think one has to look very hard to see that.</p>
]]></description><pubDate>Sat, 27 Mar 2021 15:02:40 +0000</pubDate><link>https://news.ycombinator.com/item?id=26602789</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=26602789</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26602789</guid></item><item><title><![CDATA[New comment by markjdb in "Buffer overruns, license violations, and bad code: FreeBSD 13’s close call"]]></title><description><![CDATA[
<p>There's some discussion happening now and I do expect to see some process changes coming out of this.  It's tricky.  The review you link does nominally follow the process of creating a review and having some discussion, but there isn't much actual code review happening there.</p>
]]></description><pubDate>Fri, 26 Mar 2021 22:53:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=26597963</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=26597963</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26597963</guid></item><item><title><![CDATA[New comment by markjdb in "Buffer overruns, license violations, and bad code: FreeBSD 13’s close call"]]></title><description><![CDATA[
<p>> Or is this just how it is on FreeBSD?<p>It's not.  We do a lot of code review, and it's done publicly.  It's easy to look at the commit logs.  I find it telling that the article doesn't spend even one word trying to delve into our code review practices.  This case was an aberration.</p>
]]></description><pubDate>Fri, 26 Mar 2021 18:04:08 +0000</pubDate><link>https://news.ycombinator.com/item?id=26595054</link><dc:creator>markjdb</dc:creator><comments>https://news.ycombinator.com/item?id=26595054</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=26595054</guid></item></channel></rss>