2021-06-19
01:20Emantor has quit [Quit: ZNC - http://znc.in]
01:20Emantor has joined #asahi
02:03skipwich has quit [Ping timeout: 480 seconds]
02:06bgb_ has joined #asahi
02:14skipwich has joined #asahi
02:23bgb_ has quit [Ping timeout: 480 seconds]
02:24bgb_ has joined #asahi
02:32bgb_ has quit [Ping timeout: 480 seconds]
02:43bgb_ has joined #asahi
02:49amwI am seeing 1TR access different from https://www.youtube.com/watch?v=ilnfvkgzVvg - now have to select partition and then login to get to Utilities/Terminal
02:49amwI believe it is the 1TR as I can run csrutil disable in there - perhaps new in latest Mac upgrade?
02:51bgb_ has quit [Ping timeout: 480 seconds]
02:52yuyichao has joined #asahi
02:55amwmarcan: Have added a basic help command to shell.py which I think is useful - see https://paste.debian.net/1201723/
02:55amwCan update it some more and submit a pull request if your interested - it's quite small change
02:57PhilippvK has joined #asahi
03:00phiologe has quit [Ping timeout: 480 seconds]
03:22bgb_ has joined #asahi
03:42marvin24_ has joined #asahi
03:46marvin24 has quit [Ping timeout: 480 seconds]
03:51bgb_ has quit [Ping timeout: 480 seconds]
04:15TheJollyRoger has quit [Remote host closed the connection]
04:15TheJollyRoger has joined #asahi
04:55VinDuv has joined #asahi
05:18amwWhen I run the linux.py tool on Linux my USB devices appear to disappear? i.e. m1n1 dis-appears but I am using marcan/dart/dev branch which tries to use dwc3 USB driver ? - See https://paste.debian.net/1201729/
05:18bgb_ has joined #asahi
05:24VinDuvI’m pretty sure the m1n1 USB devices will always disappear if you start Linux directly with linux.py; if Linux itselfs starts emulating a USB serial port it will reappear, but the transition won’t be seamless
05:27VinDuvYou should be able to run Linux under the hypervisor though; for this I think you need to run m1n1 under the hypervisor, then start linux.py with the hypervised m1n1
05:32amwok - otherwise according to https://github.com/AsahiLinux/m1n1#payloads you can concatnate additional payloads to m1n1 and then perhaps chainload that new m1n1?
05:33VinDuvyes, I was thinking about that, you should be able to run_guest a m1n1 with concatened payloads and the payload will run under HV
05:34bgb_ has quit [Ping timeout: 480 seconds]
05:40amwHmm plain chainload.py boots up the kernel which boots up to init, but the script times out waiting for serial port to appear. I guess kernel is run at EL2 not under m1n1
05:50amwHmm: Some success with original suggestion run_guest.py -S m1n1-payload.macho - I get a shell, kernel loaded, but all CPUs are started and I don't know where to jump to with kboot_boot?
06:08amwmarcan: Don't think so. Never used FileVault as far as I know - presume it's a MacOS thingie
06:08marcanI believe the security model is that if you have FileVault enabled, you need to authenticate before being allowed to run your own code
06:10amwAaah - your referencing my original 1TR questions! - I would have to boot back to MacOS and work out how to check if FileVault is set up to answer
06:12marcanVinDuv: the problem with running m1n1/linux under the HV is there is no vUART input support yet; been meaning to add that...
06:15marcanalso, if the devicetree is instantiating the USB device that the HV is using, that will go very wrong; there is no logic in m1n1 to disable that in the devtree if it's missing in the ADT, maybe that should be added
06:17amwSee https://paste.debian.net/1201733/ to see the run_guest.py output ttyACM0 followed by the linux kernel console serial output on ttyACM1
06:20amwNo it's some rubbish debug one I had from months back - just to prove I can run something (with out any input)
06:20amwNow I have linux under the HV I need a way to dump the registers and see where it is executing et cetera.
06:21marcanI've wanted to add a concat thing to set kernel commandlines more easily, something like just 'cmdline:' + commandline + '\0' as a payload format
06:23marcanthat's just because the m1n1 smp support is initialized with a one shot function that starts all CPUs
06:25marcanhv.ctx.elr is the guest return address (i.e. next instruction to be executed after returning)
06:26TheJollyRoger has quit [Remote host closed the connection]
06:26marcanhonestly it should just expose a gdb stub at some point, so you can just use standard tools to load symbols etc
06:26TheJollyRoger has joined #asahi
06:27amwI'll try to map it by hand to symbols - it looks like it has the same stack trace all the time - halt loop?
06:29amwI'm blown away by the power of this - all your commands work great : See https://paste.debian.net/1201734/
06:30marcanthough there is `step` which is a funny hack that just runs the guest for a few cycles (driven by a timer interrupt)
06:31marcan(it should eventually be a real single-step but I haven't gotten around to using the debug hardware yet)
06:33amwI can't seem to match up the stack trace addresses to System.map addresses - Perhaps they are all mapped up as it is the guest...
06:46marcanamw: try: hv.symbols = sorted((int(i[0], 16), i[2]) for i in (i.split() for i in open("System.map").readlines()))
06:55marcanI guess I should make the pac mask automatic by inspecting the pac registers at some point
07:29amwSorry - had to go drive some one - that didn't do anything though - https://paste.debian.net/?show=1201738;lines=0
07:51VinDuv(not really sure if it’s the right way to do it, but that should give you more correct addresses I think)
08:00amwhv.sym_offset=-0xa110000 , hv.tba.virt_base=0xfffffe001005c000 hv.macho.vmin=0xfffffe0007004000
08:09aleasto has joined #asahi
08:14VinDuvthis is definitely not the right way to do it, but if you set hv.sym_offset = hv.tba.virt_base = hv.macho.vmin = 0 and hv.pac_mask = 0xffff000000000000 I think you should get your symbols…
08:19m42uko has quit [Ping timeout: 480 seconds]
08:24amwVinDuv: Too many values to unpack Exception.... - see https://paste.debian.net/?show=1201741;lines=0
08:30m42uko has joined #asahi
08:36VinDuvIf I’m not mistaken your patch to addr() should not be needed now that you have symbols — if you revert it and hv._reloadme() it you should have a nicer output
08:37VinDuv(The bug is in sym(), it should always return a tuple — https://github.com/AsahiLinux/m1n1/blob/main/proxyclient/m1n1/hv.py#L426 should be return None, None)
09:21choozy has joined #asahi
09:39Andalu30 has joined #asahi
10:06crabbedhaloablut has quit []
10:08crabbedhaloablut has joined #asahi
10:15crabbedhaloablut has quit []
10:17crabbedhaloablut has joined #asahi
11:04VinDuv has quit [Quit: Leaving.]
11:10bgb_ has joined #asahi
11:33bgb_ has quit [Ping timeout: 480 seconds]
11:38VinDuv has joined #asahi
11:39VinDuv has left #asahi [#asahi]
11:39VinDuv has joined #asahi
11:44choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
11:48VinDuv has quit [Quit: ZNC 1.7.2+deb3 - https://znc.in]
11:48VinDuv has joined #asahi
12:26bgb_ has joined #asahi
12:39bgb_ has quit [Ping timeout: 480 seconds]
12:39Andalu30 has quit [Ping timeout: 480 seconds]
12:54minecrell has quit [Quit: :( ]
12:55minecrell has joined #asahi
12:55minecrell has quit []
13:20minecrell has joined #asahi
13:24bgb_ has joined #asahi
13:38yuyichao has quit [Quit: Konversation terminated!]
13:41Andalu30 has joined #asahi
13:51bgb_ has quit [Ping timeout: 480 seconds]
14:35TheJollyRoger has quit [Ping timeout: 480 seconds]
15:06roxfan has quit [Remote host closed the connection]
15:06bgb_ has joined #asahi
15:18roxfan has joined #asahi
15:19bgb_ has quit [Quit: WeeChat 3.0.1]
15:51bps has quit [Ping timeout: 480 seconds]
16:02berryRed has joined #asahi
16:05Andalu30 has quit [Ping timeout: 480 seconds]
16:58Andalu30 has joined #asahi
18:35eta has quit [Quit: Gateway shutdown]
18:38eta has joined #asahi
18:46berryRed has quit [Quit: Leaving]
19:13TheJollyRoger has joined #asahi
19:52aleasto has quit [Remote host closed the connection]
20:58amwEven using the load_system_map command it's still not working - https://paste.debian.net/1201789/
21:24ml00 has joined #asahi
21:29peaklight__ has quit [Read error: Connection reset by peer]
21:30ml00hi, shouldn't these be just if read: and if write:? because False does nothing - https://github.com/AsahiLinux/m1n1/blob/7c19dcc33fbc26dc0def1d1df3f6dad529bf08d4/proxyclient/m1n1/hv.py#L187
21:36j_eylooks like a mistake due to this refactoring https://github.com/AsahiLinux/m1n1/commit/990f5b3995f4b5594d0f27a2d8b34f8e3e50f971#diff-fae8ba41268463eb78bd26b34a696bc376c1910b51ad3a10ffe080bea4027631R184
21:40ml00 has quit [Remote host closed the connection]
21:41bps has joined #asahi
22:02Andalu30 has quit []
22:49bps has quit [Ping timeout: 480 seconds]
22:57bps has joined #asahi
23:03choozy has joined #asahi
23:07bps has quit [Remote host closed the connection]
23:19aleasto has joined #asahi
23:32choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
23:47aleasto has quit [Quit: Konversation terminated!]