#
…

2025-03-29

00:04zumi_ has joined #asahi-dev
00:04zumi has quit [Remote host closed the connection]
00:09zumi_ is now known as zumi
00:12nela has quit [Quit: Ping timeout (120 seconds)]
00:13nela has joined #asahi-dev
00:30chrisl has joined #asahi-dev
00:38chrisl has quit [Ping timeout: 480 seconds]
00:42john-cabaj has joined #asahi-dev
00:43pb17 has quit [Ping timeout: 480 seconds]
01:10pb17 has joined #asahi-dev
01:31chrisl has joined #asahi-dev
01:39chrisl has quit [Ping timeout: 480 seconds]
01:40rrendec has quit [Ping timeout: 480 seconds]
01:46john-cabaj has quit [Ping timeout: 480 seconds]
01:57chadmedive pushed and released speakersafetyd 1.1.0 which runs as the speakersafetyd user by default
02:19nicolas17was it root before?
02:30nicolas17ah I see, only privileges it needs are granted by the "audio" group?
02:31fl0_idI was experimenting with the bluetooth packet logger on macos for testing resume etc - is there a secret to use that app or is it know that only some combinations of software/hardware firmware work? It just doesn't give any output. kinda like this https://developer.apple.com/forums/thread/761623
02:32nicolas17fl0_id: I tried it once and it logged stuff, but it seemed like the bluetooth stack used vendor-defined commands for basic operations (like sending LE advertisements) which the GUI didn't know how to decode
02:33nicolas17that's in xcode additional tools package, right?
02:33fl0_idnicolas17 well that's a next step. but it would be weird if it doesn't decode anything.
02:43nyx_o has quit [Read error: Connection reset by peer]
02:46fl0_idmmh I thought I maybe had an old version, but it seems the packet logger binary stayed the same, still a 2022 version number
02:48chadmed_ has quit [Remote host closed the connection]
02:51nyx_o has joined #asahi-dev
02:54pb17 has quit [Ping timeout: 480 seconds]
03:00ciara has quit [Remote host closed the connection]
03:00ciara has joined #asahi-dev
03:24pb17 has joined #asahi-dev
03:26psykose has quit [Remote host closed the connection]
03:27psykose has joined #asahi-dev
03:37tobhe_ has joined #asahi-dev
03:44chrisl has joined #asahi-dev
03:44tobhe has quit [Ping timeout: 480 seconds]
03:52chrisl has quit [Ping timeout: 480 seconds]
04:08nora_ has joined #asahi-dev
04:10nora has quit [Ping timeout: 480 seconds]
04:33chrisl has joined #asahi-dev
04:41chrisl has quit [Ping timeout: 480 seconds]
04:58chadmednicolas17: tbh the only real permission it needs is CAP_SYS_NICE so idk if the audio group is even necessary
04:59chadmeddo you need audio to just open a pcm?
04:59nicolas17idk how audio works at that level
05:00nicolas17does it open a /dev/snd/pcm* device and do read/write/ioctl to it?
05:01chadmedbut it does it through alsa-lib
05:01nicolas17on my old debian system those devices are "crw-rw----+ 1 root audio", so if you're not in the audio group you can't even open() them
05:01chadmedprobably still needs audio
05:01chadmedi gave the gentoo user audio membership anyway for good measure
05:10chaos_princesssomewhat annoying that we can't just dynamicuser it due to blackbox
05:18nicolas17if you want to restrict it further for security, you could use ProtectSystem= and friends
05:18chaos_princessthat too won't hurt, but dynamicuser also simplifies packaging
05:18nicolas17if you want to avoid having to create a real user account... yeahhh that's annoying
05:18JayBeeFOSS has quit [Remote host closed the connection]
05:19nicolas17(note that DynamicUser implies ProtectSystem)
05:20JayBeeFOSS has joined #asahi-dev
05:29pb17 has quit [Ping timeout: 480 seconds]
05:35chrisl has joined #asahi-dev
05:37chadmedchaos_princess: tbh we can probably get rid of blackbox at some point
05:37chadmedit was only there to debug issues with the kernel lock but like its clearly stable lmfao
05:39chaos_princessUp to y'all, i am not brave enough to sign off on safety decisions :P
05:40chadmedit's not in the hot path its purely a debug feature
05:41chadmedit just dumps out the last set of VISENSE samples processed so we could see what the codecs were doing
05:42chadmedi'll leave it until we sort out the tdm stuff upstream
05:43chrisl has quit [Ping timeout: 480 seconds]
05:48pb17 has joined #asahi-dev
05:59yuyichao_ has quit [Ping timeout: 480 seconds]
06:05zumi_ has joined #asahi-dev
06:05zumi has quit [Remote host closed the connection]
06:10zumi_ is now known as zumi
06:39chrisl has joined #asahi-dev
06:47chrisl has quit [Ping timeout: 480 seconds]
06:58pb17 has quit [Ping timeout: 480 seconds]
07:00r0ni has quit [Ping timeout: 480 seconds]
07:09mildsunrise has quit [Quit: disconnect]
07:10mildsunrise has joined #asahi-dev
07:14pb17 has joined #asahi-dev
07:46chrisl has joined #asahi-dev
07:54chrisl has quit [Ping timeout: 480 seconds]
08:13okb has joined #asahi-dev
08:28pb17 has quit [Ping timeout: 480 seconds]
08:31svenwow, totally missed that work
08:33apalosI had a chat with jannau in private, but I think it's better to ask here
08:33apalosThere are reasons we don't enable by default yet so you have to do a menuconfig to enable it
08:36chrisl has joined #asahi-dev
08:36apalosso you will need to enable CONFIG_MMU_PGPROT
08:37apalosand CONFIG_CMD_MEMINFO_MAP if you want to dump the mapping in the u-boot command line with 'meminfo'
08:44chrisl has quit [Ping timeout: 480 seconds]
08:44pb17 has joined #asahi-dev
08:50apalosjannau: ah nice thanks!
08:50apalosDoes it still boot?
08:51apalosUnfortunately, there are places in u-boot where people were doing const char *blah and the write it...
08:51apalosWhich now blows up since the strings are emitted in .rodata which is properly protected now
08:51apalosWe've fixed a few but you never know...
08:53jannauI think it still boots not 100% sure I tested though
08:53apalosexcellent thanks,
08:54apalosThere's still a messs with EFI runtime services, but I plan to fix this as well at some point and set the permissions for that as well
09:00jannauyes, it still boots. tested to be sure
09:09apalosgreat, thanks
09:09apalosI think you can enable it then (famous last words)
09:38chrisl has joined #asahi-dev
09:46chrisl has quit [Ping timeout: 480 seconds]
10:04hspak44053 has joined #asahi-dev
10:09hspak4405 has quit [Ping timeout: 480 seconds]
10:24roxfan has quit [Remote host closed the connection]
10:34roxfan has joined #asahi-dev
10:43chrisl has joined #asahi-dev
10:51chrisl has quit [Ping timeout: 480 seconds]
11:38chrisl has joined #asahi-dev
11:46chrisl has quit [Ping timeout: 480 seconds]
12:01pb17 has quit [Ping timeout: 480 seconds]
12:04zumi_ has joined #asahi-dev
12:04zumi has quit [Remote host closed the connection]
12:09zumi_ is now known as zumi
12:10wtfcxt has joined #asahi-dev
12:10wtfcxt has quit []
12:11wtfcxt has joined #asahi-dev
12:15pb17 has joined #asahi-dev
12:39chrisl has joined #asahi-dev
12:47chrisl has quit [Ping timeout: 480 seconds]
12:48zumi has quit [Remote host closed the connection]
12:55wtfcxt has quit [Quit: https://quassel-irc.org - Komfortabler Chat. Überall. ]
12:55wtfcxt has joined #asahi-dev
12:56wtfcxt has quit []
12:56wtfcxt has joined #asahi-dev
12:57fl0_idchaos_princess thx. I found that, but then wasn't sure of that was only for sending to apple and it required rebooting and it was late...
12:58fl0_idjannau no I hadn't thanks. I was just going based on wiki info
13:29chrisl has joined #asahi-dev
13:37chrisl has quit [Ping timeout: 480 seconds]
13:37rrendec has joined #asahi-dev
13:50wtfcxt has quit [Ping timeout: 480 seconds]
13:55pb17 has quit [Ping timeout: 480 seconds]
14:17pb17 has joined #asahi-dev
15:26chrisl has joined #asahi-dev
15:34chrisl has quit [Ping timeout: 480 seconds]
15:49pb17 has quit [Ping timeout: 480 seconds]
16:05pb17 has joined #asahi-dev
16:25chrisl has joined #asahi-dev
16:33chrisl has quit [Ping timeout: 480 seconds]
17:03mattia013 has joined #asahi-dev
17:16mischa85 has joined #asahi-dev
17:26chrisl has joined #asahi-dev
17:30mischa85aight i'm back on t6041 duties again. this time taking a closer look at what happens regarding the HCR_EL2 register. it crashes on the first call: hcr = HCR(self.u.mrs(HCR_EL2))
17:33___nick___ has joined #asahi-dev
17:33j`eythat's pretty weird, just reading a register
17:34chrisl has quit [Ping timeout: 480 seconds]
17:35pb17 has quit [Ping timeout: 480 seconds]
17:36mischa85searching HCR_EL2 on the IRC history of this channel results in someone mentioning it being a per-core setting rather than system-wide
17:36mischa85so my theory, perhaps this register is tied to a disabled core and it's trying to read it?
17:37j`eymrs reads the current cores register
17:38mischa85what sets the current core? i want m1n1 to strictly use cpu4
17:38j`eywell current core as in the core that executes that instruction
17:39mischa85hmmm, should be fine then
17:41mischa85this is odd
17:42mischa85no wonder i had to comment out all the register stuff to at least not make it crash
17:43mischa85at least not crash before it transfers the kernel
17:43pb17 has joined #asahi-dev
17:46aissen has quit [Quit: brb]
17:49aissen has joined #asahi-dev
17:50j`eythat's an MMU fault
17:52nicolas17 has quit [Ping timeout: 480 seconds]
17:52mischa85it's disabled
17:52nicolas17 has joined #asahi-dev
17:53mischa85or at least, mmc_init() is not getting called
17:58mischa85*mmu_init
17:58kloenk has quit [Remote host closed the connection]
17:59kloenk has joined #asahi-dev
18:08mischa85how do you recognize it as MMU fault?
18:11j`eythat's what an instruction abort it, when it tries to execute from some invalid adress
18:18fl0_idjannau so if I read this correctly, there isn't any consensus in bluez yet, on how to implement this?
18:18svendoes mrs work with any other register?
18:19mischa85well it does for OSLAR_EL1 for example
18:19mischa85and MIDR_EL1
18:26fl0_id(though not directly relevant, except for how packet logger works)
18:27chrisl has joined #asahi-dev
18:33___nick___ has quit []
18:35elvishjerricco has quit [Remote host closed the connection]
18:35chrisl has quit [Ping timeout: 480 seconds]
18:35___nick___ has joined #asahi-dev
18:37___nick___ has quit []
18:40___nick___ has joined #asahi-dev
18:52mischa85ok i want to test some things, but i have some noobish questions. i'm trying read32(MIDR_EL1) which of course doesn't work because it expects an integer. but i cannot for the life of me figure out what that integer should be
18:52mischa85MIDR_EL1 also doesn't seem to be defined anywhere in the sourcecode?
18:53mischa85i expect it to be defined as an address of some sorts
18:54mischa85i'm missing something obvious here
18:54chaos_princessThat does not make sense, read32 is a memory read, and MIDR_EL1 id a system register
18:55chaos_princesslike, it is closer to x15 or eax than a memory address
18:56mischa85ok, thank you. i'll see if i can find something like that in the m1n1 shell
18:56elvishjerricco has joined #asahi-dev
18:58mischa85ok derp got it
18:58mischa85mrs() is available in the shell
18:58mischa85and it somehow gives me that same instruction abort when i try to do mrs(MIDR_EL1)
19:00mischa85which is odd because that register read succeeds when being done from chickens.c
19:00mischa85which means something between chickens.c and uartproxy is messing things up
19:01j`eymischa85: in chickens.c it's reading it directly/compiled, with mrs() in the shell, im pretty sure it tries to allocate some memory, and then copy the instruction there
19:03mischa85j`ey: thanks. does that mean when mrs() gets called from the hypervisor python script it tries to do the same?
19:03j`eyyeah from python it has to copy the instruction to memory somewhere to execute
19:04j`eyif it's in the C it's just in the memory loaded when m1n1 starts
19:04mischa85i think we're onto something
19:04mischa85so that memory allocation fails
19:06chaos_princessIf memory allocation failed i think you'd have no python at all
19:06chaos_princessit looks more like it fails to make it executable
19:07mischa85which should be allocated at startup already right?
19:08mischa85which reinforces chaos_princess' hunch here
19:17cow123 has joined #asahi-dev
19:19mischa85i found it
19:19mischa85and i feel stupid
19:20mischa85guess what i had set: self.mmu_off = False
19:21mischa85which means this did not get set: region = 0
19:21mischa85which means i can now succesfully read the HCR_EL2 register
19:47pb17 has quit [Ping timeout: 480 seconds]
19:55WindowPain5 has joined #asahi-dev
20:01WindowPain has quit [Ping timeout: 480 seconds]
20:01WindowPain5 is now known as WindowPain
20:03chrisl has joined #asahi-dev
20:11chrisl has quit [Ping timeout: 480 seconds]
20:15chrisl has joined #asahi-dev
20:18pb17 has joined #asahi-dev
20:22mischa85alright a lot of the msr() calls now work, obviously. the only things commented out now are AMX_CONFIG_EL1, VMKEYLO_EL2, VMKEYHI_EL2, APSTS_EL12, SPRR_CONFIG_EL1 and GXF_CONFIG_EL1
20:23chrisl has quit [Ping timeout: 480 seconds]
20:47svenuh, isn’t it already somewhere inside xnu?
20:57chaos_princess"Exception taken from EL2h" - i dont think so?
21:00j`eyit could be a exception from the hv
21:00j`eyso xnu started, but then somethign went wrong in the hv
21:00jnn is now known as jn
21:01chaos_princessi guess we will find out once the printf results return :P
21:04___nick___ has quit [Remote host closed the connection]
21:06mischa85ok i took out SYS_IMP_APL_AMX_CTL_EL2, SYS_IMP_APL_APVMKEYLO_EL2, SYS_IMP_APL_APVMKEYHI_EL2, SYS_IMP_APL_APSTS_EL12, SYS_IMP_APL_SPRR_CONFIG_EL1 and SYS_IMP_APL_GXF_CONFIG_EL1 from hv_start(). execution reaches hv_enter_guest but crashes like this: https://gist.github.com/mischa85/864fe86f35034a6bb7f1fe64965cbc62
21:08j`eyare you running xnu or linux btw?
21:14chaos_princesstime to spam printfs into the fiq handler :P
21:15mischa85hv_update_fiq() that is?
21:26mischa85proooobably hv_exc_fiq()
21:26mischa85doesn't hurt to do both i guess
21:35ddxtanx has quit [Remote host closed the connection]
21:42chrisl has joined #asahi-dev
21:50chrisl has quit [Ping timeout: 480 seconds]
21:52mischa85it doesn't log anything from either
21:58mischa85but that function is extremely verbose anyway? not much printf to add there...
22:00ethantwa1 has quit [Quit: WeeChat 4.4.2]
22:01ethantwardy has joined #asahi-dev
22:09ddxtanx has joined #asahi-dev
22:12pb17 has quit [Ping timeout: 480 seconds]
22:21mischa85is any of the msr() calls i took out absolutely vital? they all crash tho
22:42pb17 has joined #asahi-dev
22:50chrisl has joined #asahi-dev
22:58chrisl has quit [Ping timeout: 480 seconds]
23:50chrisl has joined #asahi-dev
23:58chrisl has quit [Ping timeout: 480 seconds]
…