#asahi-dev · 2022-02-03 08:15
marcanChaosPrincess: we're definitely using the binary for chainloads, no parsing necessary#asahi-dev · 2022-02-02 14:04
marcanbut yes schedutil should be the default, probably#asahi-dev · 2022-02-02 14:04
marcanthat's purely a config thing, the driver doesn't care#asahi-dev · 2022-02-02 13:58
marcanI have joins/parts disabled but I always get confused when tabcomplete doesn't work, heh#asahi-dev · 2022-02-02 13:58
marcan... merged but I guess they left?#asahi-dev · 2022-02-02 10:02
marcankettenis: cleaning up the commits now (modulo stupid IRQ... see twitter... *sigh*)#asahi-dev · 2022-02-02 09:08
marcan*wanted it#asahi-dev · 2022-02-02 09:08
marcanI said I wanted to look into rust for that future feature, not that I wanted implemented now :p#asahi-dev · 2022-02-02 09:08
marcanwe are running way ahead of ourselves here#asahi-dev · 2022-02-02 09:08
marcanre signatures, let me take care of that please#asahi-dev · 2022-02-01 14:11
marcankloenk: I don't particularly care about it being eol if it works#asahi-dev · 2022-02-01 08:48
marcanGPT is trivial anyway, shouldn't be a problem to implement in Rust#asahi-dev · 2022-02-01 05:08
marcanI'm wondering if our tipd curse extends to i2c in general or what#asahi-dev · 2022-01-31 10:35
marcanah, yeah#asahi-dev · 2022-01-31 10:23
marcanthere's no way the language itself is helping you with the buffer munging happening there#asahi-dev · 2022-01-31 10:23
marcanbut I mean, how do you do memory safety against DARTs and the RTkit interface?#asahi-dev · 2022-01-31 10:22
marcanthere was something, yeah#asahi-dev · 2022-01-31 10:21
marcanbut I somehow doubt iBoot itself is fully hardened against this, being written in C itself...#asahi-dev · 2022-01-31 10:21
marcanin principle you could exploit the ANS codebase via the PCIe links to the NAND somehow, and then try to escalate from there#asahi-dev · 2022-01-31 10:21
marcanyeah, even though I do want to audit the rtkit code a bit to plug any obvious vulns, this is a fairly far fetched threat model#asahi-dev · 2022-01-31 10:20
marcandoesn't really matter how it does that; either it passes verification after that or it doesn't#asahi-dev · 2022-01-31 10:20
marcanall the fatfs side has to do is pull a blob of bits from disk, once#asahi-dev · 2022-01-31 10:20
marcantoctou doesn't matter either because we're loading a file once and then verifying it#asahi-dev · 2022-01-31 10:19
marcanand we will pin the version of everything; as I said I have no intention of letting cargo go out to the internet during the build process#asahi-dev · 2022-01-31 10:18
marcanof course that's predicated in no unsafe blocks in fatfs, but that's easy to check for#asahi-dev · 2022-01-31 10:18
marcan*Rust itself ensures#asahi-dev · 2022-01-31 10:17
marcanmain thing I can think of is I should make sure stack overflows aren't exploitable; I think I got rid of guard pages during a refactor recently, I should reintroduce those#asahi-dev · 2022-01-31 10:17
marcanit's kind of rare to be in this position; we can say this because of how simple the problem we're trying to solve is#asahi-dev · 2022-01-31 10:16
marcanthat's the point of using rust for this#asahi-dev · 2022-01-31 10:16
marcanChaosPrincess: if the interface to C is guarded to ensure no invariant violations, and Rust itself memory safety, then modulo DoS bugs (which aren't really relevant), there is no real need to audit the fatfs code since its job is just to pull bits from disk that will then be signature-verified#asahi-dev · 2022-01-31 09:09
marcanit will of course also have a mode to load a 2nd stage without any verification, for those who don't care#asahi-dev · 2022-01-31 09:08
marcanthen the installer just needs to let you pick what distro you want to install to select a known pubkey (or pick for you if you choose an embedded install)#asahi-dev · 2022-01-31 09:08
marcanand in the installer I can provide a 1st stage with the verification, which will be triggered by a payload command/var thing inclunding the distro public key#asahi-dev · 2022-01-31 09:08
marcansince the 2nd m1n1 stage doesn't need it#asahi-dev · 2022-01-31 09:08
marcanonly I will#asahi-dev · 2022-01-31 09:08
marcanin fact even distros won't have to build any of this, unless they want to ship their own installer#asahi-dev · 2022-01-31 09:07
marcanas I said, my intention at this point is to make this entire thing both self-contained without a build system going off to the internet, and optional (and in fact disabled by default)#asahi-dev · 2022-01-31 09:07
marcankettenis: don't worry, you don't need to tell me about left-pad :p#asahi-dev · 2022-01-31 09:07
marcaner, yeah, just read block#asahi-dev · 2022-01-31 09:06
marcanrust should be "read block, write block" on one end and "give me a verified m1n1 blob" on the other, no more#asahi-dev · 2022-01-31 09:06
marcanthe dumber the C<->rust interface the better#asahi-dev · 2022-01-31 09:06
marcanif rust guarantees malloc/free correctness at the interface that *could* be done, but since it looks like we can get away without it, that's better#asahi-dev · 2022-01-31 09:04
marcanthe main point of this exercise is to just use Rust to get memory correctness guarantees which basically makes the whole thing close to provably secure (if not formally, then very easy to informally convince yourself it's secure)#asahi-dev · 2022-01-31 09:03
marcanit wouldn't be that bad to reinvent FAT, but yeah in this case I think reasonable implementations exist so there isn't much point#asahi-dev · 2022-01-31 08:53
marcanif we can get away without alloc I'd rather do it that way#asahi-dev · 2022-01-31 08:53
marcankloenk: alloc has interactions with C malloc; either we build it on top of that (expands the attack surface to some extent) or we have them fight for heapblock (which is doable but not optimal)#asahi-dev · 2022-01-31 08:52
marcanI'll use it for dogfood purposes on my production machines with Arch once it's done#asahi-dev · 2022-01-31 08:51
marcan(if you don't mind the round trip)#asahi-dev · 2022-01-31 08:51
marcanif you're rolling your own kernels you don't care#asahi-dev · 2022-01-31 08:51
marcanit's mostly for distros that want to ship m1n1 and do end to end upgrades, which will need that for DT updates