HNHacker News
TopNewBestAskShowJobs

johncolanduoni

5,429 karma · joined July 14, 2015

my public key: https://keybase.io/johncolanduoni; my proof: https://keybase.io/johncolanduoni/sigs/ZUjmc07ldkvSmh8asZn9tbdF2DBdptDfB3Y-eMh9gXQ
submissionscomments
johncolanduoni··on Kernel bugs hide for 2 years on average. Some hide for 20
Yes, and it’s quite inefficient compared to L4 or Zircon’s IPC so it isn’t used for anything that wouldn’t work just fine over a SEQPACKET socket using SCM_RIGHTS like Linux does. Is modern Windows a microkernel because ALPC exists?
johncolanduoni··on Kernel bugs hide for 2 years on average. Some hide for 20
All the major OSes have components of the larger operating system that run in userspace and communicate via IPC, including Linux. But userspace drivers and basic system services (VFS, network stack, etc.) are very limited in their use of userspace/IPC. If macOS is a microkernel in the sense of those built on L4, then so are Windows and Linux, and the word doesn't have any meaning anymore.
johncolanduoni··on Cloudflare CEO on the Italy fines
They're threatening to take their ball and go home. If they move all of their operations out of Italy, under what principle does Italy demand they block content globally? Should Wikipedia remove their page on Tiananmen Square because the Chinese government demands it (which they would, if they thought it would work)?
johncolanduoni··on “Erdos problem #728 was solved more or less autonomously by AI”
They can read the statement, and the definitions that the statement references. If everything it references is in a well-tread part of the Lean library, you can have pretty high confidence in a few minutes of going over the syntax.
johncolanduoni··on Tailscale state file encryption no longer enabled by default
Wow. That’s a new one. Where exactly do you think the authentication tokens you obtain using 2FA are stored?
johncolanduoni··on Tailscale state file encryption no longer enabled by default
A warning doesn’t help at all. The main threat model for FDE is that someone steals your device and dumps the disk. If you don’t protect the boot process somehow, then you’re just storing the encryption key next to the data.

If you don’t care about that (which is not “military level security”, laptop thieves stealing creds is a thing), just don’t use FDE or use it with an on-boot password every time. No point in the theater.

johncolanduoni··on Kernel bugs hide for 2 years on average. Some hide for 20
I mentioned XNU below. It doesn’t really count as a microkernel if you, you know, don’t actually use the microkernel part. At least for the 30 years between the FreeBSD collision and the introduction of DriverKit, which does most of its IPC through shared memory (because the mach ports are not efficient enough, I would assume).
johncolanduoni··on Kernel bugs hide for 2 years on average. Some hide for 20
These are pretty much all about mandatory locking. Which giveth and taketh away in my experience. I’ve had substantially fewer weird file handling bugs in my Linux code than my Windows code. POSIX is very loosey-goosey in general, but Linux’s VFS system + ext4 has a much stronger model than the general POSIX guarantees.

`FILE_FLAG_DELETE_ON_CLOSE`’s equivalent on Posix is just rm. Windows doesn’t let you open new handles to `FILE_FLAG_DELETE_ON_CLOSE`ed files anyway, so it’s effectively the same. The inode will get deleted when the last file description is removed.

NFS is a disaster though, I’ll give you that one. Though mandatory locks on SMB shares hanging is also very aggravating in its own right.

johncolanduoni··on Kernel bugs hide for 2 years on average. Some hide for 20
That’s not my point - just that “state machine races” is a too-broad category to say much about how Rust would or wouldn’t help.
johncolanduoni··on Kernel bugs hide for 2 years on average. Some hide for 20
It depends what they mean by some of these: are the state machine race conditions logic races (which Rust won’t trivially solve) or data races? If they are data races, are they the kind of ones that Rust will catch (missing atomics/synchronization) or the ones it won’t (bad atomic orderings, etc.).

It’s also worth noting that Rust doesn’t prevent integer overflow, and it doesn’t panic on it by default in release builds. Instead, the safety model assumes you’ll catch the overflowed number when you use it to index something (a constant source of bugs in unsafe code).

I’m bullish about Rust in the kernel, but it will not solve all of the kinds of race conditions you see in that kind of context.

johncolanduoni··on Kernel bugs hide for 2 years on average. Some hide for 20
This is I think an under-appreciated aspect, both for detractors and boosters. I take a lot more “risks” with Rust, in terms of not thinking deeply about “normal” memory safety and prioritizing structuring my code to make the logic more obviously correct. In C++, modeling things so that the memory safety is super-straightforward is paramount - you’ll almost never see me store a std::string_view anywhere for example. In Rust I just put &str wherever I please, if I make a mistake I’ll know when I compile.
johncolanduoni··on Kernel bugs hide for 2 years on average. Some hide for 20
What warranties? I assume you’re comparing it to ext4 and not e.g. ZFS?
johncolanduoni··on Kernel bugs hide for 2 years on average. Some hide for 20
Mach is not a very good microkernel at all, because the overhead is much higher than necessary. The L4 family’s IPC design is substantially more efficient, and that’s why they’re used in actual systems. Fuchsia/Zircon have improved on the model further.

Someone will of course bring up XNU, but the microkernel aspect of it died when they smashed the FreeBSD kernel into the codebase. DriverKit has brought some userspace drivers back, but they use shared memory for all the heavy lifting.

johncolanduoni··on Tailscale state file encryption no longer enabled by default
In fact, SecurityFramework doesn’t have a real Swift/Obj-C API. The relevant functions are all direct bindings to C ABIs (just with wrappers around the CoreFoundation types).
johncolanduoni··on Tailscale state file encryption no longer enabled by default
An easy solution to having to put your PIN in too often for SSH is to use the `ControlPersist` option in your SSH client config. This lets you only create a new SSH connection every 30s (or whatever you put), even if you’re doing separate operations. With a low timeout, there’s no realistic security risk (what’s the chance an attacker will only have control of your machine for 30s?).

I do this for GitHub in particular, because of tools that connect to the remote multiple times. Works with anything that uses the actual ssh executable under the hood.

johncolanduoni··on US will ban Wall Street investors from buying single-family homes
Okay, but institutional investors didn’t create that fact of reality, and I don’t think they’re responsible for the fact that people want to live in or near cities either (instead of the middle of nowhere, which remains dirt cheap). If they’re not holding significant stock, what effect are they having on scarcity?
johncolanduoni··on US will ban Wall Street investors from buying single-family homes
Manipulating markets by controlling liquidity while not holding a large percentage of the overall stock is a thing. The fact that you could juice trading volume by doing something stupid for no reason doesn’t make it a useless statistic for evaluating what is going on in a market (unless you’re alleging that institutional investors would do this, and I can’t see the motive). This isn’t some shitcoin whose creators are faking trading volume to appear on the leaderboards - it’s houses with deeds.

To be clear, I don’t think institutional real state investment is a substantial part of the reason housing prices are so high. I’m just trying to push whatever argument they were thinking of toward something quantifiable.

johncolanduoni··on US will ban Wall Street investors from buying single-family homes
How do I distinguish the world where institutional investors are meaningfully contributing to high housing prices and the world where they aren’t? Is there some metric you’ve seen that substantiates the mechanism? For example, are they only 1% of holders but 50% of trading volume or something?

Because if I saw a house 15% below market where I live, I would buy it (to live in). I don’t imagine I’m the only one. Institutional investors can’t stop me from doing that if it’s offered - can they stop the seller from offering that?

johncolanduoni··on Tailscale state file encryption no longer enabled by default
The TPM was never designed to be the only holder of a key that cannot be reset. The idea was that it prevents you from typing in a password or reseting an attestation signature in a database for 99% of boots, but if certain things in the boot process change (as determined by the firmware, the CPU, the OS, and the application using the TPM) it’s designed to lock you out so those things cannot change without anyone’s notice.

For that purpose they’re pretty good, though there are advantages to a more signature-oriented boot security option like Apple’s Secure Enclave. But that only works so well because Apple simply doesn’t permit altering parts of the macOS boot process. For Windows/Linux, you have a variety of hardware, firmware, and OS vendors all in the mix and agreeing on escrow of keys for all of them is hard.

johncolanduoni··on Tailscale state file encryption no longer enabled by default
It was designed mostly for mechanisms where in the event of certain changes (BIOS upgrades, certain other firmware changes, some OS changes) there is a fallback mechanism to unlock the system and reset the key. This is why Windows BitLocker is so insistent about you saving your key somewhere else - if you do a BIOS update and it can’t decrypt, it’ll require your copy of the key and then reset the TPM-encrypted copy with the new BIOS accounted for.

A TPM’s primary function works by hashing things during the boot process, and then telling the TPM to only allow a certain operation if hashes X & Z don’t change. Depending on how the OS/software uses it, a whole host of things that go into that hash can change: BIOS updates being a common one. A hostile BIOS update can compromise the boot process, so some systems will not permit automatic decryption of the boot drive (or similar things) until the user can confirm that they have the key.

johncolanduoni··on US will ban Wall Street investors from buying single-family homes
If you have a model where you can do price manipulation of something while owning 1% of it, I understand why you wouldn’t share it. Where are you on the Forbes Billionaire List, out of curiosity?
johncolanduoni··on There were BGP anomalies during the Venezuela blackout
I don’t understand what your point about TLS 1.3 is. It’s only relevant if you’re doing a downgrade attack (or equivalently, using an active middleware box). TLS 1.3 itself is not vulnerable to this because it (a) doesn’t have non-PFS suites to downgrade to and (b) protects the cipher suites by including them in the key exchange material. But if the server supports TLS 1.2, an active MITM can still downgrade to it if the client doesn’t demand TLS 1.3 specifically (which browsers do not by default). It won’t matter to China until there are lots of TLS 1.3-only websites (which hasn’t happened yet).

China was already leaning on passive DPI and L3 blocking before TLS 1.3 complicated (but as I said, did not preclude) downgrading to PFS ciphers. The reason being that for about the last 10 years, many sites (including default CDN settings) used SSL profiles that only allowed PFS ciphers. For such a server, downgrade attacks are already not useful to the Great Firewall, so adding TLS 1.3 to the mix didn’t change anything.

> So did they? Remember, I'm not talking about some hypothetical future, this technology is actively in use today and has been for some time.

Google Chrome (for example) will now use ECH if the website has the relevant DNS record - but it doesn’t use the anti-censorship mechanism in the spec to make requests to servers that haven’t enabled it look like they may be using ECH. This, combined with the fact that China can just not serve the relevant DNS record by default, means it doesn’t really impact the great firewall.

This is actually a good example of the non-technical side of this: Chrome could send a fake ECH on every request, like the spec suggests. This would perhaps make China block all Chrome traffic to prevent widespread ECH. But then Chrome would lose out on the market share, so Google doesn’t do it. Technical solutions are relevant here, but even the most genius anti-censorship mechanism needs to content with political/corporate realities.

johncolanduoni··on There were BGP anomalies during the Venezuela blackout
The great firewall was updated to support inspection of TLS 1.3. They didn’t just decide it was whatever and let everything through. It was easier to just update their parsing than to force everyone to turn it off, so they did that instead. Perfect forward secrecy was a thing before TLS 1.3, and they’ve found other methodology to accomplish what they want.

For ECH, China can just require you turn it off. Or distribute their own blessed distribution. It’s the more marginal censorship regimes that will be in an interesting spot. Especially ones where the ISPs are mostly responsible for developing the technical measures.

johncolanduoni··on Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
Yeah but you can’t use the vast majority of crates that way. You have to create a separate unsafe C ABI, and then use it in the caller. Ergonomically, it’s like your dependency was written in C and you had to write a safe wrapper.
johncolanduoni··on Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
The best tool for your median software-producing organization, who can’t just hire a team of engineers to do this, is update embargoes. You block updating packages until they’ve been on the registry for a month or whatever by default, allowing explicit exceptions if needed. It would protect you from all the major supply-chain attacks that have been caught in the wild.

> The popular Javascript React framework has 15K direct and 2K indirect dependencies - https://deps.dev/npm/react/19.2.3

You’re looking a dependents. The core React package has no dependencies.

johncolanduoni··on Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
The system you’re proposing wouldn’t work, because without additional effort in the compiler and linker (which AFAIK doesn’t exist) there won’t be perfectly identical pages for the same static library linked into the same executable. And once you can update them independently, you have all the drawbacks of dynamic libraries again.

Outside of embedded, this kind of reuse is a very marginal memory savings for the overall system to begin with. The key benefit of dynamic libraries for a system with gigabytes of RAM is that you can update a common dependency (e.g. OpenSSL) without redownloading every binary on your system.

johncolanduoni··on Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%
Rust ABI (as opposed to C ABI) dynamic libraries are incredibly fragile with regard to compiler/build environment changes. Trying to actually swap them out between separate builds is pretty much unsupported. So most of the benefits of dynamic libraries (sharing code between different builds, updating an individual dependency) are not achieved.

They’re only really useful if you’re distributing multiple binary executables that share most of the underlying code, and you want to save some disk space in the final install. The standard Rust toolchain builds use them for this purpose last time I checked.

johncolanduoni··on I/O is no longer the bottleneck? (2022)
Sequential read speed is attainable while still having a (small) number of independent sequential cursors. The underlying SSD translation layer will be mapping to multiple banks/erase blocks anyway, and those are tens of megabytes each at most (even assuming a 'perfect' sequential mapping, which is virtually nonexistent). So you could be reading 5 files sequentially, each only producing blocks at 3GB/s. A not totally implausible access pattern for e.g. a LSM database, or object store.
johncolanduoni··on I/O is no longer the bottleneck? (2022)
What is the nature of the architectural limit here? The bus between an individual core and the caches and/or memory controller?
johncolanduoni··on There were BGP anomalies during the Venezuela blackout
That requires the client to only emit ECH, even if the ISP-provided (and therefore government controlled) DNS blocks HTTPS/SVCB records. China can easily make the default for a browser in China be to never even try to use ECH as well. Then they'll only annoy people trying to actively circumvent their system. They already do TCP sessionization to extract the SNI domain. Detecting ECH and then just dropping the connection at L3 is functionally equivalent.

In theory, sites could eventually require ECH to serve anything at all. But we're very far from that.

← PreviousPage 3 of 34Next →