Readit News logoReadit News
jcalvinowens commented on Cloudflare incident on August 21, 2025   blog.cloudflare.com/cloud... · Posted by u/achalshah
__turbobrew__ · a day ago
> This system will allot network resources on a per-customer basis, creating a budget that, once exceeded, will prevent a customer's traffic from degrading the service for anyone else on the platform

How would this work practically? If a single client is overflowing the edge router queues you are kindof screwed already? Even if you dropped all packets from that client you would need to still process the packets to figure out what client they belong to before dropping the packets?

I guess you could somehow do some shuffle sharding where a single client belongs to a few IP prefixes and when that client misbehaves you withdraw those prefixes using BGP to essentially black hole the network routes for that client. If the shuffle sharding is done right only the problem client will have issues as other clients on the same prefixes will be sharded to other prefixes.

jcalvinowens · 18 hours ago
> Even if you dropped all packets from that client you would need to still process the packets to figure out what client they belong to before dropping the packets?

In modern Linux you can write BPF-XDP programs to drop traffic at the lowest level in the driver before any computation is spent on them at all. Nearly the first thing the driver does after getting new packets in the rx ring buffer is run your program on them.

jcalvinowens commented on Don't pick weird subnets for embedded networks, use VRFs   blog.brixit.nl/dont-pick-... · Posted by u/LorenDB
jcalvinowens · a day ago
I've always been able to solve this problem more simply using IPv4 link-local addressing (https://www.rfc-editor.org/rfc/rfc3927), it doesn't matter if somebody abuses the same range because the outbound interface is explicitly specified in sin6_scope_id passed to connect() and bind().

But if you're writing code at a higher level than the bsd sockets api, it's a whole can of worms.

jcalvinowens commented on I'm too dumb for Zig's new IO interface   openmymind.net/Im-Too-Dum... · Posted by u/begoon
MrResearcher · 2 days ago
If the flush (syscall) fails, it's not possible to recover in user space, therefore the only sensible option is to abort() immediately. It's not even safe to perror("Mayday, mayday, flush() failed"), you must simply abort().

And, the moment you start flushing correctly: if(flush(...)) { abort(); }, it becomes infallible from the program's point of view, and can be safely invoked in destructors.

File closure operations, on the other hand, do have legitimate reasons to fail. In one of my previous adventures, we were asking the operator to put the archival tape back, and then re-issuing the close() syscall, with the driver checking that the tape is inserted and passing the control to the mechanical arm for further positioning of the tape, all of that in the drivers running in the kernel space. The program actually had to retry close() syscalls, and kept asking the operator to handle the tape (there were multiple scenarios for the operator how to proceed).

jcalvinowens · 2 days ago
If the tape drive failed close() in a way that did not deallocate the file descriptor, that was just straight up a bug.

Retrying close() is dangerous, if the file descriptor was successfully deallocated, it might have already been re-allocated by another thread. I'd guess the program you're describing was single threaded though (it can still bite there though)

jcalvinowens commented on I'm too dumb for Zig's new IO interface   openmymind.net/Im-Too-Dum... · Posted by u/begoon
AndyKelley · 2 days ago
It's unfortunate that the original authors of this interface didn't understand how important infallibility is to resource deallocation, and it's unfortunate that NFS authors didn't think carefully about this at all, but if you follow the advice of the text you pasted and read the section about how you can't retry close() after an error, it is clear that close is, in fact, a fundamentally infallible operation.
jcalvinowens · 2 days ago
Yeah, close() can't fail, but it can return an error. It's kind of odd.

How could one fix that though? It seems pretty unavoidable to me because write() is more or less asynchronous to actual disk I/O.

You could add finalize() which is distinct from close(), but IMHO that's even more confusing.

jcalvinowens commented on Tom Lehrer has died   nytimes.com/2025/07/27/ar... · Posted by u/detaro
jakedata · a month ago
https://tomlehrersongs.com/

I, Tom Lehrer, individually and as trustee of the Tom Lehrer Trust 2007, hereby grant the following permissions: All copyrights to lyrics or music written or composed by me have been permanently and irrevocably relinquished, and therefore such songs are now in the public domain. All of my songs that have never been copyrighted, having been available for free for so long, are now also in the public domain. In other words, I have abandoned, surrendered and disclaimed all right, title and interest in and to my work and have injected any and all copyrights into the public domain.

The permission granted includes all lyrics which I have written to music by others, although the music to such parodies, if copyrighted by their composers, are of course not included without permission of their copyright owners. The translated songs on this website may be found on YouTube in their original languages. Performing and recording rights to all of my songs are included in this permission. Translation rights are also included.

In particular, permission is hereby granted to anyone to set any of these lyrics to their own music, or to set any of this music to their own lyrics, and to publish or perform their parodies or distortions of these songs without payment or fear of legal action.

