Hacker Newsnew | past | comments | ask | show | jobs | submit | ori_b's commentslogin

I guess it's not a bad Brexit.

Pretty wild that they picked that as their name AFTER Brexit began.

there are no good brexits, bro. god promise.

Imagine a race condition that writes a file node where a directory node should be. You have a valid object with a valid checksum, but it's hooked into the wrong place in your data structure.

> Imagine a race condition that writes a file node where a directory node should be. You have a valid object with a valid checksum, but it's hooked into the wrong place in your data structure.

A few things: 1) Is this an actual ZFS issue you encountered or is this a hypothetical? 2) And -- you don't imagine this would be discovered during a scrub? Why not? 3) But -- you do imagine it would be discovered and repaired by an fsck instead? Why so? 4) If so, wouldn't this just be a bug, like a fsck, not some fundamental limitation of the system?

FWIW I've never seen anything like this. I have seen Linux plus a flaky ALPM implementation drop reads and writes. I have seen ZFS notice at the very same moment when the power dropped via errors in `zpool status`. I do wonder if ext4's fsck or XFS's fsck does the same when someone who didn't know any better (like me!) sets the power management policy to "min_power" or "med_power_with_dipm".


Here's an example: https://www.illumos.org/issues/17734. But it would not be discovered by a scrub because the hashes are valid. Scrubs check hashes, not structure. It would be discovered by a fsck because the structure is invalid. Fscks check structure, not hashes.

They are two different tools, with two different uses.


> Scrubs check hashes, not structure.

How is the structure not valid here? Can you explain to us how an fsck would discover this bug (show an example where an fsck fixed a similar bug) but ZFS could never? The point I take contention with is that missing an fsck is a problem for ZFS, so more specifically can you answer my 4th Q:

>> 4) If so, wouldn't this just be a bug, like (a bug in) fsck, not some fundamental limitation of the system?

So -- is it possible an fsck might discover an inconsistency ZFS couldn't? Sure. Would this be a fundamental flaw of ZFS, which requires an fsck, instead of merely a bug? I'm less sure.

You do seem to at least understand my general contention with the parent's point. However, the parent is also making a specific claim about a bug which would be extraordinary. Parent's claim is this is a bug which a scrub, which is just a read, wouldn't see, but a subsequent read would reveal.

So -- is it possible an fsck might discover this specific kind of extraordinary bug in ZFS, after a scrub had already read back the data? Of that I'm highly dubious.


> Can you show us how an fsck would discover this bug but ZFS could never?

I'd have to read closer to be certain, but if my understanding of it is correct, you'd have orphaned objects in the file system. The orphaned objects would be detectable, but would have correct hashes.

Here's a better example of one where scrub clearly doesn't catch it, but fsck would (and zdb does). The metaslab structure could be checked in theory, but isn't. https://neurrone.com/posts/openzfs-silent-metaslab-corruptio...

> if so, wouldn't this just be a bug, like (a bug in) fsck, not some fundamental limitation of the system?

It's not a bug or a fundamental limitation of the system, it's just that fsck != scrub, and nobody has written the code for fsck. If someone wanted to write the code, they could. I suspect it wouldn't even be particularly hard.

But fsck != scrub, and they catch different things.


