HNHacker News
TopNewBestAskShowJobs

_wmd

6,131 karma · joined February 7, 2013

submissionscomments
_wmd··on All extensions disabled due to expiration of intermediate signing cert
Let's not forget multiple mobile networks across Europe went down on the same day last year because Ericsson(?) let a cert expire on some internal management system that had not been updated. SSL cert renewal is one of the great unsolved problems in computer science

edit: not Europe, just UK and Japan apparently: https://www.zdnet.com/article/ericsson-expired-certificate-c...

_wmd··on Use mmap with care
I hate to do this, but:

> paragraph, n.: a distinct section of a piece of writing, usually dealing with a single theme and indicated by a new line, indentation, or numbering

In the original comment you will find two of these, the former correcting an error in the parent comment, the latter making an observation based on the obvious brainwrong riddled throughout this thread

I'm done replying, you're of course free to continue checking in hazardous and suspect file IO code, as the rest of us are free to giggle at such things before ripping them out

_wmd··on Use mmap with care
This simply won't die, will it? I mean, while we're at it, let's advocate abandonment of all higher level languages because essentially they all boil down to machine code, and nobody could recommend working directly with machine code any more, could they.

(But that would be a sweeping generalization)

_wmd··on Use mmap with care
Let's try and simplify things here: the post we're both currently commenting on relates to doing file IO via nmap. Of course 'avoiding all use of virtual memory' is ridiculous, but nobody except you is suggesting that, and you continue to suggest it even after a long reply.

The "powerful (and consequently hazardous) OS feature" here is using mmap for general file IO, it:

- introduces resources leaks many developers can't profile

- introduces VM bottlenecks 99% of developers can't profile

- introduces random segfaults delivered to arbitrary threads in the running process, leading to crashes many developers can't diagnose

- the mmap() interface itself is fundamentally unsafe in that it allows partially overwriting random bits of VM (MAP_FIXED) with file views, and worse still, allows those mappings to be read-write

Once again, nobody has ever suggested avoiding virtual memory except you -- once again, that is impossible in a modern environment, but it is more than possible, and ultimately incredibly sensible, not to mention entirely on topic with regards to this thread and the article it is attached to, to suggest avoiding use of mmap for general file IO

_wmd··on Use mmap with care
It is not constructive to form a sweeping generalization from a statement and then claim the sweeping generalization is ludicrous, implying the original statement is ludicrous. :)

My first comment was in reply to one claiming anonymous memory did not have the same problems as file-backed memory, indicating the parent did not understand they are the same thing. The subsequent reply was to another comment continuing to claim anonymous memory was somehow safer, both instances supporting the notion that most people in this thread don't seem to understand mmap at all.

What we're examining is a powerful (and consequently hazardous) OS feature that often provides only marginal performance improvement, yet introduces many exotic error paths into a program that have their own exotic problems (memory access in thread A can raise SEGV in thread B, async-signal safety), that 7 hours' commenting has not been sufficient to fully capture. This thread is full of upvoted miscomprehension, bad advice (spawn a child to deal with SEGV!?), obviously incorrect solutions (signalfd), and yet still manages to completely omit some critical characteristics of mmap, for example, that faults take a VM-global semaphore -- mmap can easily destroy multithreaded app performance in a way read() is immune to, because nobody expects file IO in one thread to cause malloc() latency in another.

If this isn't evidence for "avoid this feature wherever possible", I really don't know what is.

_wmd··on Use mmap with care
If a process was swapped out and a fault fails to bring a page back due to an IO error, you can at least catch (I think) SIGBUS. But this just reinforces the point: nobody really understands virtual memory, even people like us that think they do
_wmd··on Use mmap with care
Anonymous mappings are backed by swap and may be overcommitted, it's still possible to catch signals in a wide variety of circumstances

There is probably enough evidence in this thread to use it as a reference for why typical apps should avoid mmap whenever possible -- it's clear almost nobody fully understands it

_wmd··on Nemu – Modern Hypervisor for the Cloud by Intel
So a fork of Qemu that makes no promises to keep AMD support, and uses words like "leverages".

Its not clear why this needs to exist, as opposed to working with upstream to produce a single tree that can be built with a slimline profile enabled

_wmd··on Modern C++ Won't Save Us
Linux hit a related situation: a harmless null pointer dereference was treated by GCC as a signal that a subsequent isnull test could not be true, causing the test to be optimized away. https://lwn.net/Articles/575563/
_wmd··on Zstandard v1.4.0
Zstandard uses ANS in some (all?) of its modes, that's very much brand new -- 2014
_wmd··on Zstandard v1.4.0
Zstandard is awesome, there is nothing else close to it that I've seen. There are plenty of codecs that give you either obscene ratios or low CPU usage, but none that support both in combination. Zstandard on its highest setting easily competes with xzip for anything I've thrown at it. Decompression throughput is unaffected by compression setting -- it just burns more memory. So you can get xzip-like ratios with decompression throughput approaching 1GB/sec

