2022-02-01
01:16yrlf has quit [Quit: Ping timeout (120 seconds)]
01:17yrlf has joined #asahi-dev
01:17nsklaus has quit [Read error: Connection reset by peer]
01:18nsklaus has joined #asahi-dev
01:18gabuscus has quit [Remote host closed the connection]
01:20gabuscus has joined #asahi-dev
01:20suricato_ has quit [Remote host closed the connection]
01:20suricato has joined #asahi-dev
02:12V_ has quit [Remote host closed the connection]
02:32yuyichao has joined #asahi-dev
03:00V has joined #asahi-dev
03:06PhilippvK has joined #asahi-dev
03:09phiologe has quit [Ping timeout: 480 seconds]
04:03phiologe has joined #asahi-dev
04:04kov has quit [Quit: Coyote finally caught me]
04:06PhilippvK has quit [Ping timeout: 480 seconds]
04:10kov has joined #asahi-dev
05:20chadmed has quit [Read error: Connection reset by peer]
05:34chadmed has joined #asahi-dev
06:10jeffmiw has joined #asahi-dev
06:17jeffmiwwhat are the "/bits/" branches on github/asahi/linux used for ? shall I create one to share my spmi/pmu/rtc drivers ? or shall just create my branch of asahi one ?
06:33the_lanetly_052___ has joined #asahi-dev
07:23jeffmiw has quit [Ping timeout: 480 seconds]
07:25MajorBiscuit has joined #asahi-dev
07:43kloenkI think I'm still not sure how to do fat. Where to read files from? direct nvme? Where should the file be stored/which name? What should I do with the file after verifying it?
07:56kloenkmarcan: here is how vendor of fat32 looks like: https://github.com/Kloenk/m1n1/commit/8b45c4ccd97e1d115af7087ac5c3f15cb1f0a06a
08:00_jannau_kloenk: you're too fast so the infrastructure is not there. I suppose the installer will embed a config payload which will specify a GPT partition UUID of the matched EFI system partition
08:03_jannau_the second stage m1n1 should be read from that partition. After verification it will be loaded by the active m1n1 in a similar fashion as the proxy chainlaod
08:04_jannau_I suppose you could start testing by creating a ESP partition and hardcode it's start and end sector
08:07Major_Biscuit has joined #asahi-dev
08:08kloenkSadly I only have my main mac, on which I'm very very dependend, so can only write theoreical code :)
08:14MajorBiscuit has quit [Ping timeout: 480 seconds]
08:25the_lanetly_052__ has joined #asahi-dev
08:31the_lanetly_052___ has quit [Ping timeout: 480 seconds]
08:40_jannau_not sure if there strong security advantage of doing the limited gpt parsing we need in rust. one argument for rust would be that all nvme data proecessing code is in rust
08:42kloenkYes, parsing the table in C, and just giving rust the starting address should also work. Will have to think about it
08:47_jannau_I guess you could just reuse the read part of one of the existing crates and read replace the io with what you're doing in the fat code
08:58j`eykloenk: another option for vendoring is a git dependency, to avoid the full `cargo vendor` route
09:07kettenismarcan: I have seen some issues with reading back registers from the tas5770 codec immediately after writing to them (in OpenBSD)
09:10kloenk[j"ey](https://matrix.to/#/@irc_oftc_j=60ey:petabyte.dev): yeah, but I favour the "cargo vender` route, as vendor cleans the crates, we don't need the CI configurations and stuff like that from the dependencies
09:25Major_Biscuit has quit []
09:27MajorBiscuit has joined #asahi-dev
10:02kloenkThe thing that is blocking my mind right now is how to get the size of the drive. Is this reported by nvme?
10:03j`eykloenk: I kinda don't like the vendor route, for just having a whole bunch of 'copy / pasted' code, but it doesnt reallly matter
10:07ChaosPrincesskloenk: i also started writing a gpt parser
10:07ChaosPrincessprogress rn
10:08kloenkChaosPrincess: mind showing it to me? I think I want to write a crate, which has std support, but as default does not use std
10:08ChaosPrincesson irc
10:09ChaosPrincessmoved to pms
10:10kloenkI don't know how to, but if someone can create it, i think it's a good idea. I want to name the crate "nogpt" (as it has no_std support)
10:13the_lanetly_052__ has quit [Ping timeout: 480 seconds]
10:18ChaosPrincesscan we just assume that the block size is 4k?
10:38skrzyp has quit [Remote host closed the connection]
11:21skrzyp has joined #asahi-dev
12:02kaprests has joined #asahi-dev
13:43off^ has joined #asahi-dev
13:46the_lanetly_052__ has joined #asahi-dev
14:05the_lanetly_052___ has joined #asahi-dev
14:11the_lanetly_052__ has quit [Ping timeout: 480 seconds]
14:13DmitrySboychakov[m]nothing is bug-free, since it is eol - nothing will be fixed
14:15alyssaDmitrySboychakov[m]: it's FOSS -- if you use it and fix it yourself, congrats it's not eol anymore
14:18DmitrySboychakov[m]alyssa: that's also true :)
14:27the_lanetly_052___ has quit [Read error: Connection reset by peer]
14:39yuyichao has quit [Ping timeout: 480 seconds]
15:01yuyichao has joined #asahi-dev
15:21kloenkyeah, I think using fat32, and fixing it ourself if needed is best. but I think then it's better to at least vendor that properly as an active project, and not as a dependency
15:22ChaosPrincesskloenk: you vendored rust deps incorrectly, the version now in repo has LF line endings, while cargo expects CRLF and complains about checksums not matching
15:24jbowen has quit [Ping timeout: 480 seconds]
15:33jbowen has joined #asahi-dev
15:44bisko has joined #asahi-dev
16:27poviki tried stress-testing and doing random things with the linux pasemi i2c driver (copied out of linux, running from m1n1), but didn't see anything funny
16:27povikit was all against the cs42l part, with reads on empty addresses interspersed (because linux does that too)
16:51ChaosPrincesskloenk: fat32 is terrible and does not expose file lenghts, im forking it
16:52kloenkCan you give me some time. I would suggest giving you access to my m1n1 fork. And then putting it there as a workspace member
16:53ChaosPrincessi will fork your repo and send a pull request when im done breaking stuff :P
17:04poviksven: i think it may be a good idea to take on that change for i2c-pasemi-platform even if it doesn't fix anything. as the driver is only used on devicetree platforms where the i2c slave devices will be explicitly instantiated
17:06svensure, just make sure it only changes the platform driver and not the pci one and send a patch to the mailing list :)
17:44ChaosPrincessfor chainloads, what signature/hash algorithm are we gonna use?
17:49kettenissignify uses its own implementation that is derived from djb's public domain implementation
17:51ChaosPrincessso, lets say /m1n1.bin containing the code to chainload, and /m1n1.sig containing the result of Signature::to_bytes from that library?
17:54ChaosPrincessyea, the library does the hashing itself
17:54kettenisto verify you verify that /m1n1.sig was signed with the appropriate key and then you check that the hash for the loaded /m1n1.bin matches the signed hash
17:58svenfor a proof of concept m1n1.sig plus whatever that library uses by default sounds reasonable to me
18:03MajorBiscuit has quit [Ping timeout: 480 seconds]
18:08MajorBiscuit has joined #asahi-dev
18:25MajorBiscuit has quit [Ping timeout: 480 seconds]
18:37ChaosPrincesskloenk: mind reviewing https://github.com/WhatAmISupposedToPutHere/m1n1 and telling if it looks okay?
18:51kloenkDoes m1n1 have gui? (Asking because what should happen if one of the two gpt headers are broken)
18:51ChaosPrincessoutput only
18:51ChaosPrincessyou can write to a screen console, but no kb/mouse/usb support
18:52kloenkThe spec only says it has to print a warning, not that user entry is required to fix a gpt header
18:52ChaosPrincesswe arent fixing gpt from m1n1, thats the os job
18:52kloenk> Software should ask a user for confirmation before restoring the primary GPT and must report whenever it does modify the media to restore a GPT.
18:55sventhis should all be as simple and as dumb as possible. If something doesn’t work out just bail and don’t chainload anything and continue as if there was no m1n1.bin on the disk
18:56kloenkChaosPrincess: Maybe then you should BlockDevice's write with a direct error, so it's completely forbidden
18:57ChaosPrincessj`ey: arguably, that's programmer error and i think rust stdlib panics in those cases
18:57kloenkyes, plan to implement it. The current commit is more or less WIP, I'm building a dedicated GPT library, that also verifies the second header
19:40m6wiq has joined #asahi-dev
19:42___nick___ has joined #asahi-dev
19:43m6wiq1 has joined #asahi-dev
19:43m6wiq1 has quit [Remote host closed the connection]
19:43___nick___ has quit []
19:43m6wiq1 has joined #asahi-dev
19:43m6wiq1 has quit []
19:44___nick___ has joined #asahi-dev
19:49m6wiq has quit [Ping timeout: 480 seconds]
20:04m6wiq has joined #asahi-dev
20:32m6wiq has quit []
20:51jeffmiw has joined #asahi-dev
21:07___nick___ has quit [Ping timeout: 480 seconds]
21:09m6wiq has joined #asahi-dev
21:37m6wiq has quit []
21:42jbowen_ has joined #asahi-dev
21:48jbowen has quit [Ping timeout: 480 seconds]
21:50jbowen_ has quit [Ping timeout: 480 seconds]
22:21MajorBiscuit has joined #asahi-dev
22:32MajorBiscuit has quit [Ping timeout: 480 seconds]
22:41MajorBiscuit has joined #asahi-dev
23:15MajorBiscuit has quit [Ping timeout: 480 seconds]
23:57yuyichao has quit [Ping timeout: 480 seconds]