2021-01-10
00:20ransom has joined #asahi
00:21shuffle2 has joined #asahi
00:24shuffle2also curious how much of the hardware security features (like AMCC lockdown/SEP/etc) can be used in linux
00:24ransom_ has joined #asahi
00:27ransom has quit [Ping timeout: 240 seconds]
00:44stemnic has joined #asahi
00:51Shizshuffle2: so right now it seems that any non-iBoot loader you have it run must be registered in the manifest with hash
00:52Shizdepending on the circumstances where it allows that to happen (my guess is 1TR, but not sure yet), further security is up to whatever second-stage loader runs after :)
00:58stormclad has joined #asahi
01:06artemistThe easiest way would probably be for mini or whatever to load u-boot and have u-boot do UEFI secure boot
01:11ransom_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
01:20shuffle2is there then a way to query/attest what the bootloader executed? (does whatever parses the manifest measure the hash into a PCR or something) or can that be used to unwrap keys to decrypt disk partitions, etc
01:23artemistI wouldn't be surprised if the SEP supported that but I also have no evidence that it does
01:23gua has joined #asahi
01:24guaapologies if this was mentioned before, i'm just now watching the community chat on youtube, and about the USB C PD serial connection, the T2 / T2 on linux guys have a writeup: https://blog.t8012.dev/ace-part-1/
01:25guaposted on Dec 30. "Exposing Apple's Vendor Defined Messaging protocol, AppleVDM, built on USB-PD."
01:26guaone quick question shiz, do you think there's a chance that any of the asahi work will be relevant to say better audio support or SPI support in existing macs with T2 chips?
01:26Shizaudio or power management have very little to nothing to do with the T2 chip in those macs, afaik
01:28guaseems like the T2 macs might get slightly more attention for a year or two if the T2 on linux folks get enough upstreamed but seems like with the M1 macs displacing the T2 as the latest exotic platform, and more useful, the T2 might not get that much attention soon ;/
01:32gua has quit [Remote host closed the connection]
01:34gua has joined #asahi
01:44ransom has joined #asahi
01:45rwhitbyso it looks like two breakthroughs occurred overnight - 1) building on the testing of partition adding yesterday, a set of additonal partitions was identified which is recognised as an alternate boot target in 1TR, and 2) a means of running sshd in 1TR was identified. it would be good have these documented so others can reproduce and verify ...
01:49choozy has quit [Remote host closed the connection]
01:54rwhitbythe overnight log for 1) refers to needing at least an APFS volume group, Preboot volume, /Library/CoreServices/, /usr/standalone/, bless, apfs preboot update, Recovery volume, but not sure if all this was sufficient or if more was required.
01:57jn__i suppose a SW:Recovery or SW:1TR page in the wiki might be a good place for things like how to configure SSH
01:57rwhitbytoday I'm going to run DFU through an Ellisys C-Tracker USB-PD/USB analyser, capture the traffic, and report on whether there is any USB-PD traffic involved or whether it is all plain USB data.
01:57Shiz`sed -n 's/^_sshd/sshd/p' /etc/master.passwd >> /etc/master.passwd` should be a functional oneliner for adding back the sshd user btw
01:58davidrysk[m]the problem isn't that the sshd user is missing, btw — the problem is that whatever directory service feature that allows _sshd and sshd to map to the same user is nonfunctional in recovery
01:58stormclad has quit [Ping timeout: 272 seconds]
01:58davidrysk[m]I started digging through that scaffolding but it's quite a lot of layers
01:59davidrysk[m]I guess what I'm saying is that Apple didn't do it to make it harder for us but to slim down recovery
02:00amw1 has joined #asahi
02:01ShizI wonder if when you `dscl -read /Local/Default/Users/_sshd` it still has `RecordName: _sshd sshd`
02:03brentr123[m]I would love to be a tester for you guys, as long as my Mac doesn’t Brick ;)
02:03rwhitbySo my understanding of DFU restore for M1 is that I can completely wipe the internal disk, and run DFU restore from Apple Configurator 2 from another Mac (running the same OS version I believe), and get back to a clean install state. Has anyone here personally verified that before I try it here?
02:07ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:09ransom has joined #asahi
02:11os[m]rwhitby: not tried it with M1 but the process seems identical to the restore process on Intel T2 macs and that is able to restore the Mac from any wipe or software fault I have experienced. So by following the instructions with Apple configuratior I'm fairly certain you can revive a m1 after a complete disk wipe without problems
02:12rwhitbyos[m]: thx, I'm going to try it without wiping first, and then try it after deleting various volumes later
02:13rwhitbyI want to get to a point where I'm 100% comfortable in having the internal disk wiped at any time for any reason and knowing that I can recover to a initial install state at any time.
02:13ransom_ has joined #asahi
02:15Shizthat's good, I wonder if it still has the same mappings in /etc/openldap/AppleOpenLDAP.plist then
02:15ransom has quit [Ping timeout: 264 seconds]
02:18os[m]rwhitby: for reference if you do not already have it https://support.apple.com/no-no/guide/apple-configurator-2/apdd5f3c75ad/mac
02:18os[m]Since it mentioned specifically restoring recovery os i think you have nothing to worry about if you mess up the disk volume. The low level dfu afaik cannot be bricked since it's loading from an rom internally ( assmunimg M1 is like any other ios chip which I think is a fair assumption)
02:19rwhitbyos[m]: yes, I 100% believe it will work, but need to verify it myself before I rely on it :-)
02:20Shizgoing back to my assumption that RestoreOS is loaded onto the device in DFU mode then to... restore stuff :p
02:22rwhitbyI like that for the m1ni you don't need to hold down 4 keys at once, but just hold the power button while applying power and see the orange light for DFU entry.
02:23rwhitbyNow, lets's see what the USBC cable requirements are. It should just be D+/D- connected through, so all passive cables should be fine, but going to see what happens with active TBT3 cables (not expected to work) and active USB4 cables (expected to work).
02:25rwhitbyI take that back, active TBT3 cables will likely work too, unless they are active optically isolated cables.
02:26ransom_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
02:26os[m]Fun fact apple configurator and the process it mentioned is just a more limited version of the tool repair centers use where they are able to serialize new boards and calibrate replaced components
02:28pg12_ has joined #asahi
02:29pg12 has quit [Ping timeout: 260 seconds]
02:30raster has quit [Quit: Gettin' stinky!]
02:31amw1 has quit [Ping timeout: 256 seconds]
02:32rwhitbySerial Number: SDOM:01 CPID:8103 CPRV:11 CPFM:03 SCEP:01 BDID:22 ECID:000139663662001E IBFL:3C SRTG:[iBoot-5540.0.0.400.2]
02:32os[m]Have not looked into it that deeply but I would assume so. I know the internal tools have some frameworks which apple configurator does not come with
02:38Tokamak has joined #asahi
02:41rwhitbyeven easier for m1 mini - just remove AC power for 10 seconds then hold power button while applying AC power
02:41ransom has joined #asahi
02:44rwhitbyok, https://www.theiphonewiki.com/wiki/ECID - so everyone knows my M1 silicon SoC unique chip id now :-)
02:46nyuhu has quit [Quit: WeeChat 1.9.1]
02:51nyuhu has joined #asahi
02:52rwhitbyinteresting - in DFU mode, there is still a TBT3 connection made between the apple configurator 2 host and DFU M1 device. not sure yet whether it is used for anything though. only way to tell will be to do two DFU restores, one with a simple USB2 cable and one with a TBT3 cable and see if the restore time differs.
02:54bear24rw has joined #asahi
02:56bear24rw has quit [Client Quit]
02:58bublik__ has joined #asahi
02:59rwhitbyok, it's just the PD messaging, there's no LSTX/RX traffic, so the TBT data path is not active
03:00bublik_ has quit [Ping timeout: 264 seconds]
03:06bublik__ has quit [Ping timeout: 256 seconds]
03:08Bublik has joined #asahi
03:12rwhitbybut what that does probably mean is that the USB-PD side of things can operate all the way to making a power contract (obviously needed for dead battery operation) and a TBT3 control connection without any interaction with macOS.
03:12Bublik has quit [Ping timeout: 240 seconds]
03:19rwhitbyok, I confirmed that you can't DFU restore an 11.1 M1 device from a 10.15.7 host - it requires a system OS update to proceed. Moving to a different MBP host running 11.1 ...
03:32FFY00 has quit [Remote host closed the connection]
03:32FFY00 has joined #asahi
03:33ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
03:35gua has quit [Remote host closed the connection]
03:46davidrysk[m]rwhitby: very interesting, I wonder why.
03:47davidrysk[m]the documentation at https://support.apple.com/guide/apple-configurator-2/revive-or-restore-a-mac-with-apple-silicon-apdd5f3c75ad/mac does not indicate that this is necessary...
04:03diz3y has quit [Ping timeout: 256 seconds]
04:08rwhitbydavidrysk[m]: yeah, I read it at https://mrmacintosh.com/restore-macos-firmware-on-an-apple-silicon-mac-boot-to-dfu-mode/ and wanted to confirm it
04:10Tokamak has quit [Ping timeout: 256 seconds]
04:10Tokamak_ has joined #asahi
04:15Tokamak has joined #asahi
04:18Tokamak_ has quit [Ping timeout: 260 seconds]
04:18davidrysk[m]yeah, but DFU should be independent on what OS you're running on the host computer
04:19davidrysk[m](as long as the host OS supports the latest Configurator)
04:22Bublik has joined #asahi
04:24rwhitbyConfigurator connects and sees DFU, but says you need to update the host before you can start a revive.
04:25rwhitbyso the "Revive" step is pretty painless. It just asks you for the password for an admin user and then reuses the macOS install that's ostensibly untouched.
04:27davidrysk[m]marcan: that was covered in the WWDC talk :)
04:27marcanso this is different from Android, where once you unlock the bootloader and flash an unsigned OS google wants to stop you from running certain apps
04:28davidrysk[m]it's short
04:29davidrysk[m]there's a transcript too
04:30Bublik has quit [Ping timeout: 246 seconds]
04:31davidrysk[m]one of the benefits of the non-in-person WWDC is that talks aren't forced into 30 or 60 minute slots
04:31davidrysk[m]which means that most of them are only as long as they need to be
04:35aratuk has joined #asahi
04:38addcninblue has joined #asahi
04:39stormclad has joined #asahi
04:40aratuk has quit [Ping timeout: 265 seconds]
04:43stormclad has quit [Ping timeout: 246 seconds]
04:44amw1 has joined #asahi
04:48Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
05:00rwhitbyDFU restore worked fine before deleting anything, and can restore from external bootable disk as part of the process
05:04rwhitbyit also blew away the Linux volume and FAT32 partition that I created yesterday (as expected)
05:05davidrysk[m]DFU recovery should blow away everything and return the device to a near-factory (but on latest OS) state
05:11davidrysk[m]no M1 support yet
05:13rootspring[m]Wen eta I device restore apple M1
05:21amw1 has quit [Ping timeout: 272 seconds]
05:27amw1 has joined #asahi
05:31bitcoinr has joined #asahi
05:32bitcoinr has quit [Client Quit]
05:33bitcoinr has joined #asahi
06:02bitcoinr has quit [Quit: Exit game!]
06:04bitcoinr has joined #asahi
06:10amw1 has quit [Ping timeout: 260 seconds]
06:10bitcoinr has quit [Read error: Connection reset by peer]
06:11marcanI did confirm you definitely need the OS/data split, legacy single volume doesn't work with their process on apple silicon
06:12aratuk has joined #asahi
06:12amw1 has joined #asahi
06:13aratuk_ has joined #asahi
06:13aratuk_ has quit [Read error: Connection reset by peer]
06:14aratuk__ has joined #asahi
06:15aratuk__ has quit [Remote host closed the connection]
06:16aratuk_ has joined #asahi
06:17aratuk has quit [Ping timeout: 264 seconds]
06:19bitcoinr has joined #asahi
06:20amw1 has quit [Ping timeout: 246 seconds]
06:21aratuk_ has quit [Ping timeout: 264 seconds]
06:24bitcoinr has quit [Read error: Connection reset by peer]
06:25bitcoinr has joined #asahi
06:27jamadazi has joined #asahi
06:27Bublik has joined #asahi
06:33rwhitbymarcan: what's the smallest reversible deviation from fully secure that I can do to test that full security is restored by the DFU restore?
06:33bublik_ has joined #asahi
06:35marcanrwhitby: I think at the very least you have to go to reduced security (bputil -g from restore mode)
06:36rwhitbyand after the restore, does bputil tell me that it's back in full security or is there another utility to determine that?
06:36bitcoinr has quit [Read error: Connection reset by peer]
06:37Bublik has quit [Ping timeout: 246 seconds]
06:38bitcoinr has joined #asahi
06:39rwhitbyok, I see "Full Security enabled" before bputil -g and "Reduced Security enabled: 1" after
06:40Core8722 has joined #asahi
06:42bitcoinr has quit [Ping timeout: 264 seconds]
06:44bublik_ has quit [Ping timeout: 264 seconds]
06:47TheJollyRoger has quit [Remote host closed the connection]
06:49Core8722 has quit [Read error: Connection reset by peer]
06:53rwhitbyfun fact: you need to have gone through macOS setup before you can use bputil again to change (as opposed to just report), since you need to be able to type an admin user password.
06:57bitcoinr has joined #asahi
06:58maor26 has joined #asahi
07:01bitcoinr has quit [Read error: Connection reset by peer]
07:03bitcoinr has joined #asahi
07:03bitcoinr has quit [Client Quit]
07:11bublik__ has joined #asahi
07:20rwhitbymarcan: you can also see the security settings in the System Information in Hardware->Controller
07:21rwhitbyand the iBoot version in there is iBoot-6723.61.3 which as Shiz says is well ahead of the DFU iBoot verson
07:23bublik__ has quit [Ping timeout: 264 seconds]
07:35marcanbuy a Pixel device, go through device setup, go into dev settings, enable OEM unlocking, now you can flash whatever OS you want
07:36marcanmain difference is if you truly wipe an Android you brick it (unless you have secret vendor tools, possibly special cables, and this only works on some devices), while on Apple Silicon there is always DFU
07:48marcanif fuOS is going to be a thing at some point, it doesn't look like it's a thing right now
07:50marcanright *now* I'm going to work off of the assumption we need to go through the customkc hoops
08:08TheJollyRoger has joined #asahi
08:17aratuk has joined #asahi
08:18addcninblue has quit [Ping timeout: 264 seconds]
08:21aratuk has quit [Ping timeout: 246 seconds]
08:24* rwhitbyupdated https://github.com/AsahiLinux/docs/wiki/SW:Getting-started with commands to check the current status
08:28bkero has joined #asahi
08:31shawnj2[m] has joined #asahi
08:31jamadazi has quit [Read error: Connection reset by peer]
08:32jamadazi has joined #asahi
08:51aratuk has joined #asahi
08:55aratuk has quit [Ping timeout: 246 seconds]
09:07marcanunfortunately, the next problem is there is no admin user in that OS partition to authorize downgrading security
09:07marcanthere's something broken about the personalization process (picks the wrong preboot path), but I was able to fix it with a silly symlink
09:08Mary_- has joined #asahi
09:08bublik__ has joined #asahi
09:09Mary_ has quit [Ping timeout: 240 seconds]
09:10marcananyway, I guess for the time being I will resort to doing a proper macOS install, and punt reducing this process to later
09:10marcanthis is also the kind of thing where there is room for Apple to make life easier for us in the future (hint hint nudge nudge) so it's not terribly if it's clunky initially
09:15rwhitbyI can confirm that you can have a full security external boot disk and a reduced security internal boot disk. You can't change the security on an external boot disk from bputil on the command line, but you can modify it using the "Startup Security Utility"
09:16marcanalso, can you look at your internal volumes in recovery, after booting from the external disk?
09:16bublik__ has quit [Ping timeout: 246 seconds]
09:16marcanin principle all the preboot stuff should get copied over, because iBoot can't *actually* boot from an external disk
09:18marcanyes, but what I mean is that once you have booted the external OS at least once, there should be stuff from that external OS copied to the internal SSD *somewhere*
09:21rwhitbythe external disk also has Preboot, Recovery and VM partitions, just like the internal disk
09:22rwhitbyare you wondering what happens if I wipe parts of the internal disk, but still boot from the external disk?
09:24rwhitbymy next text is internal and external is reduced security, and then DFU restore internal, and see if external remains reduced security
09:27rwhitbyok, in a while I'll have a restored internal disk, and a previously booted external disk. I'll capture the internal layout, then immediately try booting the external before doing first setup on internal, then capture internal layout again.
09:27marcanin particular, just run `find /System/Volumes/iSCPreboot` and see if there is anything other than LocalPolicy (a couple img4 files per dir) and SFR/ related stuff
09:29amw1 has joined #asahi
09:30marcanbut I mean, it could be two things in the boot policy, vuid of the preboot volume and vgid to boot
09:34amw1 has quit [Ping timeout: 265 seconds]
09:39ky0ko has quit [Remote host closed the connection]
09:41vimal has quit [Quit: Leaving]
09:43bublik__ has joined #asahi
09:46bublik_ has joined #asahi
09:50bublik__ has quit [Ping timeout: 264 seconds]
09:52marcanShiz: bputil actually doesn't default to anything, if you have more than one volume it prompts :)
09:53ShizIf no option is specified, the default value will be set to the APFS Volume Group UUID of the running OS. The Volume
09:55bublik_ has quit [Ping timeout: 256 seconds]
10:04marcanif it works, I might be able to set up customkc before official support, and it'll be useful for future similar experiments
10:04Tokamak has joined #asahi
10:12marcanby the way, this is the current sshd problem: Jan 10 10:11:51 fuwa sshd[398]: fatal: chroot("/var/empty"): Operation not permitted [preauth]
10:12Tokamak has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
10:20marcan2021-01-10 10:20:24.026893+0000 0x1106 Default 0x0 0 0 kernel: (AppleMobileFileIntegrity) AMFI: hook..execve() hardened runtime not allowed in chroot
10:20marcan2021-01-10 10:20:24.026914+0000 0x1106 Default 0x0 0 0 kernel: (AppleMobileFileIntegrity) AMFI: hook..execve() killing pid 416: not allowed in chroot
10:26ky0ko has joined #asahi
10:34jamadazi has quit [Ping timeout: 272 seconds]
10:39marcanand also python wants a Python thing (which isn't in the cache thankfully) but DYLD_LIBRARY_PATH isn't helping
10:39marcandyld: Library not loaded: /System/Library/Frameworks/Python.framework/Versions/2.7/Python
10:49mrgs has quit [Remote host closed the connection]
10:51aratuk has joined #asahi
10:56aratuk has quit [Ping timeout: 260 seconds]
11:02brinly has joined #asahi
11:06TheJollyRoger has quit [Ping timeout: 240 seconds]
11:06DarthCloud has quit [Ping timeout: 240 seconds]
11:06frode_0xa has joined #asahi
11:07frode_0xa has quit [Client Quit]
11:08TheJollyRoger has joined #asahi
11:09DarthCloud has joined #asahi
11:11frode_0xa has joined #asahi
11:34frode_0xa has quit [Remote host closed the connection]
11:38frode_0xa has joined #asahi
11:46raster has joined #asahi
11:52bublik_ has joined #asahi
11:55bublik__ has joined #asahi
11:58bublik_ has quit [Ping timeout: 260 seconds]
12:04bublik__ has quit [Ping timeout: 260 seconds]
12:14aimileus has joined #asahi
12:14dpatterbee[m] has joined #asahi
12:41ephe_meral has joined #asahi
13:12amw1 has joined #asahi
13:21amw1 has quit [Ping timeout: 256 seconds]
13:44davidrysk[m]marcan: what exactly do you need in recovery?
13:47ephe_meral has quit [Ping timeout: 272 seconds]
13:53davidrysk[m]Btw I’m kinda frustrated that Apple still hasn’t updated their platform security documentation for M1
13:53davidrysk[m]But that’s probably one of the many things that’s dragging out
13:54svenwouldn't surprise me if that document is stuck somewhere in their marketing/pr department waiting for approval
13:56davidrysk[m]marcan: the login creds that bputil wants in Recovery are the login creds of an administrative macOS account
13:57davidrysk[m]The fact that with a Mac without macOS set up there is no such account is an oversight that I very much doubt will be fixed soon
14:00aratuk has joined #asahi
14:01bublik__ has joined #asahi
14:03bublik_ has joined #asahi
14:05aratuk has quit [Ping timeout: 246 seconds]
14:07bublik__ has quit [Ping timeout: 256 seconds]
14:09bublik_ has quit [Ping timeout: 256 seconds]
14:28ephe_meral has joined #asahi
14:28qyousef has quit [Quit: WeeChat 2.8]
14:30qyousef has joined #asahi
14:35marcandavidrysk[m]: but when you do a normal boot picker selection of an "alien" macos partition, or when you *install* macos, it asks you for an account on the *other* macOS partition before doing all the provisioning
14:36marcanso there is clearly some security model path that says "existing users on another OS are allowed to provision a new OS"
14:36marcanso the question is can we combine those two: can an existing user on another OS provision a new OS *with downgraded security from the get go*
14:36davidrysk[m]is it "as long as the OS has already been provisioned"?
14:36bublik_ has joined #asahi
14:36bublik_ has quit [Remote host closed the connection]
14:37bublik_ has joined #asahi
14:37marcanalso, alternatively, we could figure out if there is a way to convince everything that a user was set up in the new OS without actually booting it
14:37davidrysk[m]meaning, that macOS has to be provisioned to allow its users to provision a new OS
14:38marcanright now, it doesn't matter if you want to dualboot or not; either way you have to do a full-fat install of macos first (if you want to dual boot, you need to do that *in addition* to your normal macos partition), then replace it with linux, then maybe delete all the junk and files and shrink the partition if you want to reclaim the space, which is a PITA
14:38davidrysk[m]Yes, that's what I was going to say, I think the user creds go into the SEP
14:38marcanif you could use an existing user to provision a new OS in permissive mode, then for dual boot users, you could just provision linux without ever going through the full macos install
14:39davidrysk[m]the fact that bputil can't work on a Mac without an OS because of no credentials is a bug
14:39davidrysk[m]where do you get the existing user without installing macOS?
14:40marcanyes but when "installing" macOS or importing a foreign macOS (which is what I did when I copied chunks of it by hand) the boot policy gets created for you, without a user or with an existing user on the other macOS
14:40davidrysk[m](also the computers already have macOS on them, and doing DFU restore puts macOS back, though out-of-the-box setup of macOS does require agreeing to the EULA which some will find objectionable)
14:40marcanor, if we can figure out a way to run arbitrary code in 1TR, can we just build a different flow ourselves
14:41marcanso the tools apple gives us can either 1) provision a new or foreign, full-security OS, blank without creds, and 2) downgrade the security of an OS, with creds
14:41marcanand my question is, does the underlying SEP security model allow for 3) provision a new or foreign, reduced-security OS, blank without creds
14:55qyousef has quit [Quit: WeeChat 2.8]
14:58ephe_meral has quit [Ping timeout: 240 seconds]
15:02qyousef has joined #asahi
15:05davidrysk[m]Part of the model is that the boot policy is signed by the SEP
15:05davidrysk[m]which means a foreign boot policy that specifies reduced or permissive security would be rejected
15:06marcanit will sign a boot policy for a new OS, without existing credentials for it (obviously), with full security
15:07davidrysk[m]That would likely be a CVE
15:07qyousef has quit [Ping timeout: 240 seconds]
15:08davidrysk[m]because it circumvents anti-downgrade protection, which could lead to the ability to bypass Activation Lock and similar mechanisms
15:08konstater has quit [*.net *.split]
15:08marcanit could still require personalization before signing such a boot policy, even if it does not enforce it at runtime
15:09marcan(because that's what was failing for me due to some glitch in personalization putting the file in the wrong place)
15:32ponikrf[m] has joined #asahi
15:35frode_0xa has quit [Remote host closed the connection]
15:38bublik_ has quit [Ping timeout: 246 seconds]
15:39qyousef has joined #asahi
15:40Bublik has joined #asahi
15:58ephe_meral has joined #asahi
15:58thecake21[m]I may have missed something here. Why is it necessesary to create another macOS installiation and replace it with linux. Did the plan for how boot was going to work work change or is this just something temporary?
16:02Daniel has joined #asahi
16:02Daniel is now known as Guest12911
16:03Bublik has quit [Remote host closed the connection]
16:03Bublik has joined #asahi
16:04Guest12911 is now known as dpatterbee
16:10dpatterbee has quit [Quit: Leaving]
16:10marcanit's unclear if we have a way around this or if we depend on Apple to implement a better flow
16:11marcanthe plan for how boot works has not changed, more like we understand better what the requirements are now
16:14marcanthe tools that apple provides allow for *replacing* the kernel of an existing OS with a custom one, and crucially, that operation must be authenticated *by a user created on that existing OS*. that means that we cannot just "fake" an OS, because we have to actually boot it to create a user that can authenticate that operation
16:15thecake21[m]ah ok that makes sense now
16:19marcanI think there are enough nice people at Apple that, if nothing else, once this all gets off the ground and people are actually using it, there's a chance a better flow will be implemented :)
16:19marcanI mean they went through all the trouble to do this customkc thing, it's not like they don't *want* people running their own code
16:27marcanso yeah, if anyone wants a side challenge... see if you can run arbitrary code (i.e. call functions in frameworks) from 1TR somehow
16:28marcanthere's perl, not sure if that can call FFI; you can run signed binaries from macOS, but dyld complains about anything that needs a dylib/framework not inside 1TR itself, and I can't get it to use any macOS libs
16:28marcannot going to pursue that much myself for now, but if it can be done it might open up a lot of possibilities
16:30davidrysk[m]does DYLD_INSERT_LIBRARIES work in 1TRR?
16:30davidrysk[m](also is initial testing in x86_64 recovery useful?)
16:31davidrysk[m]right, the signatures aren't just embedded in the shared cache.
16:32davidrysk[m]there is a DYLD_SHARED_CACHE_DIR var
16:32davidrysk[m](according to the dyld(1) manpage)
16:37davidrysk[m]did you also use DYLD_SHARED_REGION=private?
16:37davidrysk[m]I'm guessing yes
16:37davidrysk[m]so I do wonder if the dyld in recovery is different
16:38davidrysk[m]oh yeah
16:38davidrysk[m]will a developer signed executable run in 1TRR?
16:38davidrysk[m](as opposed to an apple-signed or an adhoc-signed)
16:49FFY00 has quit [Read error: Connection reset by peer]
16:52TheJollyRoger has quit [Write error: Connection reset by peer]
16:52DarthCloud has quit [Remote host closed the connection]
16:53raster has quit [Quit: Gettin' stinky!]
17:09DarthCloud has joined #asahi
17:11jamadazi has joined #asahi
17:16ephe_meral has quit [Read error: Connection reset by peer]
17:21Shizfwiw, I'm fairly sure there's a macOS security policy thati gnores a bunch of dyld variables
17:42eric_engestrom has joined #asahi
18:02aratuk has joined #asahi
18:03TheJollyRoger has joined #asahi
18:05addcninblue has joined #asahi
18:06aratuk has quit [Ping timeout: 264 seconds]
18:20ransom has joined #asahi
18:25davidrysk[m]Shiz: they're all ignored for codesigned code
18:25davidrysk[m]there used to be warning printout but Apple disabled it because "the warnings are causing too much confusion": https://github.com/opensource-apple/dyld/blob/master/src/dyld.cpp#L1695
18:27davidrysk[m]the flags don't seem to work on macOS though
18:28davidrysk[m]but they do work for self-compiled code
18:29davidrysk[m]okay, hardened runtime does disable it
18:31davidrysk[m]hm, what if you just replace the entire dyld cache with the one from OS?
18:31davidrysk[m]I know that's a big-hammer sort of approach... and there might not be enough room on the recovery partition without deleting stuff
18:31davidrysk[m]also it might be protected from replacement
18:53ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
19:05thelounge05 has joined #asahi
19:05raster has joined #asahi
19:07thelounge05 has quit [Client Quit]
19:07djhuk has joined #asahi
19:25ransom has joined #asahi
19:28jos_ has joined #asahi
19:29jos_ has quit [Client Quit]
19:30davidrysk[m]marcan: question, gonna step back a little here and ask... what level of tooling are you planning that you want python in 1TRR?
19:30davidrysk[m]1TR rather, I keep getting that wrong
19:31marcanthe thing is if we can use FFI to invoke frameworks, we can probably solve the needing-macos-installed-first problem
19:38davidrysk[m]Perl doesn't give you a good way to invoke C functions without compiled external modules
19:43Shizmarcan: i just realised you might be able to get some otherwise-hard stuff also done with... applescript
19:45davidrysk[m]you don't need osascript to run applescript, but you need to precompile the applescript
19:45davidrysk[m]they might have disabled apple events, but apple events are used within the OS
19:46davidrysk[m]however, they did add a ton of security tooling that blocks inter-process apple events by default
19:46davidrysk[m]oh, right. :)
19:46davidrysk[m]I meant a applescript
19:46davidrysk[m].applescript*
19:47davidrysk[m]okay... applescript is uncompiled, I believe .scpt is but for that you need osascript
19:47davidrysk[m]so, bleh
19:48davidrysk[m]there is no tcl
19:48davidrysk[m](that I can see)
19:54awordnotwhat mechanism is used to allow things like csrutil to work in 1TR but not normal macOS? Is it just an arbitrary restriction in the kernel that blocks interfaces if it doesn't detect that it was booted in recovery?
19:57awordnotoh, I see, it's enforced by the coprocessor. I thought you might be able to patch the normal macOS kernel to disable the restrictions but I guess not
20:03aratuk has joined #asahi
20:07aratuk has quit [Ping timeout: 240 seconds]
20:32frode_0xa has joined #asahi
20:34frode_0xa has quit [Client Quit]
20:46printfn[m] has joined #asahi
20:47frode_0xa has joined #asahi
20:50davidrysk[m]marcan: have you tested if bputil requires user authentication on a freshly DFU’d Mac?
20:57raster has quit [Quit: Gettin' stinky!]
21:00krbtgtminor correction on the website: there's a "fully open" system - talos ii. though it might depend on your def
21:05merbanan has quit [Ping timeout: 272 seconds]
21:05maor26 has quit [Ping timeout: 264 seconds]
21:07marcankrbtgt: talos ii doesn't even have open schematics (only owners get them, so they are not permissively licensed)
21:07jn__krbtgt: if you consider all the programmable parts (software, firmware, fpga gateware) - yes (AFAIK). chip designs - no
21:08davidrysk[m]the FSF has this idea that closed firmware that can't be rewritten by software does not make a device non-free
21:08marcanpeople who say they are "fully open" are making up a very specific definition of "fully open" that they happen to meet
21:08davidrysk[m]which I think is ridiculous
21:08davidrysk[m]in general "fully open" is an ill-defined term
21:08marcanthey are the bane of the modern fight for hardware freedom and they should be completely disqualified and their RyF program ignored
21:09marcanstallman has forgotten his own motivation for freedom; he wanted to patch a printer driver. he wanted his printer to work. it was a real, practical thing
21:10marcannow it's all some religious nonsense about Freedom™ with no regard for what is actually good for users
21:10marcanthe Freedom in "RYF" actually means you are free to mentally delude yourself into thinking you're free, because all proprietary firmware has been hidden away from you
21:11marcan(even thought that means you are, in fact, less free, as ignorance is the antithesis of freedom)
21:11artemistI love how all the "Freedom" stuff Stallman does just means that computers work less instead of more
21:12marcankrbtgt: but as I mentioned on HN previously, yes, Talos is as free as it gets software-wise these days - e.g. I think they're the only modern platform with fully open source DRAM training
21:12marcanI just wouldn't stick any absolute "fully free" nonsense label on them. They're pretty good, go buy a Talos.
21:15Shizi may have just spent 150eur i could've put towards a thalos on some tshirts and a lego 911 car instead, no regrets
21:17jn__(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/boot/ppc_asm.h#n65)
21:18merbanan has joined #asahi
21:20davidrysk[m]marcan: what pathways are you currently looking at for doing more from 1TR?
21:21davidrysk[m]Shiz: some of the comments on that LWN article are interesting :)
21:23davidrysk[m]note that this article is from 2011
21:23davidrysk[m]but yeah they're still doing this
21:29TheJollyRogerartemist: Chromium on PPC64LE has Just In Time Javascript, but upstream doesn't like to play well with us so one of the people at the channel has maintained the patchset themselves.
21:30TheJollyRogersince upstream won't take them.
21:31ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
21:32TheJollyRogerIt works great though.
21:34TheJollyRogerI bought a Talos II to replace a beat-up old PC that I bought years ago and that was starting to fall apart at the seams. I like it, it's fast and powerful. It took a little bit of work to set up, but what computer doesn't?
21:45amw1 has joined #asahi
21:56bublik_ has joined #asahi
22:00Bublik has quit [Ping timeout: 260 seconds]
22:03aratuk has joined #asahi
22:07aratuk has quit [Ping timeout: 246 seconds]
22:11raster has joined #asahi
22:13rwhitbydavidrysk[m]: if you run bputil on a freshly DFU'd device, it asks for the password for an install user (I forget the specific username but I can get it again later) and you don't know that password.
22:14davidrysk[m]is it _mbsetupuser?
22:15bublik_ has quit [Remote host closed the connection]
22:18bublik_ has joined #asahi
22:20Bublik has joined #asahi
22:20amw1 has quit [Ping timeout: 240 seconds]
22:23bublik_ has quit [Ping timeout: 260 seconds]
22:33amw1 has joined #asahi
22:37modwizcode has quit [Quit: Later]
22:39amw1 has quit [Ping timeout: 246 seconds]
22:52amw1 has joined #asahi
22:54Alex[m]17when people say things like 'install asahi', is asahi the kernel itself, or is it a distro? or neither?
22:55brentr123[m]i think so?
22:56davidrysk[m]it's more of a project to bring Apple Silicon support to the Linux kernel and provide tooling and a bootloader
22:56j`ey"We expect that support will eventually trickle up and back down to other distributions. Advanced users will always be free to use the distribution of their choice and add the necessary patches/software themselves before this happens."
22:57amw1 has quit [Ping timeout: 256 seconds]
22:57jn__Alex[m]17: boring and terrible answer: probably depends on context and the person saying it
22:57brentr123[m]but a arch linux arm "remix" will eventually be made
22:59Alex[m]17ok, this makes sense, but if its just a project im confused when people say things like 'install asahi' if what we are really doing is installing linux and asahi is just a means to get to that point
22:59davidrysk[m]where are people saying that?
23:00jn__it might mean, for example, "install a linux system (which includes a kernel, and may also include userspace), which uses code from the asahi project"
23:03Alex[m]17i've seen it a few times in this chat, e.g. "it'd be a nice to have a one-step script to install Asahi from 1TR" is the latest example. i'm not trying to be rude or anything just looking for further clarification and i got it. thanks all
23:04amw1 has joined #asahi
23:05davidrysk[m]Alex: I think it means to install whatever the project puts together (Arch Linux ARM + Asahi bootloader/kernel/etc)
23:08Alex[m]17very cool. and i think ALARM is a great base for a project like this i've used it for a few months on a couple of my machine and have been very happy with it, despite its somewhat 'unofficial' status as a distro
23:09amw1 has quit [Ping timeout: 256 seconds]
23:10Alex[m]17i have it on good authority that its basically for pkg in "${x86_64_pkgbuilds[@]}"; do cd pkg && makepkg -A && cd ..; done
23:10davidrysk[m]for the most part; some stuff is patched as needeed
23:10davidrysk[m]needed*
23:10davidrysk[m]and it's more work for the kernels, obviously
23:11davidrysk[m]For all too many ARM platforms, support isn't upstreamed :(
23:12amw1 has joined #asahi
23:17amw1 has quit [Ping timeout: 264 seconds]
23:18amw1 has joined #asahi
23:18Alex[m]17yeah, i dont see this being upstreamed any time soon, so it might be useful to start thinking about hosting Packages for using Arch Linux ARM on the M1 devices such that we can add the repo it to our pacman.conf so that we can install and manage kernels, bootloaders + other important things we need to get things running.
23:20Alex[m]17 * yeah, i dont see this being upstreamed any time soon, so it might be useful to start thinking about hosting Packages for using Arch Linux ARM on the M1 devices such that we can add the repo to our pacman.conf so that we can install and manage kernels, bootloaders + other important things we need to get things running.
23:22frode_0xa has quit [Quit: leaving]
23:23amw1 has quit [Ping timeout: 264 seconds]
23:23amw1 has joined #asahi
23:28amw1 has quit [Ping timeout: 256 seconds]
23:38ransom has joined #asahi
23:38jamadazi has quit [Read error: Connection reset by peer]
23:39jamadazi has joined #asahi
23:40amw1 has joined #asahi
23:41raster has quit [Quit: Gettin' stinky!]
23:44amw1 has quit [Ping timeout: 240 seconds]
23:53ransom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
23:57amw1 has joined #asahi