#
…

2021-09-22

00:21artemist has quit [Remote host closed the connection]
00:21artemist has joined #asahi
01:06tylo has joined #asahi
01:13tylo has quit [Quit: WeeChat 3.3]
01:17___nick___ has quit []
01:19___nick___ has joined #asahi
01:25tylo has joined #asahi
02:14marcansilly thing I was thinking about yesteday: is it possible to get complete stack traces on arm64 without function info?
02:14marcanfor the first frame, if it's a leaf function with no stack frame you need to use lr for the next entry, but if it's a non-leaf function then lr can be garbage and you need to go straight to the stack frame
02:15marcanand... I can't think of a way to know which it is
02:20marcanmaybe, as long as symbols are available, just check if lr is in the current function; if it is, skip it, otherwise display it
02:22bgb has joined #asahi
02:22phire*Don't quote me on this, but I think gdb was doing it somehow with some rule/hurristic
02:22phireand I've been meaning to look into how I did it, so I could replicate the stack layout it was expecting
02:25phireThere might be a convention in the ABI to just always compulsivly push LR at the beginning of the function
02:44bgb_ has joined #asahi
02:45tylo has quit [Quit: WeeChat 3.3]
02:45PhilippvK has joined #asahi
02:48bgb has quit [Ping timeout: 480 seconds]
02:48phiologe has quit [Ping timeout: 480 seconds]
03:15marvin24 has joined #asahi
03:18marvin24_ has quit [Ping timeout: 480 seconds]
04:04gladiac is now known as Guest623
04:04gladiac has joined #asahi
04:06psykose has quit [Ping timeout: 480 seconds]
04:07psykose has joined #asahi
04:10Guest623 has quit [Ping timeout: 480 seconds]
04:26bgb_ has quit [Ping timeout: 480 seconds]
04:35bgb_ has joined #asahi
04:53bgb_ has quit [Ping timeout: 480 seconds]
05:02bgb_ has joined #asahi
05:20bgb_ has quit [Ping timeout: 480 seconds]
05:23marcanphire: not the case in linux at least, I think
05:28bgb_ has joined #asahi
05:33dougallyeah, I don't think there's a right answer, but lr should be in within the current function or equal to the return address in the first frame in the cases you want to skip it. (LC_FUNCTION_STARTS is helpful for that kind of heuristic on Mach-O files, and you could maybe make some assumptions when the call instruction at lr-4 isn't indirect too)
05:35dougall(as always, the devil is in the recursion and tail-call elimination)
05:45bgb_ has quit [Ping timeout: 480 seconds]
05:49chadmed has quit [Quit: Konversation terminated!]
05:53marcanyeah, with symbols and additional metadata it's much easier, but the hv has to be able to show backtraces without symbols too :)
05:54bgb_ has joined #asahi
05:55sorearis there anything that makes the hv version of this problem materially different from the kernel's relatively mature version of the unwinder problem?
05:56marcanthe kernel knows itself and has its own symbol metadata
05:56marcanthe hv has to run on anything, including the guest running userspace code etc
05:58soreari was under the impression there was also a kernel backtracer which didn't use that and just printed all of the code addresses in the stack, which if it were possible to do much better than that on optimized code without symbols someone would have done so already
06:01marcanI don't know about that
06:04bgb_ has quit [Ping timeout: 480 seconds]
06:13bgb_ has joined #asahi
06:17suricato has joined #asahi
06:18suricato_ has quit [Ping timeout: 480 seconds]
06:24bgb has joined #asahi
06:29tylo has joined #asahi
06:30bgb_ has quit [Ping timeout: 480 seconds]
07:54aleasto has joined #asahi
08:03mazsven: yup, that fixes it. thanks!
08:17bingoChecker has joined #asahi
08:19povik_ has joined #asahi
08:19povik has quit [Remote host closed the connection]
08:21povik_ is now known as povik
08:31mazsven: though I don't grok why you need to allocate a whole new master_cfg.
08:32svenpossibly because i wrote that after a few beers yesterday :)
08:32mazsven: I reduced it to https://paste.debian.net/1212805/ which still works fine. am I missing something?
08:32mazsven: ah, beers definitely have priority!
08:33svenyeah, i think your version should be fine. no need for the extra allocation
08:35bgb_ has joined #asahi
08:37svenhrm... though i'll have to take a look later to see if the iommu api at some point first releases the device and then removes the group
08:38mazlet me give KASAN a go.
08:40bgb has quit [Ping timeout: 480 seconds]
08:47mazsven: actually, you are right. the device goes away much earlier: https://paste.debian.net/1212807/
08:55mazso either we keep your current approach of shadowing the config, or we move the sid2group release to apple_dart_release_device().
09:19sveni think we have to keep shadowing the config because we could have multiple devices in a single group and i guess once thunderbolt works (one of these days....) we can get situations where only a single device is removed
09:30mazyup. even without TB, by the way. the radios are using two function from the same PCIe endpoint, and will share a single group with the current config.
09:30svenoh, true
10:03robinp_ has joined #asahi
10:11robinp has quit [Ping timeout: 480 seconds]
10:25bgb has joined #asahi
10:26bgb_ has quit [Ping timeout: 480 seconds]
10:51kettenismaz: we can change that config if we desire
10:52kettenisalthough I don't know if the hardware actually passes the function in the RID
11:03bgb_ has joined #asahi
11:07bgb has quit [Ping timeout: 480 seconds]
11:48frode_0xa has quit [Quit: leaving]
12:10mazkettenis: I really hope it does. Otherwise, distinguishing between VFs is going to be impossible (once TB is up and that I can finally plug an SR-IOV device there).
12:24nullmarcan: for the stack trace thing (for linux at least), it's only possible to reliably unwind at function-call boundaries, and we over-estimate at exception boundaries (always reporting the LR, even if that's bogus). Note that the LR can be used as a scratch register transisetnly (e.g. for ADR LR <func>; BLR LR), so there's no 100% reliable way to know whether it's valid without knowledge of the binary
12:25null... this is something I'd like to fix, but we either need toolchain help (restricting codegen or generating metadata) or some binary parsing to genetate some metadata
12:25null... since using DWARF is considered out of the question within the kernel
12:27nullx86 has an unwinder that just dumps addrs on the stack, but for arm64 we always walk the chain of frame records
12:34bgb has joined #asahi
12:38bgb_ has quit [Ping timeout: 480 seconds]
12:41tomtastic_ has joined #asahi
12:43bgb has quit [Ping timeout: 480 seconds]
12:44tomtastic has quit [Ping timeout: 480 seconds]
12:49povik has quit [Remote host closed the connection]
12:54bgb has joined #asahi
13:03bgb has quit [Ping timeout: 480 seconds]
13:12bgb has joined #asahi
13:13aleasto has quit [Quit: Konversation terminated!]
13:14yuyichao has quit [Ping timeout: 480 seconds]
13:14aleasto has joined #asahi
13:21bgb has quit [Ping timeout: 480 seconds]
13:23alyssaj_ey: in case you missed it,
13:23alyssagit format-patch HEAD~1
13:23alyssa~/scripts/checkpath.pl --fix *.patch
13:23alyssa~/scripts/checkpatch.pl --fix *.patch
13:23alyssagit reset --hard HEAD~1
13:23alyssagit am *.patch-fix
13:23alyssawill take care of all the spacing nits
13:23aleasto has quit [Quit: Konversation terminated!]
13:23alyssa(and is a good idea to do whenever cherrypicking corellium commits..)
13:24yuyichao has joined #asahi
13:25aleasto has joined #asahi
13:26yuyichao has quit []
13:30yuyichao has joined #asahi
13:31chadmed has joined #asahi
13:31bgb has joined #asahi
13:40bgb has quit [Ping timeout: 480 seconds]
13:48bgb has joined #asahi
13:48aleasto has quit [Quit: Konversation terminated!]
13:48aleasto has joined #asahi
13:59bgb has quit [Ping timeout: 480 seconds]
14:09bgb has joined #asahi
14:13aleasto has quit [Remote host closed the connection]
14:18nsklaus_ has joined #asahi
14:18bgb has quit [Ping timeout: 480 seconds]
14:23nsklaus has quit [Ping timeout: 480 seconds]
14:27bgb has joined #asahi
14:36bgb has quit [Ping timeout: 480 seconds]
14:41jbowen has joined #asahi
14:44bgb has joined #asahi
14:53bgb has quit [Ping timeout: 480 seconds]
15:01bgb has joined #asahi
15:10bgb has quit [Ping timeout: 480 seconds]
15:20bgb has joined #asahi
15:29bgb has quit [Ping timeout: 480 seconds]
15:37aleasto has joined #asahi
15:37bgb has joined #asahi
15:46bgb has quit [Ping timeout: 480 seconds]
15:47j_eyalyssa: yeah, I should have done that *right* after I cherry-picked. I realised too late. "I'll just do it before I send it out" I thought.. and then forgot :)
15:54bgb has joined #asahi
16:04bgb has quit [Ping timeout: 480 seconds]
16:08chadmed has quit [Remote host closed the connection]
16:08chadmed has joined #asahi
16:11bgb has joined #asahi
16:15yuyichao has quit [Ping timeout: 480 seconds]
16:16bingoChecker has quit [Quit: Leaving]
16:20bgb has quit [Ping timeout: 480 seconds]
16:22j_eymaz: I think I'll need a bit of help with "You really should have one context per mux" (not right now though)
16:23mazj_ey: sure. I'll sketch something out for you.
16:23j_eymaz: awesome
16:29bgb has joined #asahi
16:38bgb has quit [Ping timeout: 480 seconds]
16:46bgb has joined #asahi
16:55bgb has quit [Ping timeout: 480 seconds]
17:05bgb has joined #asahi
17:14bgb has quit [Ping timeout: 480 seconds]
17:16marcannull: figures, good to know
17:16marcanI'm thinking of always reporting LR in parentheses or so
17:22nullSounds good -- my plan is to append something like (?) when it's the LR at an exception boundary
17:23bgb has joined #asahi
17:46bgb has quit [Ping timeout: 480 seconds]
17:55bgb has joined #asahi
18:00povik has joined #asahi
18:04bgb has quit [Ping timeout: 480 seconds]
18:09marcanyeah, makes sense
18:14bgb has joined #asahi
18:23bgb has quit [Ping timeout: 480 seconds]
18:31bgb has joined #asahi
18:37quarkyalice_ has joined #asahi
18:37quarkyalice_ has quit []
18:40bgb has quit [Ping timeout: 480 seconds]
18:48bgb has joined #asahi
18:57bgb has quit [Ping timeout: 480 seconds]
18:59X-Scale` has joined #asahi
19:05X-Scale has quit [Ping timeout: 480 seconds]
19:05bgb has joined #asahi
19:08erincandescent has quit [Remote host closed the connection]
19:09erincandescent has joined #asahi
19:14bgb has quit [Ping timeout: 480 seconds]
19:22bgb has joined #asahi
19:31bgb has quit [Ping timeout: 480 seconds]
19:33aleasto has quit [Remote host closed the connection]
19:38jbowen has quit [Quit: leaving]
19:40bgb has joined #asahi
19:49bgb has quit [Ping timeout: 480 seconds]
19:59bgb has joined #asahi
20:08bgb has quit [Ping timeout: 480 seconds]
20:17bgb has joined #asahi
20:40bgb has quit [Ping timeout: 480 seconds]
20:49bgb has joined #asahi
20:58bgb has quit [Ping timeout: 480 seconds]
21:06bgb has joined #asahi
21:15bgb has quit [Ping timeout: 480 seconds]
21:24bgb has joined #asahi
21:33radex has quit [Quit: WeeChat 3.2]
21:47bgb has quit [Ping timeout: 480 seconds]
21:56bgb has joined #asahi
22:06bgb has quit [Ping timeout: 480 seconds]
22:12yuyichao has joined #asahi
22:14bgb has joined #asahi
22:30j_eymaz: re: pctl->irq_chip.name, how does that work with name clashes?
22:30j_ey(you said to use GPIO, but theres 2 (or more) pinctrl devices)
22:37bgb has quit [Ping timeout: 480 seconds]
22:40povik has quit [Quit: Page closed]
22:47bgb has joined #asahi
22:56bgb has quit [Ping timeout: 480 seconds]
23:05bgb has joined #asahi
23:07tylo has left #asahi [WeeChat 3.3]
23:14bgb has quit [Ping timeout: 480 seconds]
23:22bgb has joined #asahi
23:28alyssamore detailed than last time
23:28alyssahavent checked if it reproduces, im supposed to be doing homework
23:29alyssaoh... new bug report technically
23:29alyssathe dwc3 WARN is the same but the ep0out stuff is new
23:31bgb has quit [Ping timeout: 480 seconds]
23:42bgb has joined #asahi
23:51bgb has quit [Ping timeout: 480 seconds]
23:59bgb has joined #asahi
…