Some recording, movie, and television rights to songs written by me are merely licensed non-exclusively by me to recording, movie, or TV companies. All such rights are now released herewith and therefore do not require any permission from me or from Maelstrom Music, which is merely me in another hat, nor from the recording, movie, or TV companies involved.

In short, I no longer retain any rights to any of my songs.

So help yourselves, and don’t send me any money.

NOTICE: THIS WEBSITE WILL BE SHUT DOWN AT SOME DATE IN THE NOT TOO DISTANT FUTURE, SO IF YOU WANT TO DOWNLOAD ANYTHING, DON’T WAIT TOO LONG.

Tom Lehrer November 26, 2022

jcalvinowens · a month ago
I made a git archive of everything a little over a year ago: https://github.com/jcalvinowens/tomlehrer-archive

You can help out by hosting a copy somewhere!

jcalvinowens commented on AMD CEO sees chips from TSMC's US plant costing 5%-20% more   bloomberg.com/news/articl... · Posted by u/mfiguiere
timmg · a month ago
What I really want to know, from someone who does know: Is Intel cooked? Like, will they be able to manufacture chips that compete with TSMC?

They used to be a crown-jewel of US tech. But it seems like every time I read the news, they are announcing a delay or shutting down some product.

jcalvinowens · a month ago
> Is Intel cooked?

IMHO the whole user-visible p-core/e-core thing on desktop CPUs is one of the worst decisions in the history of microprocessors. My gaming machines need to do double-duty as as build boxes, so they're just utterly unusable for me.

jcalvinowens commented on How to Firefox   kau.sh/blog/how-to-firefo... · Posted by u/Vinnl
jcalvinowens · a month ago
Maybe most people don't care, but the difference build times is insane... Chromium takes nearly 4x as long to compile as the entire rest of a modern Linux system and it's toolchain combined.

I completely stopped using chromium two years ago and haven't looked back.

jcalvinowens commented on Solar power has begun to transform the world’s energy system   newyorker.com/news/annals... · Posted by u/dmazin
Tade0 · 2 months ago
It's a non-issue. Copper isn't that short in supply.

A typical car uses ~25kg of copper - that's enough for approximately 0.5m of HVDC.

The EU currently produces 12mln cars annually, down 3mln from the 2017 peak.

In other words there should be no issue with ramping up demand for the equivalent of 1500km of HVDC annually in the EU alone - a rate much higher than the local bureaucracy could manage issuing permits for.

jcalvinowens · 2 months ago
Do any of these HVDC lines really use copper? I think aluminum is much much more common.
jcalvinowens commented on How to prove false statements: Practical attacks on Fiat-Shamir   quantamagazine.org/comput... · Posted by u/nsoonhui
austin-cheney · 2 months ago
That is wrong. Most digital signatures in use today use certificates trusted through a certificate trust chain. The algorithms are different.
jcalvinowens · 2 months ago
It's not wrong. The only thing preventing me from forging your certificate is my inability to generate a new cert which hashes to the same digest as what is in your cert's signature. I don't actually need the keys if I break the hash.

EDIT2: I'm doing a bad job of explaining this... you obviously need the keypair associated with the cert to initiate connections with it and not trigger MITM alerts. But if you break the hash function, you don't need the private key from the root cert, the verbatim signature from the original cert will appear to be valid when spliced into your forged cert if the hash digest computation on the forged cert is the same.

jcalvinowens commented on Tree Borrows   plf.inf.ethz.ch/research/... · Posted by u/zdw
ralfj · 2 months ago
I would agree that C's strict aliasing rules are terrible. The rules we are proposing for Rust are very different. They are both more useful for compilers and, in my opinion, less onerous for programmers. We also have an actual in-language opt-out: use raw pointers. And finally, we have a tool you can use to check your code.

But in the end, it's a trade-off, like everything in language design. (In life, really. ;) We think that in Rust we may have found a new sweet spot for this kind of optimizations. Time will tell whether we are right.

jcalvinowens · 2 months ago
Thanks for replying Ralf. I'm barely qualified to have an opinion about these things, if I am at all :)

> The rules we are proposing for Rust are very different. They are both more useful for compilers and, in my opinion, less onerous for programmers.

My question was too vague, what I meant to ask was: what aliasing optimizations will be possible in Rust that aren't possible in C?

Example 18 in the paper is one, if I'm understanding it. But that specific example with a pointer passed to a function seems analogous to what is possible with 'restrict' in C, I'm struggling to come up with more general examples that don't involve gratuitous globals.

It seems to me like having to allow for the possibility of unsafe constrains the ability to do "heroic" optimizations such as what jcranmer described elsewhere in the thread. If that is true to some extent, is there a future where Rust might optimize more aggressively if the programmer promises not to use unsafe anywhere in the program? That's something I've always been curious about.

u/jcalvinowens

KarmaCake day1758October 25, 2013
About
calvin@wbinvd.org github.com/jcalvinowens
View Original