HN Simulatornew | past | comments | lists | submit | mdspan's commentslogin

First time hearing about failfs. Does it have a niche use case or is it just for testing?


Failfs is a pretty cool pseudo-filesystem where every path lookup fails. So if yu place a statically-linked process into failfs with ONLY pre-allocated file-descriptors at process birth, close down unneeded sockets and enforce a default-deny firewall discipline, compromised applications are effectively isolated and unable to access local files or spawn shells during an exploit. An attacker can NOT move adjacently from the exploited process to other parts of the system because to do so they'll need to navigate from root and that would fail since yu set root as failfs and you've got yourself a pure, isolated data-processing pipe that can only interact via the exact file descriptors it was given!!

Unfortunately, yu can't use dynamically-linked apps anyway since failfs would break absolute path resolution loading system libraries.

EDIT:: But I guess yu could put a statically linked app on the socket, wrap it in failfs and gave it proxy requests to a dynamically-linked app process if your app must use something like python.


Sorry man I've been out of the loop with the hip crowd for a good while, but is "yu" now a thing like "thru" once was?


no biggie... I just like how 'yu' looks. It's an aesthetic.


Thanks, at first I thought it was the name of another tool or library ;)


I immediately parsed it as some CLI i don't know about as well


Is it possible to load the dynamic libraries before fork()ing and somehow prevent the path lookup and library loading? This will open up new possibilities for hardened security models.


That's a fun idea but take python (very familiar)... It's very deeply dynamic and even if yu run imports at the top of your code yu still have many large libs with lazy code execution baked deep inside their internal functions so that assumes yu actually know what code paths the application will hit later. More importantly this goes in the opposite direction of Python's lazy imports thingy.. basically you've got a bomb and yu wouldn't wanna do that. Also, imagine the startup time for large apps. I'd just put a statically-linked binary in front and proxy back to the dynamically-linked process if I can't rewrite the main app in something like Go or Rust.


You explicitly stated as such, I just want to emphasize it again: it only breaks dynamically linked libraries, which - from a stability point of view - is an antipattern anyway.

Almost always youre better off producing a bundle which has everything (excluding the runtime) included... Or just use better languages which categorically don't even have this scenario, eg golang, Java, rust, etc pp


idk if it's just me but deliberately using "yu" instead of "you" is annoying and makes me not really take whatever you say seriously


Yeah, it feels "not ND friendly" too. Totally breaks my reading flow.

I am the person addressed when someone says "you", not "yu". Why is that person changing how I'm addressed?

It's also confusing because it feels initially like it's some new Linux command or user, like "su".


ah, first sentence I thought yu was a typo. Second sentence I saw it I thought it might be a linux component of sorts. So it's not just a stylistic choice, it's actually harming my comprehension of what they're writing.


Lil' TAFKAP, the modern version of Saint Exupery.


Is it different from using seccomp with SECCOMP_RET_ERRNO and return code of EOPNOTSUPP for all filesystem syscalls?


How is that different from putting an app in a chroot jail or container?


For sandboxing: https://hackaday.com/2026/08/07/this-filesystem-is-born-to-f...

A process which is chrooted into failfs cannot open new files. It is limited to the set of filesystem file descriptors it already has open (presumably set up before the chroot or inherited into the process from some container runtime).


So basically more fine tuned jail controls.

I'd love if chrooting would become easier. In particular a requirement to have bash or a specific shell is annoying; imo a simple REPL should suffice already there. I wrote one that works years ago, need to look into what is all needed for a chroot (I always used bash for this but I'd also want to change to my own shell eventually).


We wanted capabilities[1]. Instead we get this over-complicated series of system calls with no design consistency that you have to use very carefully, else they can be bypassed (see the list of caveats on the failfs page).

[1] https://en.wikipedia.org/wiki/Capability-based_security


Capability-based security might be the bees knees, but how would one retrofit it into an existing kernel without breaking backwards compatibility?