It allows trading lower CPU for gzip-or-worse compression, and you can mix the settings within a single file. This means you can e.g. use the lowest setting (or no compression at all - it supports that too) to append to a file, while occasionally recompressing recent appends into a single block using the highest setting -- so the cost of compression can be amortized

The only petty annoyance with it is ecosystem support - e.g. GNU tar has no option for it, so it's slightly more painful to work with

_wmd··on Notarizing Your App Before Distribution
This is literally how code signing worked for Windows. Unsurprisingly signed malware has been far from uncommon
_wmd··on Fast Directory Listing on Linux
Why create a computer when an abacus counts just as effectively :) Time, precious time! We're all born with a limited number of breaths, let's not waste them sighing while waiting for a simple task to complete. In this way faster tooling is a very real method otherwise pure-tech projects can prolong the lives of people. Fix a slow popular tool and the effect is multiplied
_wmd··on Top Scores: Video Game Music
Obligatory https://www.youtube.com/watch?v=-b5X69vREAg
_wmd··on CRFS: Container Registry Filesystem
> This makes images a few percent larger

Teehee. The method is not new at all, for example compressors like xzip do this out of the box, and almost the exact thing they're doing is basically how ZIP files work

The trouble with discarding state on every file is that it really hurts performance with small files, or when using anything like a modern codec, which gzip/deflate is not. Gzip maintains a 32kb dictionary which is quite easy to exceed with contemporary data, but with a modern compressor (like lzma2) losing that window will absolutely devastate ratios

The usual solution is so-called 'solid' compression, where the uncompressed input is partitioned into blocks spanning file boundaries. It configurably trades seek efficiency for reliably preserving compressor context -- including allowing seeking within files. Their format could be modified to support this while retaining backwards compatibility as good as the current method. What they have is already pretty much solid compression, except it only chunks large files. This is basically a weird special case of a simpler and more general design everyone else uses.

Finally on the compatibility angle, the end of stream is visible at an API level, so this isn't going to be 100% perfect. I'd expect one or more obscure implementations (maybe Windows apps? Java?) to potentially break

_wmd··on Google unveils Stadia cloud gaming service
An alternative explanation might be that it's a buffer for overprovisioned GPUs for an undersold Cloud service
_wmd··on Ask HN: Is Someone Hijacking Google Images?
"no country redirect", sets a cookie to prevent you getting the google domain for your locale
_wmd··on Suse is once again an independent company
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin.... (6 commits per day for the past year)
_wmd··on A world of hurt after GoDaddy, Apple, and Google misissue 1M certificates
This seems highly unlikely to be authoritative -- AIUI serial number unpredictability is critical to SSL certificate security, as without it, it becomes possible to induce a CA into producing a signature that matches a certificate for another domain. Unless something else changed about the format when the hash algorithm was changed, AFAIK this property is independent to the hash algorithm in use

If memory serves it isn't a theoretical attack either, I read about it used against (Startcom maybe?) not so many years ago

_wmd··on Nginx to Be Acquired by F5 Networks
BPF is 12 years older than Facebook :)

People don't buy individual pieces of technology, they want packaged solutions that come with support. Tech almost matters less than good support

_wmd··on Ghidra, NSA's reverse-engineering tool
For which they charge a per-CPU fortune https://www.hex-rays.com/cgi-bin/quote.cgi
_wmd··on Ghidra, NSA's reverse-engineering tool
This link is third party junk, don't touch it. A "fork" existing before the original software release, yeah right
_wmd··on USB4 Specification Announced: Adopting Thunderbolt 3 Protocol for 40 Gbps USB
If only it were just about cost, comprehensiveness might be a better way to look at it. I really don't want my laptop's keyboard and trackpad to require clocks to drive my clicks and keystrokes at 40Gbps, that's just going to murder batteries and bank accounts for no reason whatsoever.

So you're left with a choice in this wonderful alternative non-optional world: some expensive temperature controlled oscillator with accompanying nuclear power plant integrated into every mouse, with a dual core processor just in case the host wishes to speak mouse-over-Thunderbolt, with a 240V connector on the mouse just in case the host wants to charge from it, or mice living on a separate low throughput bus where such requirements don't exist. We had that already, it was called the 1970s-1990s, it was an even bigger mess than what we have now, and is exactly what USB's mandate is to avoid

