#asahi-dev · 2022-08-22 10:01
marcanwe'll see once SEP support starts taking shape#asahi-dev · 2022-08-22 10:01
marcaneither way, this is relatively far in the future :)#asahi-dev · 2022-08-22 10:00
marcanit just means we need to support APFS and SEP enough to mount FV-enabled volumes#asahi-dev · 2022-08-22 10:00
marcanthat should definitely work, doesn't require any funny primitives from macOS, etc#asahi-dev · 2022-08-22 10:00
marcanit's possible that the ticket ends up being creating a tiny FileVault-enabled volume in the stub partition, sticking the key material in there, and then reading it from linux#asahi-dev · 2022-08-22 09:59
marcanand it doesn't help that we can't hit raw SEP APIs from macOS as far as I know, only the public ones#asahi-dev · 2022-08-22 09:58
marcanthis needs more research#asahi-dev · 2022-08-22 09:58
marcanideally we figure out some SEP voodoo to allow wrapping the key file with that in macOS in a way that is then accessible again from Linux, but I'm not entirely sure that's possible, though it ought to be, since FileVault works like that?#asahi-dev · 2022-08-22 09:57
marcanbut if we can do SEP-backed FDE that's much better and solves this problem#asahi-dev · 2022-08-22 09:57
marcanLUKS at least *tries* to be a bit better than doing it the naive way by hashing a bunch of random data IIRC#asahi-dev · 2022-08-22 09:57
marcanit's not possible to guarantee secure erasure of such a key file (this is why apple have effaceable storage), and therefore you potentially forever tie the security of secureboot to the user password, even if they change it#asahi-dev · 2022-08-22 09:56
marcanthat's a bad idea, it lowers the security guarantees of the platform#asahi-dev · 2022-08-22 09:51
marcan(like apple does)#asahi-dev · 2022-08-22 09:51
marcanif using distro-managed public keys it'd be done by the distro#asahi-dev · 2022-08-22 09:51
marcansomething like that, yes, for a user-managed version#asahi-dev · 2022-08-22 09:51
marcan(unless SEP is involved, but I don't see pulling that off from macOS being easy...)#asahi-dev · 2022-08-22 09:50
marcanfor a "user-managed" mode they'd keep their own private key, but then we need some way for the installer to securely pass that into the installed OS, which is at least a little bit tricky#asahi-dev · 2022-08-22 09:50
marcanyeah, though for a "distro-managed" secureboot distro, the distro would do that in a single package anyway, and ship it pre-signed#asahi-dev · 2022-08-22 09:49
marcanyes#asahi-dev · 2022-08-22 09:48
marcanits entire purpose is to deal with all the Apple-isms#asahi-dev · 2022-08-22 09:48
marcanit isn't, because m1n1 relies heavily on Apple-specific features#asahi-dev · 2022-08-22 09:47
marcanadding a little menu that just looks for files in /m1n1/ would be pretty trivial, and can be done securely in the Rust code#asahi-dev · 2022-08-22 09:47
marcanthat's a fair point, but a bit tricky... and at that point, it might actually make sense to make m1n1-stage1 able to boot multiple stage2s. That also, conveniently, solves the device tree incompatibility problem, by allowing separate DTs for each kernel.#asahi-dev · 2022-08-22 09:46
marcanthen the only secureboot-relevant component before the kernel is m1n1, and that's why that part of the code is written in Rust#asahi-dev · 2022-08-22 09:45
marcanno USB or NVMe drivers#asahi-dev · 2022-08-22 09:45
marcanyou'd want a locked down u-boot that just boots an embedded kernel and that's it#asahi-dev · 2022-08-22 09:45
marcanUEFI secure boot is a shitshow, and the nice thing about this platform is we can bypass that#asahi-dev · 2022-08-22 09:45
marcanyup#asahi-dev · 2022-08-22 09:44
marcanit is not really involved in secure boot beyond the bootpolicy stuff#asahi-dev · 2022-08-22 09:44
marcanSEP is primarily useful for protecting mutable user data#asahi-dev · 2022-08-22 09:44
marcanchadmed: not really, it requires the xARTS stuff for storage and I don't see us putting an APFS driver in u-boot#asahi-dev · 2022-08-22 09:43
marcanI'm not sure UEFI-standard secure boot is necessarily the best idea here... at the point where you have a fully integrated secureboot distro, it might make sense to just start bundling up m1n1-stage2+u-boot+kernel+initramfs into one image, signing that to be loaded by stage1, and calling it a day#asahi-dev · 2022-08-22 09:42
marcanthe SEP is involved in FDE but not really secureboot#asahi-dev · 2022-08-22 09:41
marcanthe secureboot chain hands off to m1n1 and after that we can do/trust whatever we want#asahi-dev · 2022-08-22 09:40
marcaneither way, my intent was always to have several official supported distros, and regardless of whether #1 on the list is ALARM or not, I am interested in seeing Fedora get more official support#asahi-dev · 2022-08-22 09:40
marcanlet's see what his reply is#asahi-dev · 2022-08-22 09:38
marcanyup#asahi-dev · 2022-08-22 09:37
marcanGentoo depends on who the package maintainer is, but they will usually take PRs pretty quickly#asahi-dev · 2022-08-22 09:36
marcanso far I've only had problems getting things upstreamed with ALARM, and funny enough, Arch itself, though my sample size there is 1#asahi-dev · 2022-08-22 09:35
marcan(obviously we will support more traditional secureboot setups for everything, relying on FDE for security)#asahi-dev · 2022-08-22 09:35
marcan(macOS-like as in immutable system volume)#asahi-dev · 2022-08-22 09:35
marcanbeing able to just drop that in and build a neat little secureboot setup when we get there would be *really* cool, even if not that many people actually use it#asahi-dev · 2022-08-22 09:35
marcansilverblue is also a point for fedora, since several people have asked about a macOS-like secureboot setup for Linux, and that's never going to happen with ALARM#asahi-dev · 2022-08-22 09:32
marcane.g. you can't use unaligned loads/stores on VRAM, no cache, etc.#asahi-dev · 2022-08-22 09:31
marcanwhich is going to affect compute workloads even worse most likely#asahi-dev · 2022-08-22 09:31
marcanthe issue is there is no mapping GPU memory as normal memory#asahi-dev · 2022-08-22 09:28
marcanso yes#asahi-dev · 2022-08-22 09:28
marcanthere's no such thing as GPU memory, it's unified#asahi-dev · 2022-08-22 09:27
marcanhence dma-buf over thunderbolt#asahi-dev · 2022-08-22 09:27
marcanyes, I'm aware