ChanServ changed the topic of #asahi-dev to: Asahi Linux: porting Linux to Apple Silicon macs | General development | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Logs: https://alx.sh/l/asahi-dev
<phire> sven: i've run into that issue with python failing to load ADT since calcualted base address ends up negative
<phire> virtual address is: 0xffffffffffe38000, which seems very diffrent to the virtual address of 0x1be38000 that I see in my scrollback
<phire> I'm guessing this is ASLR. Looks like it's overflowing a 32bit signed value, somewhere
rafaelmartins has quit [Quit: https://rgm.io/]
chadmed has quit [Remote host closed the connection]
_alice has quit [Server closed connection]
_alice has joined #asahi-dev
xerpi[m] has quit [Server closed connection]
xerpi[m] has joined #asahi-dev
chadmed has joined #asahi-dev
Amey has quit [Server closed connection]
Amey has joined #asahi-dev
yuyichao has quit [Ping timeout: 480 seconds]
chadmed has quit [Ping timeout: 480 seconds]
bisko has quit [Ping timeout: 480 seconds]
yuyichao has joined #asahi-dev
<phire> /chosen/asmb/lp-sip2 seems to be missing from the device tree
<phire> Something weird is happening with the 12.2 firmware. the kernel isn't detecting that CTRR has been disabled and it errors under m1n1.
<phire> passing -unsafe_kernel_text on the command line works around it
Eighth_Doctor has quit [Server closed connection]
Eighth_Doctor has joined #asahi-dev
emilazy has quit [Server closed connection]
emilazy has joined #asahi-dev
HayashiEsme[m] has quit [Server closed connection]
HayashiEsme[m] has joined #asahi-dev
chadmed has joined #asahi-dev
chadmed has quit [Ping timeout: 480 seconds]
sven has quit [Remote host closed the connection]
kov has quit [Quit: Coyote finally caught me]
sven has joined #asahi-dev
kov has joined #asahi-dev
dcavalca has quit [Server closed connection]
dcavalca has joined #asahi-dev
chadmed has joined #asahi-dev
phiologe has joined #asahi-dev
PhilippvK has quit [Ping timeout: 480 seconds]
bisko has joined #asahi-dev
jeffmiw has quit [Ping timeout: 480 seconds]
MajorBiscuit has joined #asahi-dev
Major_Biscuit has joined #asahi-dev
MajorBiscuit has quit [Ping timeout: 480 seconds]
<sven> phire: yeah, it smells like it’s related to the ASLR iboot does
<sven> might even be an iboot bug introduced with that raw mode ;)
<sven> the whole virtual macho address thing confuses me every time I think about it
<marcan> ChaosPrincess: we're definitely using the binary for chainloads, no parsing necessary
<marcan> < maz> but I'm everyday grateful I run my own email infrastructure. <- word...
<ChaosPrincess> to chainload raw binaries the way is to dump it somewhere in memory, copy sepfw and boot-args and jump to entry point, correct?
chadmed has quit [Ping timeout: 480 seconds]
<maz> marcan: ;-)
<marcan> ChaosPrincess: not correct; you should do an in-place chainload, which means building an in-memory image with sepfw and boot-args and then calling a copy stub that puts it on top of where the original m1n1 was
<marcan> see what chainload.py does
<marcan> this is required for sleep support to work in the future
<j`ey> marcan: so is that copying twice?
<j`ey> copy new m1n1 -> A, jump to copy stub, copy A -> original place
<marcan> yes
<ChaosPrincess> right, so, the thing i said, but overwrite origninal m1n1 with that image
<marcan> yes
<ChaosPrincess> im just checking that i am not missing any other bits that need to be loaded
<marcan> of course the pointers within that image (i.e. in the ADT and boot-args) need to point to where things will eventually end up, not where they are in the image
<marcan> and the ADT needs to be patched to change the sepfw address
<marcan> j`ey: technically we could avoid some copies by being smarter, but it's a pointless micro-optimization given how fast these things are
<j`ey> KISS
<marcan> ChaosPrincess: the main difference with chainload.py is no mach-o nonsense; just load m1n1, then sepfw (aligned), then boot-args (aligned) as one blob, then have a copy stub (probably safest to put it right after boot-args along with everything else), and call it to clobber the original m1n1
<j`ey> marcan: getting flashbacks to the DFU bootloader I worked on
<marcan> :)
<ChaosPrincess> the sleep support being done in m1n1 is because linux does not want to deal with it and just wants to call firmware services?
<j`ey> yeah
<marcan> and because either way it has to go through m1n1
<marcan> the sleep resume vector is locked at m1n1+0 (the way we load it now)
<marcan> so one way or another there has to be code there, even if it's just "jump elsewhere"
<kettenis> really feels like you guys are trying to run while we can barely walk...
<j`ey> kettenis: I mean, as long as theyre having fun experimenting!
<marcan> kettenis: people get excited :p
<marcan> also if someone really wants to build this for me and does a good job, it might even make it into the first "release" or a nearby one and future-proof us a bit
<marcan> I have my own roadmap of what order I want to do things in, but it's always subject to change if someone volunteers to pick up something...
<ChaosPrincess> kettenis: the code is kinda already there, it is just on python side
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phire> sven: doesn't seem to be very good ALSR. I only saw 5 bits used
<phire> (including the times it goes negative)
<sven> yeah, it's not a lot
<sven> though... 5 bits sounds less than i remembered
<phire> I think it's meant to be 7 bits
<sven> XNU might also relocate itself later, maybe this is just for the bootstrapping code before that can happen
<sven> er.. wait.. i think the whole thing just managed to confuse me again
<sven> https://www.theiphonewiki.com/wiki/Kernel_ASLR claims it should be 8 bits i think
<phire> well... how many bits is slide_byte?
<phire> In the 8 or so reboots I did, I only ever saw 5 bytes set
<marcan> AIUI there are a few bits of physical addr ASLR, and then a few more of virtual addr ASLR
<Redecorating[m]> marcan: for the WiFi patch message for bcm4364, the module instances for the non-T2 iMacs is not the same for both, I've realised that I entered them in wrong on the t2linux wiki table that I think you were referring to. iMac19,2 is nihau [0], while iMac19,1 is midway [1].
AkihikoOdaki[m] has quit [Server closed connection]
AkihikoOdaki[m] has joined #asahi-dev
astrorion26[m] has quit [Server closed connection]
astrorion26[m] has joined #asahi-dev
Augur[m] has quit [Server closed connection]
Augur[m] has joined #asahi-dev
Bastian[m] has quit [Server closed connection]
Bastian[m] has joined #asahi-dev
bastilian[m] has quit [Server closed connection]
bastilian[m] has joined #asahi-dev
blazra[m] has quit [Server closed connection]
blazra[m] has joined #asahi-dev
AnushervonTabarov[m] has quit [Server closed connection]
AnushervonTabarov[m] has joined #asahi-dev
CristianMgheruan-Stanciu[m] has quit [Server closed connection]
CristianMgheruan-Stanciu[m] has joined #asahi-dev
Dcow[m] has quit [Server closed connection]
Dcow[m] has joined #asahi-dev
digitalfx[m] has quit [Server closed connection]
digitalfx[m] has joined #asahi-dev
facez[m] has quit [Server closed connection]
facez[m] has joined #asahi-dev
faiz_abbas[m] has quit [Server closed connection]
faiz_abbas[m] has joined #asahi-dev
ianlienfa[m] has quit [Server closed connection]
PhilippvK has joined #asahi-dev
ianlienfa[m] has joined #asahi-dev
izzyisles[m] has quit [Server closed connection]
izzyisles[m] has joined #asahi-dev
jason1923[m] has quit [Server closed connection]
jason1923[m] has joined #asahi-dev
jeh[m] has quit [Server closed connection]
jeh[m] has joined #asahi-dev
kedde[m] has quit [Server closed connection]
kedde[m] has joined #asahi-dev
phiologe has quit [Ping timeout: 480 seconds]
latosca[m] has quit [Server closed connection]
latosca[m] has joined #asahi-dev
lucifer178[m] has quit [Server closed connection]
lucifer178[m] has joined #asahi-dev
mmlb[m] has quit [Server closed connection]
mmlb[m] has joined #asahi-dev
mrbatmanface[m] has quit [Server closed connection]
mrbatmanface[m] has joined #asahi-dev
NightRaven[m] has quit [Server closed connection]
NightRaven[m] has joined #asahi-dev
notyou[m] has quit [Server closed connection]
notyou[m] has joined #asahi-dev
rohin[m] has quit [Server closed connection]
rohin[m] has joined #asahi-dev
SocioProphet[m] has quit [Server closed connection]
SocioProphet[m] has joined #asahi-dev
steffen[m] has quit [Server closed connection]
steffen[m] has joined #asahi-dev
Name[m] has quit [Server closed connection]
Name[m] has joined #asahi-dev
<marcan> Redecorating[m]: thanks, I'll fix the commit message
bisko has joined #asahi-dev
<povik> protonmail replied
<povik> they confirm there's no option to disable the encryption with keys obtained through WKD but they will forward the feedback to the appropriate team
<povik> also, this: "In the meantime, you can try getting in touch with the IT team of the domain in question and let them know to check their WKD configuration as they might have set it up wrong if they're not able to read your messages."
<sven> lol, or maybe just switch to a sane mail provider
<povik> yeah, either that or making kernel.org changing their configuration
<povik> s/changing/change/
<sven> i can recommend fastmail :P
<ar> I've recently migrated away from protonmail to selfhosting mail on my own box i keep at the local hackerspace
<ar> https://gitlab.com/simple-nixos-mailserver/nixos-mailserver made the setup surprisingly trivial
yuyichao has quit [Ping timeout: 480 seconds]
IvanMaksimovic[m] has quit [Server closed connection]
IvanMaksimovic[m] has joined #asahi-dev
ponkey364[m] has quit [Server closed connection]
ponkey364[m] has joined #asahi-dev
yuyichao has joined #asahi-dev
bisko has quit [Read error: Connection reset by peer]
<mini> I've been self-hosting mail myself for quite some time and have found that as long as you have a reputable host it's not that bad
<mini> (eg their IP space isn't hosting spammers)
King_InuYasha has joined #asahi-dev
Gaspare has joined #asahi-dev
King_In4 has quit [Ping timeout: 480 seconds]
phiologe has joined #asahi-dev
<marcan> the only provider that has ever given me trouble with blacklists is microsoft, but well, microsoft.
<marcan> gmail hated me *forwarding* spam to a specific account there via an alias once, but only rejected that spam itself / stuff to that account, they didn't blacklist my whole host
PhilippvK has quit [Ping timeout: 480 seconds]
<maz> yeah, I had to severely tweak the MLs I host to be DMARC compliant and avoid the traffic ending up as spam.
<kettenis> ah, the asahi installer doesn't copy the wifi firmware yet?
<j`ey> nope
<marcan> kettenis: mostly because it doesn't even create an ESP yet :-)
<marcan> that's pretty much next
<kloenk> the installer is python in userspace? or how was that written?
<alyssa> maz: hosting MLs, that, that is brave.
<maz> alyssa: small scale, very low visibility,and I personally know each and every one of the members. Limited risks.
<alyssa> Got it
Major_Biscuit has quit [Ping timeout: 480 seconds]
<jannau> is there a way to resolve device tree phandle references in reverse? the device tree api doesn't offer it. I wouldn't have expected that since it requires a preparsed tree or iterating over all nodes
<jannau> I want to use that to determine reserved regions on an dart probe
<jannau> I don't think I can use anything else than device tree processing since I need the information even when no driver is present
<jannau> the reserved regions are stored in the device node using the region and think that's a sensible aproach
<jannau> but that means I would need to find the devices using (via "iommus" phandle) the probed dart
<jannau> just checking if I missed something before I reply to https://lore.kernel.org/dri-devel/YUIPCxnyRutMS47%2F@orome.fritz.box/
<jannau> this problem would go also vanish if I removed apple_dart_hw_reset()
m6wiq has joined #asahi-dev
bisko has joined #asahi-dev
<kettenis> my preferred approach would be to not reset the DART in any way and have the DT list the iova space that should not be touched as reserved somehow
bisko has quit []
bisko has joined #asahi-dev
<jannau> not resetting any dart? or just the ones with reserved regions?
bisko has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<kettenis> just the locked ones
<jannau> the dart (dart-dips0) used to map the frame buffer is not locked, only dart-dcp is locked
bisko has joined #asahi-dev
<alyssa> jannau: and now you know where the force-locked hack came from ;-p
bisko has quit [Ping timeout: 480 seconds]
<sven> if you want to go back to hacks you could just lock it in m1n1 :P
<kettenis> ah, still, resetting that dart will kill the framebuffer isn't it?
<kettenis> that seems undesirable
<kettenis> (just realized that adding the display DARTs to the device tree killed the framebuffer on OpenBSD, probably because the code was putting it in bypass mode)
<jannau> yes, it kills the framebuffer and dcp
<sven> yeah :/
<sven> we could just not reset any dart and make sure that all intermediate stages clean them up if required before jumping to the next one.
<sven> but that’s also a bit ugly
bisko has joined #asahi-dev
<jannau> we could also just move the reserved regions from the device to the iommu node
<jannau> the dart driver knows then which streams it must not reset and the device can still look up the region via its iommus phandle
<jannau> I'm writing that as proposal in reserved-memory dt-bindings thread
bisko has quit [Ping timeout: 480 seconds]
jeffmiw has joined #asahi-dev
Gaspare has quit [Quit: Gaspare]
m6wiq has quit []
bisko has joined #asahi-dev
nirgo has joined #asahi-dev
povik has quit [Ping timeout: 480 seconds]
balrog has quit [Ping timeout: 480 seconds]
balrog has joined #asahi-dev
povik has joined #asahi-dev
<povik> so i should be reachable at povik at cutebit.org
<povik> feel free to send hellos, i will be happy to find out everything works as it should
<povik> ar: thank you for the tip! nixos-mailserver serves me well (so far)