It's not like this is a new problem to USB, it's been a tri-modal specification from the outset to cope with completely different requirements of the peripherals that were to be unified, these horrible recent complexity outcomes are just a natural extension from the early days.

It wasn't so long ago that every budget peripheral manufacturer outside of e.g. printers and mice were forced to bundle expansion cards to implement custom busses just so you could talk to their e.g. scanner. This was still the reality of things as late as 1995 or so. Here we didn't just have custom connectors on the back of the machine, but custom cards that had to be installed to implement those connectors. In the 24 years since 1995, outside of display interfaces I count only 2 major new busses to date -- Firewire and USB. That sounds like a success to me

_wmd··on USB4 Specification Announced: Adopting Thunderbolt 3 Protocol for 40 Gbps USB
Transmit and receive previously shared pins, USB 3 split transmit and receive into separate pairs, which are still serial

edit: yikes, looks like USB C doubled the number of those separate pairs, for a total of 6 data pins (2x RX, 2x TX, 2x USB 2.0 RX/TX)

_wmd··on Show HN: REDasm Disassembler 2.0
This looks very nice! But posting it a day ahead of NSA's Ghidra unveiling? It's going to be buried in the noise :(
_wmd··on YouTube bans comments on all videos of children
> Why would it be the company's duty of care and not the parent's?

It is the company's duty of care for the same reason that

- it is the city's duty of care if the child goes outside and falls down an unmaintained manhole

- it is the school's duty of care if a fire extinguisher malfunctions and kills the child

- it is the driver's duty of care if the child crosses the road and gets struck on a green crossing

In all these cases, the entities assume a certain privilege to operate due to the trust placed in them that enables the freedom for the child to go outside whatsoever. If that duty does not exist, then there is no trust the child can safely leave home unattended. In effect what you're arguing for is total control from the parent -- a much worse outcome for a child than self-moderation on behalf of the trusted entities they would otherwise have had the freedom to interact with.

_wmd··on YouTube bans comments on all videos of children
> Why would it be the company's duty of care and not the parent

It is the company's duty of care for the same reason that

- it is the city's duty of care if the child goes outside and falls down an unmaintained manhole

- it is the school's duty of care if a fire extinguisher malfunctions and kills the child

- it is the driver's duty of care if the child crosses the road and gets struck on a green crossing

In all these cases, the entities assume a certain privilege to operate due to the trust placed in them that enables the freedom for the child to go outside whatsoever. If that duty does not exist, then there is no trust the child can safely leave home unattended. In effect what you're arguing for is total control from the parent -- a much worse outcome for a child than self-moderation on behalf of the trusted entities they would otherwise have had the freedom to interact with.

_wmd··on YouTube bans comments on all videos of children
> You categorically said that if a service can't do it, then the service needs to change

Would you categorically state that if the service can't do it, the service should continue in its present form?

Walls are some of the oldest inventions of civilization, and YouTube currently lacks /any/ walls. I'm arguing for some walls in the right places, you're arguing for no walls whatsoever. We have a difference of opinion, it's fine.

_wmd··on YouTube bans comments on all videos of children
> Firstly, kids on YouTube were NOT impacted by this

Unfortunately this is inaccurate. There are billions of daily adolescent YouTube users, some of whom entering puberty that were exposed and continue to be exposed to the recommendation algorithm that created this mess in the first place, and for periods running into hours every evening.

At such an early stage in development, it is absolutely the company's duty of care to ensure that a 5 year old is not being sent up a gradient of a recommendation system that is encouraging them (with the help of the comments just removed) to view people of their own age in a sexual manner. Not only were children impacted by this, but the mechanism that enables it remains active to this day.

I agree with the idea of allowing children outside, but as per my reply to your previous comment, not if that means spending all day in the back yard of the village creepy old man. Balance is required in every situation, and denial of the kind your comment is riddled with accomplishes nothing.

_wmd··on YouTube bans comments on all videos of children
This reply is needlessly personal, are you materially affected by this issue somehow?

> Would you ban beaches as well, because creeps might watch others on a beach?

No, but nor would I pretend people can shower and change without cubicles, or permit the nearby village to drown during the first storm because I deluded myself in the belief there was no need for a seawall.

There is no rationality to be found in an absolute "save the children at all costs" position, much as there is none in "freedom of speech at all costs". This issue like so many more is nuanced, and I'm surprised people here are so easily willing to deny its possibility, but prefer to get worked up by its very existence or the plain reality nuance is required to solve the problem. Progress is never due to people like that.

← PreviousPage 2 of 23Next →