marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
yuyichao has joined #asahi
<marcan>
amw: you have PAC enabled so you have to set pac_mask; sorry, I didn't realize that from your old backtrace
<marcan>
I should really make that automatic
<marcan>
everything else should be working fine, it's just the pac_mask issue
<amw>
marcan: I guess you mean VinDuv's suggestion, hv.pac_mask = 0xffff000000000000, which works: https://paste.debian.net/1201804/
<amw>
I notice that your HV.PAC_MASK has 5 x fs - PAC_MASK = 0xfffff00000000000 - but that *doesn't* work - https://paste.debian.net/1201805/
<marcan>
amw: yes, because that one is for XNU
<marcan>
I need to figure out how to determine what the PAC width is from the config registers so I can set it automatically
<amw>
The code that picks out the dtb + initramfs probably knows what it is booting?
<marcan>
but the hypervisor doesn't know anything about that, it just boots a mach-o
<marcan>
but that's not the point, it should be able to read the CPU registers and update pac_mask
<amw>
ok so HV and proxy just slap the whole blob into memory and jump to the start address mindlessly?
<marcan>
HV loads m1n1 which loads linux; HV has no idea m1n1 is going to load linux (and not, say, chainload xnu)
<marcan>
the dtb+initramfs thing is done by m1n1
<marcan>
the appending thing is a trick
<marcan>
the m1n1 mach-o ends with a big dummy segment that is truncated off of the end of the file
<marcan>
so anything you append to it gets loaded as that segment
<amw>
I thought HV was m1n1? Do does the original HV stay around the the m1n1 in the payload run at EL1?
<marcan>
the HV is also m1n1
<marcan>
you are running m1n1 on m1n1
<amw>
So the 2nd m1n1 is like a u-boot/loader which is discarded by Linux (one day)
<marcan>
yes, this is how Linux is loaded when there is no hypervisor involved
<marcan>
though right now I think I protect m1n1 in memory so it never gets discarded, but that's a technicality (and might change in the future)
<amw>
Could m1n1 check it is at EL1 and do a hv call just before jumping to the target? or is that bad design?
<marcan>
it could, but that doesn't seem like the right solution for figuring out a pac_mask when the CPU registers contain all the necessary information
<amw>
Wondering how useful you thought the help command - https://paste.debian.net/?show=1201723;lines=0 - I thought it very helpful to know what things you can do, but it needs some effort to add in the doc strings which I can do over time
<amw>
marcan: FileVault is set (System Preferences -> Security & Privacy -> File is correct), I'm happy to leave it that way on the MacOS
aquijoule_ has joined #asahi
phiologe has joined #asahi
PhilippvK has quit [Ping timeout: 480 seconds]
richbridger has quit [Ping timeout: 480 seconds]
marvin24 has joined #asahi
marvin24_ has quit [Ping timeout: 480 seconds]
thunfisch has quit [Ping timeout: 480 seconds]
thunfisch has joined #asahi
nico_32 has quit [Read error: Connection reset by peer]
nico_32 has joined #asahi
nico_32 has quit [Quit: leaving]
nico_32 has joined #asahi
GreatGodvin has joined #asahi
GreatGodvin_ has joined #asahi
GreatGodvin_ has quit []
aleasto has joined #asahi
<j_ey>
marcan: did you see the code that ml00 mentioned, looks like a bug that maps all hooks as RW
Andalu30 has joined #asahi
<marcan>
j_ey: yeah, definitely a bug
marvin24_ has joined #asahi
marvin24 has quit [Ping timeout: 480 seconds]
aquijoule_ has quit [Read error: Connection reset by peer]
aquijoule__ has joined #asahi
GreatGodvin has quit [Quit: WeeChat 3.2]
choozy has joined #asahi
GreatGodvin has joined #asahi
GreatGodvin[m] has joined #asahi
GreatGodvin[m] has quit []
GreatGodvin has quit [Ping timeout: 480 seconds]
al3xtjames has quit [Quit: Ping timeout (120 seconds)]
al3xtjames has joined #asahi
Andalu30 has quit [Ping timeout: 480 seconds]
Andalu30 has joined #asahi
choozy has quit [Remote host closed the connection]
zzzZZ has joined #asahi
zzzZZ has quit [Quit: Leaving]
aleasto has quit [Quit: Konversation terminated!]
aleasto has joined #asahi
aleasto has quit [Remote host closed the connection]
aleasto has joined #asahi
<bloom>
mini.hv.dcp: Decode frame presents
<bloom>
<bloom>
a sophisticated side-channel hypervisor timing attack to determine the