Is there a list of CMD builtins somewhere?
HN user
Tobu
In the case of find and sort, the command invoked also depends on argument sniffing, with a fallback through the registry when that is indecisive: https://github.com/microsoft/coreutils/blob/main/src/nthelpe...
The method is called `CoherentAllocation::into_parts`. And it takes self by value, which means the struct is consumed (this is implied by the into_ prefix). Of course you would either reconstruct the allocation or free the allocation yourself after this.
See Vec::into_raw_parts or Box::into_raw for an stdlib analogy.
will they abdicate their power
Yeah, no. This is a coup and they are all in. They would not be this blatant about taking control illegally and fast if they expected to leave any institutions to still enforce the law against them.
Looks like the Steam team moved to control spawning and do execvpe.
I would like to see at least in-process environment modification discouraged. Rust is dealing with the issue by considering getenv unsafe when coming through C, but getting rid of the read side is much harder than the write side.
It is possible to check for setenv/unsetenv/putenv with nm -D, and a quick sample of my ~/.cargo/bin/* shows far too many programs using those. Yeah they could be single threaded, but who can guarantee they will remain so? Come to think of it listing symbols could detect pthread_create as well.
I'd be interested in a way to do static binary analysis to get from those symbols to a call tree, as well.
I don't see a way to check for **environ usage though, the compiler could turn this one into anything.
There's a proof of concept here: https://sinrega.org/2024-03-06-enabling-containers-gpu-macos...
There was indeed sabotage, in the form of dismantling and not replacing hundreds of working mail sorting machines in an election year: https://www.forbes.com/sites/andrewsolender/2020/08/19/repor... https://truthout.org/articles/usps-sorting-machines-are-stil... https://www.ajc.com/news/postal-service-tells-judge-mail-sor... https://edition.cnn.com/2020/09/09/politics/usps-removed-711...
I don't know how he hasn't been removed after this.
I've had my own bad experiences with Btrfs (it doesn't behave well when close to full), and my intuition is that Facebook's use of it is in a limited operational domain. It works well for their use case (uploaded media I think?), combined with the way they manage and provision clusters. Letting random users loose on it uncovers a variety of failure modes and fixes are slow to come.
On the other hand, while I haven't used it for /, dipping my toes in bcachefs with recoverable data has been a pleasant experience. Compression, encryption, checksumming, deduplication, easy filesystem resizing, SSD acceleration, ease of adding devices… it's good to have it all in one place.
fclones for example covers it well for any filesystem with reflinks:
fclones group |fclones dedupe
Error handling on CRC read error 2 or more copies of file, CRC on error, read other copy, data returned to userspace, does not correct bad copy
That's been implemented; in Linux 6.11 bcachefs will correct errors on read. See
- Self healing on read IO/checksum error
in https://lore.kernel.org/linux-bcachefs/73rweeabpoypzqwyxa7hl...
Making it possible to scrub from userspace by walking and reading everything (tar -c /mnt/bcachefs >/dev/null).
The Into<SpanArithmetic> argument feels a little too magical. Since you are not constrained by a trait, I would prefer something like
Span::add_with_reference(&self, other: &Span, reference: impl Into<SpanRelativeTo>)The other actress wasn't the only one involved in the production; she provided input but OpenAI building a voice model would involve a lot of data and input. They had to have a model of her ready to go when they asked her for permission immediately before launching; possibly they had one that had been built from her, and another legal-approved that they had converged to be close to the first one but that didn't include her as a direct source.
Emergency braking feels more like shoving the wheel forward than shifting oneself behind the wheel. You ignore balance for a while, get yourself into a sitting position fast, the system can right itself (or not) after you've bled enough speed.
Adept -> Guru is the logical association
There are two level of pointers: the environment block points to an array of pointers to C strings, this higher-level pointer can be updated and the previous one freed, which is a problem when it is being iterated on (which getenv does). The C strings themselves aren't freed by glibc, though some applications do modify them in place.
Who doesn't? libc itself calls getenv when getting system time: https://news.ycombinator.com/item?id=38344224
You may have a mutex on getenv/setenv, like the Rust stdlib does, but when libc doesn't look at that mutex, even on the read side, you run into UB.
So the next step is never calling into seemingly innocent libc functions in safe code (which you have to enforce on your dependencies as well), implementing safe alternatives to a good chunk of libc (and making sure your dependencies use those), to cordon off anything that looks at the environment. This makes a good chunk of POSIX functionality useless.
kernel developers are free to factor in common functionality, calling into it library style, without making it into an externally visible layer. IIRC fs encryption and case insensitivity are often done that way, and I think I'd count the page cache and bios as larger library-style components as well (as opposed to the VFS layer which is more in a framework style).
Of course bcachefs can cache data; that was the main draw of bcache as well.
Quoting an example from https://bcachefs.org/GettingStarted/
bcachefs format /dev/sd[ab]1 \
--foreground_target /dev/sda1 \
--promote_target /dev/sda1 \
--background_target /dev/sdb1
mount -t bcachefs /dev/sda1:/dev/sdb1 /mnt
This will configure the filesystem so that writes will be buffered to /dev/sda1 before being written back to /dev/sdb1 in the background, and that hot data will be promoted to /dev/sda1 for faster access. bcachefs format --help
--promote_target=(target)
Device or label to promote data to on readI think the word they were looking for is "fragmented".
I was thinking of that around the "stack-based interpreted language" paragraph. Mozilla's RLBox/wasm2c approach would be good for this, for example. Postscript can still mix data and code, but it won't jump outside of the sandbox, and the rest of the program treats its output as untrusted.
https://hacks.mozilla.org/2021/12/webassembly-and-back-again...
Thank you! I couldn't find it last time I needed it (it was on a Heroku domain that went https://http.cat/status/404 )
404 is handled exceptionally inside the sequence, and for a while it was double-exceptionally possible to land on it through the random button:
https://web.archive.org/web/20190328010454/https://plus.goog... (via explainkcd)
https://xkcd.com/2822/ -> https://datatracker.ietf.org/doc/html/rfc2822
Any other fun easter eggs in the XKCD counter?
- https://xkcd.com/404/ 404s (obviously)
- https://xkcd.com/1337/ is about hackinghttps://www.cvedetails.com/vulnerability-search.php?f=1&prod... finds quite a few: double free, array out of bounds, buffer overflows in the stack and the heap…
There's also a format string vulnerability that wouldn't exist in Rust and which C turns into privilege escalation instead of aborting.
Indeed, here's GitHub doing exactly that (fixing mixed content warnings by reverse-proxying third-party HTTP content), back in 2010: https://github.blog/2010-11-13-sidejack-prevention-phase-3-s...
Some popular proc-macros could be pre-compiled and distributed as WASM, and it would be impactful, since they tend to bottleneck the early parts of a project build. However I don't think that could be made entirely transparent, because right now there's a combinatorial explosion of possible syn features. For now I avoid depending on syn/quote if I can.
The author was gently panned when this was originally posted on Reddit, and they added that note, but now that the article is being reposted uncritically where people may not know the difference, it's worth pointing out again. The way the author got a profile out of Miri is creative, but Miri was never a helpful guide for profiling, it seems that the second benchmark they used for confirmation was also unoptimised (run without --release which is a rookie mistake). Then they got wrong conclusions from flawed observations about the costs of abstractions like range.contains.
I don't see why you'd blame Linux for deleting a file you asked it to. However, if the process is sufficiently long-running, it is possible to relink the file by looking inside `/proc/$(pgrep yourprocess)`.
As far as I'm aware (ICEs…) compilers aren't hardened against untrusted code, and a sufficiently capable exploit could be used to poison the cache.