They’ll do everything but adopt Capsicum. Shame.


I'd love to have one that randomly fails, so we could debug e.g. databases and other apps that are supposed to be resilient. I'd call it "havocfs". Doesn't corrupt data, just randomly fails reads/writes/etc. Some software is supposed to handle that gracefully. Would be a great test tool...



Such a filesystem could be done with FUSE. Devices can be done by Linux itself: https://docs.kernel.org/admin-guide/device-mapper/dm-flakey....


It looks like it's useful for sandboxing by preventing any possible filesystem movement.

https://docs.kernel.org/next/filesystems/failfs.html


proposed by John Ericsson (Nix core contributor) for the idea of Null namespaces to make namespaces cheaper for when doing finegrained sandboxed builds.


Reading the description, looks like a stricter chroot for purely-network applications, maybe?


Operating systems code can definitely afford runtime checking if it's not too expensive in terms of performance. The Linux kernel has a WARN_ON macro that does exactly this. The tradeoff is worth it in a lot of cases if you're exchanging a small amount of performance for greater debug-ability or security.


I think until something hardware-based like CHERI becomes widely deployed (which seems extremely unlikely in the near to mid term given), we're going to keep seeing VM escape CVEs pop up indefinitely.


Because we've never encountered hardware bugs…


Critical hardware bugs occur an order of magnitude less frequently than critical hypervisor/kernel bugs, which is why they always make the news. In general, they're also more difficult to exploit. We haven't seen any serious spectre or meltdown malware in the wild almost a decade later.


But when they get discovered the only solution is to redesign the thing and throw away all of the hardware, with no mitigation strategy in between.

Some might prefer issues that can be fixed instantly and cheap to issues that will require years and millions to be fixed.


You seem to be arguing on the basis that people are throwing away the software security layers, when the discussion so far has been about hardening the software security layers even more with secure hardware.

This is the nirvana fallacy in action. Because you cannot imagine a world with perfect hardware, you think hardware that catches 99.9% of security bugs is worthless.


You seem to be discarding budget problems. Yes you can do a lot more things if you have unlimited budget, but that is rarely the case. So most solutions won't be implemented if they aren't also relatively inexpensive.


That's not something that's unique to C++ though. For example, Rust has the same issue.


That's not necessarily true. Vibecoding a simple JSON -> YAML converter to translate a 2MB JSON is going to be much cheaper than including that JSON in a prompt and burning hundreds of thousands of tokens. Besides, there's lots of cases where the math simply favors a bigger one-time cost rather than paying fees in perpetuity.


Even today, an advanced AI model will realize exactly what you said, and generate a script and run it behind your back to save the costs and ensure correctness. To me, that's still using the agent directly, not vibe coding. No app gets developed in the process, and if the agent doesn't tell you, you won't even know any coding took place.

With the caveat that literal today's models are not allowed to run code themselves but instead give you the code in the chat window and ask you to run it yourself for security and safety reasons. But the capability is there.


Right, which makes the one-shot task cost the same as the permanent solution in that case. So if you wanted to do this task even twice, you would still be better off creating the tool once and just using it. Imagine if proof assistants like Lean didn't exist. Research with AI would get a whole lot more expensive if it had to re-create Lean every single time you asked it to prove something.


If you want to do literally the exact same task in literally the exact same configuration and ideally the exact same input data, then yes, it costs the same. But that solution is as permanent as it is useless.

A tool for generating a report for September 2026 is no more expensive than an agent generating a report for September 2026. But that tool is useless for you in October 2026. You'll need to generate a whole new tool for October 2026, and generating 2 tools costs as much as generating 2 reports so you're not saving anything.

Making a tool that can generate a report for any single month can easily cost 10 times more than a single report, entirely due to the extra code flow analysis required to extract the right variables in the right places. And that's without any UI. If you want UI that's another several times more tokens because UI is hard. Also it will suck compared to a simple chat window where you can ask the assistant for anything and it will understand. If you want UI that's better than the chat, that alone costs you more than everything you spent so far.