Typically, if you were writing your hypothetical sql client in rc shell, you'd implement an interface that looks something like:

    <>/mnt/sql/clone{
        echo 'SELECT * from ...' >[1=0]
        cat /mnt/sql/^`{read}^/data # or awk, or whatever
    }
This is also roughly how webfs works. Making network connections from the shell follows the same pattern. So, for that matter, does making network connections from C, just the file descriptor management is in C.

This is... I don't know. I don't get why I would care to sling SQL over a file system versus a network socket.

I mean, Postgres could offer an SSH interface as a dumb pipe to psql to just have you push text SQL queries in your application. But it doesn't, it offers a binary protocol over a network socket. All the database engines have had the same decision point and have basically gone down the same path of implementing a wire protocol over a persistent socket connection.

So yeah, I don't get what doing things this way would give me as either a service provider or a service consumer. It looks like video game achievements for OS development nerds, "unlocked 'everything is a file'." But it doesn't look like it actually enables anything meaningful.


How would you connect to Postgres in 4 lines of shell normally? How would you do it for a rest api? How about any other systems?

For Plan 9, it's all the same, all using the same interfaces, with little library glue.

Opening a window, and running a command in it? Similar interfaces. Adding LSP to your editor? Got it, you mount it and write to the files.

Universal shared conventions are powerful.


But if it requires understanding of a data protocol, it doesn't really matter if it's over the file system or a socket or flock of coked-up carrier pigeons. You still need to write custom user space code somewhere. Exposing it over the file system doesn't magically make composable applications, it just shuffles the code around a bit.

In other words, the transport protocol is just not the hard part of anything.


It's not hard, but it's sure a huge portion of the repeated boilerplate glue. Additionally, the data protocols are also fairly standardized in Plan 9; The typical format is tabular plain text with '%q'-verb quoting.

There's a reason that the 9front implementation of things usually ends up at about 10% the size of the upstream.


The benefit is that you can allocate arbitrary computers to compute arbitrary things. As it is now, you have to use kubernetes and it's a comedy. Though perhaps the same in effect, there are dozens of layers of abstraction that will forever sting you.

You're thinking from the perspective of the terminal user—ie, a drooling, barely-conscious human trying to grasp syntax and legal oddities of long-dead humans. Instead you need to think from the perspective of a star trek captain. Presumably they aren't manually slinging sql queries. Such tasks are best automated. We are all the drooling terminal user in the end, but plan9 enabled you to at least pretend to be competent.


Plan 9 is still alive and kicking -- The next Plan 9 conference will be in Victoria, BC in Canada later this year.

https://iwp9.org/

9front averages several commits a day:

https://git.9front.org/plan9front/9front/HEAD/log.html


I’ve been on/off playing with 9front on an old laptop. I’ve been having a lot of fun with it, it’s fun to write code for, but i have had a hard time using it as anything but a toy.

I would love to use it as my main desktop, but ultimately (and kind of unsurprisingly), the blocker is the lack of a modern browser and a lack of video acceleration.

I’m sure I could hobble something together with virtualization for the former but I don’t see a fix for video acceleration coming.

Maybe I could install it on a server or something.


I did the same with an old Thinkpad but somehow found it relies too heavily on the mouse. I might still go back to it because I love how far they've taken the "everything is a file" idea and would like to experiment more with that.

I saw on HN in a different Plan 9 thread (though I'm having a bit of trouble finding it), where someone mentioned the idea of using Plan 9 to build a custom router.

I have a very rough mental model of how that could be done, and I think it would be cool to say I have that, but I haven't been bothered to replace my beloved NixOS router yet.


Same here. I made a custom router (debian, nftables, dnsmasq, etc and python code to manage it all over ssh) and I spent way too much time on it to replace it :-)

As an aside, it's fun to see someone on the organizing committee affiliated with Cray, Inc.


> Theo is more specific than troll; it presents insults from OpenBSD founder Theo de Raadt.

check fortune(1) command.


That makes a lot more sense, especially as someone who has been on the receiving end of Theo on the OpenBSD mailing list.

It's a kind of mark of distinction, like Rodney Rude fans being personally insulted by him.

I wonder if there's various grades? Does a personal insult in private email rate higher than a general one on a mailing list?


There's a 9legacy port, and an in-progress 9front port.

https://m.youtube.com/watch?v=EOg6UzSss2A


That's interesting, thanks. I feel a need for simple multitasking/networking OS for synthesizable RV32I core (not RTOS like, but more like Unix or CP/M). Would be nice to try Plan9 on it once port is out.

Petabytes of it around. Here's a small sunset: https://www.earthdata.nasa.gov/

Would you like more, or do you plan on analyzing the first few petabytes first?


He means the original recordings. There were no digital recordings in 1880. Different apparatus, different methods. That’s the point

Ah, so a painfully obvious attempt at moving goalposts and showering people with bullshit.

I don’t think this is appropriate language

I'm sorry that you are offended.

How would you have phrased calling out an obvious, clumsy, and deliberate attempt to detail the conversation with obvious misdirection and mistruth?


You’re way off base . Not only inappropriate but irrelevant too

Got it, thanks for the poorly executed misdirection and misinformation.

They can speak for themselves, you and I don't really know what they want, or what they think counts as "raw" data.

Regardless, ascii encoding isn’t raw data. You’re making software engineer assumptions. Statistical noise is introduced 4-5 steps before the data is recorded digitally.

Even after it’s digitized, more noise is introduced through recording errors and normalization.

To understand the original distribution, the entire workflow needs to have been recorded


The goal of AI companies is to replace all intellectual labor. You can argue that they're going to fail, but it's very clear what the actual goal is.

One of my clients is an AI startup in the security industry. Their business model is to use AI agents to perform the initial assessment and then cut the security contractors hours by 50% to complete the job.

I don't think AI will completely replace these jobs, but it could reduce job numbers by a very large amount.


The problem: you just listed all of the things under attack by the current administration.

OpenBSD has removed the format specifier that makes this possible, for hopefully obvious reasons.

Was the thought process: "Anything involving C string handling is fundamentally security hostile, lets fix it by breaking %n!"

It is the only one that actually writes to memory. It's occasionally convenient, but it's also largely unnecessary: the caller can typically make multiple calls to printf, for example, noting the return value for each one. Or use strlen and fputs. And so on.

The C11 printf_s functions don't support it at all, so it's clearly already on the naughty list even from the standard's perspective.


Can you elaborate on the statement "Anything involving C string handling is fundamentally security hostile"?

As soon as you forget (or your adversary manages to delete) an \0 at the end of any string, you may induce buffer overflows, get the application to leak secrets, and so on. Several standard library functions related to strings are prone to timing attacks, or have weird semantics that may expose you to attack. If you roll your own security-related functions (typical example: a scrubber for strings that hold secrets), you need to make sure these do not get optimised away by the compiler.

There's an awful lot of pitfalls and footguns in there.


I thought you meant a hello world or similar program only handling strings would be fundamentally insecure but rather you mean that it is hard to write secure code with C strings.

There are indeed a lot of pitfalls and footguns in C in general but I would argue that has more to do with c's memory focused design. I always feel like C strings are a bit of an afterthought but it does confirm well with the C design. Perhaps it is more so a syntax issue where the memory handling of strings is quite abstracted and not very clear to the programmer.


> I thought you meant a hello world or similar program only handling strings would be fundamentally insecure but rather you mean that it is hard to write secure code with C strings.

Disclaimer: I am not the author of the comment, and honestly I am more than happy if OpenBSD broke %n in printf because it looks awful from a security standpoint.

> you mean that it is hard to write secure code with C strings.

Indeed I do :) It is possible to write a "secure" hello world program in C; the point is that both the language and the standard library make it exceedingly easy to slip in attack vectors when you deal with strings in any serious capacity.


Maybe a second lag

Even a second lag is insane. I don't understand how people tolerate that.


They do not know any better, I suppose. Reading these threads just makes me wonder: if you guys have so many problems, why do you not torrent?

Torrenting is easy, but what are you goung to do with the torrented files then? Without additional external hardware you probably won't be able to play your downloaded files on your large TV, and most people prefer a laggy simple route over having to do more work. I do torrent from time to time, but the hassle associated with the whole process really highlights why streaming apps took over.

What additional hardware? If you're torrenting you have a PC or laptop, plug said device into your TV and you're good to go

Are you finding and setting up a remote that works on your PC/Laptop, or are you getting up every time you want to change shows or play/pause?

Wireless keyboard with a trackpad.

I do not understand what hassle. There has never been a hassle associated with it, not even back when I had to burn DVDs... Oh well.

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

Search: