#asahi-re · 2022-06-03 16:13
nergzd723hello everyone 👋... (full message at https://matrix.org/_matrix/media/r0/download/matrix.org/PduvwayKJCjksXVFVrdwlcyt)#asahi-re · 2022-05-22 09:07
j`eyholyspirit[m]: please use #asahi#asahi-re · 2022-05-22 09:07
holyspirit[m]can anyone help ive installed gentoo linux using asahi but after following the instructions whwen i reboot i have no keyboard access i do in the grub but not in the system#asahi-re · 2022-05-19 23:56
kode54holyspirit[m]: you have to hook it up to a USB-A to USB-C adapter and plug it into one of the C ports#asahi-re · 2022-05-19 19:21
AdryzzOLEDEdition[m]https://matrix.to/#/#_oftc_#asahi:matrix.org#asahi-re · 2022-05-19 19:19
holyspirit[m]how do you get mac mini m1 chip to allow keyboard to work on grub menu#asahi-re · 2022-05-19 19:16
holyspirit[m]can anyone help me to work out why my keyboard isnt responding in grub menu of asahi linux minimal isntall mac mini m1#asahi-re · 2022-05-19 16:52
haichenzhou[m]Sure, I will have a try.#asahi-re · 2022-05-19 16:51
_jannau_user space access is possible after setting bit 30 in SYS_APL_PMCR0_EL1. I only tested reads from SYS_APL_PMCx though#asahi-re · 2022-05-19 16:50
haichenzhou[m]registers a syscall, thus I can simply use inline assembly to get the value of certain system register. But as you show, there is already a driver with good functionalities. Could I just used the driver in userspace? (like what perf executable does?).#asahi-re · 2022-05-19 16:50
haichenzhou[m]I still don't understand how to access the driver or use my own kernel module from userspace. (Sorry I'm really a newbie into kernel). What I want to do is fuzzing all the event_id based on whether certain code is runned (either causing loads of cache hit or no cache hit), to determine which id is related to certain event. I'm not sure if that is doable and how to do that. My initial guess was that I could make a kernel module which#asahi-re · 2022-05-19 16:50
haichenzhou[m] * Thanks, it seems that the msr name i used was ARM's and Apple does have a different name. Now I successfully read the content in my kernel module.#asahi-re · 2022-05-19 16:45
haichenzhou[m]I still don't understand how to access the driver or use my own kernel module from userspace. (Sorry I'm really a newbie into kernel). What I want to do is fuzzing all the event_id based on whether certain code is runned (either causing loads of cache hit or no cache hit), to determine which id is related to certain event. I'm not sure if that is doable and how to do that. My initial guess was that I could make a kernel module which#asahi-re · 2022-05-19 16:45
haichenzhou[m]registers a syscall, thus I can simply use inline assembly to get the value of certain system register. But as you show, there is already a driver with good functionalities. Could I just used the driver in userspace? (like perf executable do?).#asahi-re · 2022-05-19 16:45
haichenzhou[m]Thanks, it seems that the msr name i used was ARM's and Apple does have a different name. Now I successfully read the content in my kernel module. #asahi-re · 2022-05-19 16:02
marcanhttps://oftc.irclog.whitequark.org/asahi/2021-11-16#30381586 <- this is how you use them from Linux userspace (via the kernel driver)#asahi-re · 2022-05-19 16:00
_jannau_the ARM performance registers have an userspace toggle as well, forcefully disabled in the kernel#asahi-re · 2022-05-19 15:58
_jannau_overview about the apple registers: https://github.com/AsahiLinux/docs/wiki/HW:ARM-System-Registers#performance-counter-registers#asahi-re · 2022-05-19 15:58
marcanthe Apple implementation does have a userspace access toggle, but I don't think our kernel driver currently supports it and either way it's completely incompatible with the ARM version, so you need custom userspace too at that point#asahi-re · 2022-05-19 15:57
_jannau_https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/perf/apple_m1_cpu_pmu.c#asahi-re · 2022-05-19 15:55
_jannau_a driver for it is already in the kernel#asahi-re · 2022-05-19 15:55
_jannau_haichenzhou[m]: not directly with an unmodified kernel. Apple doesn't have the ARM performance counters but their custome implementation#asahi-re · 2022-05-19 15:52
haichenzhou[m]I'm currently reversing the M1 performance counters. when I execute `mrs pmuserenr_el0, 0xf` to enable user space access to performance counter, there is an illegal instruction error. I'm not sure if that is because both msr and mrs instruction can only be used under R0. So what I need to do is using a kernel module to read the performance counters? #asahi-re · 2022-05-19 15:46
haichenzhou[m]is it possible to read the performance counters from user space on M1?#asahi-re · 2022-05-12 15:14
nraine[m]Oh heck, I thought I looked there already. Thanks so much#asahi-re · 2022-05-12 15:13
j`ey/usr/share/firmware/wifi/#asahi-re · 2022-05-12 15:12
nraine[m]Sorry#asahi-re · 2022-05-12 15:12
nraine[m]I was asking where it was stored on macOS#asahi-re · 2022-05-12 15:12
nraine[m]Do you mean it takes it from the macOS installation or from Asahi?#asahi-re · 2022-05-12 15:11
nraine[m]Wait#asahi-re · 2022-05-12 15:11
nraine[m]Oh, where on the FS? I couldn't find it#asahi-re · 2022-05-12 15:11
j`eyit just takes it from te file system#asahi-re · 2022-05-12 15:10
j`eynraine[m]: the asahi-installer puts it on the EFI partition#asahi-re · 2022-05-12 15:10
nraine[m] Hi, I don't know if this is the best place to ask this, but it's the only place I could think of. Does anyone know where the Wi-Fi firmware is stored? I'm an amateur security researcher and I can't seem to find it (it's looking like it might be stored online somewhere though?)#asahi-re · 2022-04-18 08:36
chadmedit's dog slow without filevault in the ignorelist thought ;) #asahi-re · 2022-04-18 08:36
chadmedSEP tracer still seems to work as intended#asahi-re · 2022-04-17 11:13
svenlast time i used it was a year ago or so so it might also need some changes#asahi-re · 2022-04-17 11:13
sven:>#asahi-re · 2022-04-17 11:13
chadmedooh yes the fun continues :D #asahi-re · 2022-04-17 11:12
svenit's mostly about that sks endpoint but you should at least get the data buffers for sbio as well#asahi-re · 2022-04-17 11:12
svenhttp://f.svpe.de/d48b3719f56e413e94ca40a6e9cbc8636577695c66054ef44093270998999449_trace_sep.py or maybe use that to start trace the SEP side as well ;)#asahi-re · 2022-04-17 11:09
chadmedoh well good to know i was (kind of) on the right track but theres probably no point in going any further without the SEP to talk to#asahi-re · 2022-04-17 11:08
chadmedalso handles power gating, command syncrhonisation, etc#asahi-re · 2022-04-17 11:08
chadmedthe SEP shim seems to do the actual encryption etc and this bigger one actually sends/receives the data i think #asahi-re · 2022-04-17 11:08
chadmedits interesting because theres actually two drivers for xnu, one does in fact just look like a shim for the SEP but the other is quite large and kind of does what ive been trying to do in my crappy little tracer and seems to handle the low level operation of the device#asahi-re · 2022-04-17 11:06
sven*shim#asahi-re · 2022-04-17 11:06
svenif I were to design this the xnu driver would just be a dumb shin that forwards messages between SEP and the sensor #asahi-re · 2022-04-17 11:05
sventhe command buffer probably directly comes from SEP#asahi-re · 2022-04-17 11:04
chadmedwell at least i kind of understand the format and the power on sequence but i think decrypting the command buffer and getting any useful data out of it is probably beyond me :( #asahi-re · 2022-04-17 11:04
chadmedyeah i was just confused as to why there was no discernible pattern in any of the data at all beyond the addresses it accesses and got gaslit into going on a goose chase