marcan changed the topic of #asahi to: Asahi Linux: porting Linux to Apple Silicon macs | General project discussion | GitHub: https://alx.sh/g | Wiki: https://alx.sh/w | Topics: #asahi-dev #asahi-re #asahi-gpu #asahi-stream #asahi-offtopic | Keep things on topic | Logs: https://alx.sh/l/asahi
artemist has quit [Remote host closed the connection]
artemist has joined #asahi
tylo has joined #asahi
tylo has quit [Quit: WeeChat 3.3]
___nick___ has quit []
___nick___ has joined #asahi
tylo has joined #asahi
<marcan> silly thing I was thinking about yesteday: is it possible to get complete stack traces on arm64 without function info?
<marcan> for 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
<marcan> and... I can't think of a way to know which it is
<marcan> maybe, as long as symbols are available, just check if lr is in the current function; if it is, skip it, otherwise display it
<phire> Dpm
bgb has joined #asahi
<phire> *Don't quote me on this, but I think gdb was doing it somehow with some rule/hurristic
<phire> and I've been meaning to look into how I did it, so I could replicate the stack layout it was expecting
<phire> There might be a convention in the ABI to just always compulsivly push LR at the beginning of the function
bgb_ has joined #asahi
tylo has quit [Quit: WeeChat 3.3]
PhilippvK has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
phiologe has quit [Ping timeout: 480 seconds]
marvin24 has joined #asahi
marvin24_ has quit [Ping timeout: 480 seconds]
gladiac is now known as Guest623
gladiac has joined #asahi
psykose has quit [Ping timeout: 480 seconds]
psykose has joined #asahi
Guest623 has quit [Ping timeout: 480 seconds]
bgb_ has quit [Ping timeout: 480 seconds]
bgb_ has joined #asahi
bgb_ has quit [Ping timeout: 480 seconds]
bgb_ has joined #asahi
bgb_ has quit [Ping timeout: 480 seconds]
<marcan> phire: not the case in linux at least, I think
bgb_ has joined #asahi
<dougall> yeah, 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)
<dougall> (as always, the devil is in the recursion and tail-call elimination)
bgb_ has quit [Ping timeout: 480 seconds]
chadmed has quit [Quit: Konversation terminated!]
<marcan> yeah, with symbols and additional metadata it's much easier, but the hv has to be able to show backtraces without symbols too :)
bgb_ has joined #asahi
<sorear> is there anything that makes the hv version of this problem materially different from the kernel's relatively mature version of the unwinder problem?
<marcan> the kernel knows itself and has its own symbol metadata
<marcan> the hv has to run on anything, including the guest running userspace code etc
<sorear> i 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
<marcan> I don't know about that
bgb_ has quit [Ping timeout: 480 seconds]
bgb_ has joined #asahi
suricato has joined #asahi
suricato_ has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
tylo has joined #asahi
bgb_ has quit [Ping timeout: 480 seconds]
aleasto has joined #asahi
<maz> sven: yup, that fixes it. thanks!
bingoChecker has joined #asahi
povik_ has joined #asahi
povik has quit [Remote host closed the connection]
povik_ is now known as povik
<maz> sven: though I don't grok why you need to allocate a whole new master_cfg.
<sven> possibly because i wrote that after a few beers yesterday :)
<maz> sven: I reduced it to https://paste.debian.net/1212805/ which still works fine. am I missing something?
<maz> sven: ah, beers definitely have priority!
<sven> yeah, i think your version should be fine. no need for the extra allocation
bgb_ has joined #asahi
<sven> hrm... 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
<maz> let me give KASAN a go.
bgb has quit [Ping timeout: 480 seconds]
<maz> sven: actually, you are right. the device goes away much earlier: https://paste.debian.net/1212807/
<maz> so either we keep your current approach of shadowing the config, or we move the sid2group release to apple_dart_release_device().
<sven> i 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
<maz> yup. 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.
<sven> oh, true
robinp_ has joined #asahi
robinp has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb_ has quit [Ping timeout: 480 seconds]
<kettenis> maz: we can change that config if we desire
<kettenis> although I don't know if the hardware actually passes the function in the RID
bgb_ has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
frode_0xa has quit [Quit: leaving]
<maz> kettenis: 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).
<null> marcan: 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
<null> ... 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
<null> ... since using DWARF is considered out of the question within the kernel
<null> x86 has an unwinder that just dumps addrs on the stack, but for arm64 we always walk the chain of frame records
bgb has joined #asahi
bgb_ has quit [Ping timeout: 480 seconds]
tomtastic_ has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
tomtastic has quit [Ping timeout: 480 seconds]
povik has quit [Remote host closed the connection]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
aleasto has quit [Quit: Konversation terminated!]
yuyichao has quit [Ping timeout: 480 seconds]
aleasto has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
<alyssa> j_ey: in case you missed it,
<alyssa> git format-patch HEAD~1
<alyssa> ~/scripts/checkpath.pl --fix *.patch
<alyssa> ~/scripts/checkpatch.pl --fix *.patch
<alyssa> git reset --hard HEAD~1
<alyssa> git am *.patch-fix
<alyssa> will take care of all the spacing nits
aleasto has quit [Quit: Konversation terminated!]
<alyssa> (and is a good idea to do whenever cherrypicking corellium commits..)
yuyichao has joined #asahi
aleasto has joined #asahi
yuyichao has quit []
yuyichao has joined #asahi
chadmed has joined #asahi
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
aleasto has quit [Quit: Konversation terminated!]
aleasto has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
aleasto has quit [Remote host closed the connection]
nsklaus_ has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
nsklaus has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
jbowen has joined #asahi
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
aleasto has joined #asahi
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
<j_ey> alyssa: 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 :)
bgb has joined #asahi
<alyssa> Alas
bgb has quit [Ping timeout: 480 seconds]
chadmed has quit [Remote host closed the connection]
chadmed has joined #asahi
bgb has joined #asahi
yuyichao has quit [Ping timeout: 480 seconds]
bingoChecker has quit [Quit: Leaving]
bgb has quit [Ping timeout: 480 seconds]
<j_ey> maz: I think I'll need a bit of help with "You really should have one context per mux" (not right now though)
<maz> j_ey: sure. I'll sketch something out for you.
<j_ey> maz: awesome
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
<marcan> null: figures, good to know
<marcan> I'm thinking of always reporting LR in parentheses or so
<null> Sounds good -- my plan is to append something like (?) when it's the LR at an exception boundary
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
povik has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
<marcan> yeah, makes sense
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
quarkyalice_ has joined #asahi
quarkyalice_ has quit []
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
X-Scale` has joined #asahi
X-Scale has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
erincandescent has quit [Remote host closed the connection]
erincandescent has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
aleasto has quit [Remote host closed the connection]
jbowen has quit [Quit: leaving]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
radex has quit [Quit: WeeChat 3.2]
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
yuyichao has joined #asahi
bgb has joined #asahi
<j_ey> maz: re: pctl->irq_chip.name, how does that work with name clashes?
<j_ey> (you said to use GPIO, but theres 2 (or more) pinctrl devices)
bgb has quit [Ping timeout: 480 seconds]
povik has quit [Quit: Page closed]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
tylo has left #asahi [WeeChat 3.3]
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
<alyssa> more detailed than last time
<alyssa> havent checked if it reproduces, im supposed to be doing homework
<alyssa> oh... new bug report technically
<alyssa> the dwc3 WARN is the same but the ep0out stuff is new
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi
bgb has quit [Ping timeout: 480 seconds]
bgb has joined #asahi