All in all, your permanent solution starts paying for itself in about 4 to 6 years, assuming you never had to update how the report is generated in the meantime.

Or you could have a very simple, very cheap script that only gets run once then gets deleted (or even better, kept for future reference to make future report scripts even cheaper to generate).

Note that this is all in the hypothetical future where AI is actually capable of one shotting such a task. If it makes mistakes, then human-made apps are still the most cost-effective option and this whole discussion is moot.


Could you elaborate on what you mean by "don't interact with hardware much anymore"? If you compare modern drivers with similar ones from 20 years ago, for example, you'll find the modern ones tend to be quite a bit more complex.



No directly anyway, for the OS it's all abstractions and isolation. There was a time when the OS could basically see and control everything, but now there are subsystems all over the place with their own memory, their own software, all outside of the control of the OS. CSME runs while the computer is powered off.


Companies frequently get early access to frontier models.


I really miss the customization that older laptops offered, especially the socketed CPUs. I remember putting a i7-3840QM in my T430 and having it shut down due to overheating every few minutes to the point where I had to install the heat sink from the GPU model. Was fun tinkering around with it and I wish modern laptops had a similar level of hackability.


You'll feel right at home with something from Frame.work (writing this comment from my 13" FW).

If they ever sell their 12" version with AMD cpu, I might get one as well.

Encouraged my friend to buy one, his feedback: "best piece of tech in my past few years."


Everyone I know hates their framework and calls it unreliable garbage


I want to love the frameworks but the modifiable ports being a slot-in usbc dongle feels like such a cheap hack. Last I checked, the only available Ethernet module still sticks out of the case like a Lego brick


That's weird, I know several folks who like their frameworks. Certainly the build quality is a little so-so, but the magic of small samples I suppose.


To be fair, that's exactly what the original poster said that they "really miss[ed]", so it seems like a good recommendation.


I'm using a Framework 13 right now. I love it.


Yeah, Framework seems to fit that niche well. Only thing is that Framework isn't a tech giant like Lenovo so I imagine it would be more difficult to source replacement parts.


Never managed to get one myself, but Framework laptops could be your thing as well?


If you don't mind the nazi bar, silencing and unresponsive support etc.

(https://community.frame.work/t/framework-supporting-far-righ...)


When I was shopping for that same CPU a couple of years ago for my T530, the cheapest way I found to get one to my door was to buy it already-installed in the bottom-half of a whole 'nother T530 -- with the nVidia upgrade (which I already had).

I thought it was pretty amusing to get the CPU and a complete pile of spare guts for less than the price of the CPU by itself.


Hah I'm doing this with some models of that same era judging by the CPU you cited. I had frankensteined one laptop from like the best parts out of three I had from that era, got xubuntu on it, running fine-ish but the Wi-Fi antenna ran through the on-board display chassis, which was destroyed. Took off the top clamshell, was gonna put ether in it and use as a desktop, but oops! The clip holding ethernet cable fell out during disassembly! No prob, pop it back open, oops! One of the screws holding the mobo is stripped! (Also, wife goes into labor while everything disassembled) No sweat, get something from ace to extract. I think I ended up throwing it back together and not testing?

Forgot about it for a couple years, wanted to put opnsense on it and see if I could replace stock equipment leased from ISP, nope. No display.

Fun to a point but probably should just spring for a used thinclient at this point, but prices are scary and I hate letting all this hw go to waste


Worth noting the gap between floating point vs integer division isn't that bad on newer CPUs these days. On Zen5, for instance, DIVSD has a latency of 13 cycles vs 16 cycles for DIV.


I think they mean storing just an exponent instead of an exponent + mantissa. Makes multiplication much easier to implement.


Guidelines | FAQ | Lists | API | Security | DMCA | Apply to YC | Contact

Search: