#asahi-gpu · 2023-07-29 20:06
alyssaprobably best to bring this up in #dri-devel given multiple affected drivers#asahi-gpu · 2023-07-29 20:06
alyssaso v3d (at least) is probably also affected#asahi-gpu · 2023-07-29 20:05
alyssaotoh, v3d does not do that#asahi-gpu · 2023-07-29 20:05
alyssaradeonsi too#asahi-gpu · 2023-07-29 20:05
alyssathat is probably more correct anyway, maybe we are fundamentally misusing gallium by keeping the dangling pointer#asahi-gpu · 2023-07-29 20:04
alyssajannau: iris doesn't have this bug, because it uploads the user buf during set_constant_buffer instead of deferring to draw timw#asahi-gpu · 2023-07-29 20:03
alyssayeah, this looks like potentially a mesa/st bug, leaving a dangling pointer#asahi-gpu · 2023-07-29 20:02
alyssa> I gather the problem is that nothing calls agx_set_constant_buffer(..., NULL); when the program is deleted#asahi-gpu · 2023-07-29 20:02
jannaubreaks if dEQP-GLES2.functional.shaders.swizzles.vector_swizzles.mediump_vec4_wz_vertex is before it in the case list#asahi-gpu · 2023-07-29 20:01
alyssajannau: that one's spicy#asahi-gpu · 2023-07-29 19:57
jannautest passes if run standalone, but fails using deqp-runner's case list#asahi-gpu · 2023-07-29 19:04
jannauI gather the problem is that nothing calls agx_set_constant_buffer(..., NULL); when the program is deleted but I don't see what's supposed to do that in the _mesa_delete_program call path#asahi-gpu · 2023-07-29 19:02
jannauthis is probably easier with mesa internals knowledge: https://gist.github.com/jannau/7a65b5baba0b77c9ff7e924c659666f1#asahi-gpu · 2023-07-29 18:37
jannauand there is a use after free in dEQP-ES2#asahi-gpu · 2023-07-29 18:29
alyssaI guess panic-on-overflow would be nice for debug builds but otherwise shrug#asahi-gpu · 2023-07-29 18:28
alyssayeah#asahi-gpu · 2023-07-29 18:22
i509vcbUnless you are dealing with a bunch of overflow stuff that something like u32::overflowing_add would help with, I don't see why it would really help. I do recall mesa has some macros to handle that of course#asahi-gpu · 2023-07-29 18:21
alyssa(otoh it would be totally straightforward to riir since it's just math)#asahi-gpu · 2023-07-29 18:20
alyssait's basically just math#asahi-gpu · 2023-07-29 18:20
alyssasomething like src/asahi/layout is very unlikely to have bugs that Rust would help with#asahi-gpu · 2023-07-29 18:20
alyssaso the hardest to riir#asahi-gpu · 2023-07-29 18:20
alyssawhich is firmly tied up with common gallium or vulkan stuff#asahi-gpu · 2023-07-29 18:20
alyssai509vcb: tbh, the scariest code is the memory manegement, etc#asahi-gpu · 2023-07-29 17:41
jannauany ideas why this didn't cause problems so far?#asahi-gpu · 2023-07-29 17:35
jannauhttps://gitlab.freedesktop.org/asahi/mesa/-/merge_requests/115 I'll look at the memleaks later#asahi-gpu · 2023-07-29 17:25
jannauyes, looks much better with ASAN_OPTIONS=detect_leaks=0, Pass: 2067 and no fails#asahi-gpu · 2023-07-29 17:20
i509vcbAlthough that's not very large anyways...#asahi-gpu · 2023-07-29 17:20
i509vcbI wonder if there is any good reason riir the asahi/lib stuff ?#asahi-gpu · 2023-07-29 17:19
jannaumaybe consistent memleaks#asahi-gpu · 2023-07-29 17:18
jannau"Pass: 0, Fail: 3760, ..." :(#asahi-gpu · 2023-07-29 17:17
jannauevery deqp-egl tests seems to fail under asan#asahi-gpu · 2023-07-29 17:10
jannauthe code was that way since over a year though#asahi-gpu · 2023-07-29 17:06
jannauyes, that's easily fixed, still issues though#asahi-gpu · 2023-07-29 17:02
jannauI'll update to asahi-20230725 to see if it still reproduces#asahi-gpu · 2023-07-29 17:01
jannauasahi-20230706 has according to asan a stack overflow in agx_link_varyings_vs_fs#asahi-gpu · 2023-07-29 16:18
alyssapffheh#asahi-gpu · 2023-07-29 14:07
rosefromthedeadoh no#asahi-gpu · 2023-07-29 14:05
alyssapffheh#asahi-gpu · 2023-07-29 14:04
ella-0it was a mistake for me to start agxv in C#asahi-gpu · 2023-07-29 13:58
alyssaim just going to drop https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20298 here#asahi-gpu · 2023-07-29 13:58
alyssa>:D#asahi-gpu · 2023-07-29 13:54
jannauso rewriting mesa in rust it is ;)#asahi-gpu · 2023-07-29 13:53
alyssahonestly IDK#asahi-gpu · 2023-07-29 13:52
jannauwhat's the best way to track that? compile mesa with asan? running firefox under valgrind has too much noise#asahi-gpu · 2023-07-29 13:46
alyssai agree with lina, that backtrace looks like a uaf#asahi-gpu · 2023-07-29 13:44
alyssaclearly we need to rewrite mesa in rust#asahi-gpu · 2023-07-29 11:32
Retr0idfwiw I spend most of my waking hours inside of firefox and I've had no issues on 6.3#asahi-gpu · 2023-07-29 10:19
jannauit's a little suspicious though that it has only be reported in #asahi-alt with asahi-6.4* and not by asahilinux users who are still on asahi-6.3*#asahi-gpu · 2023-07-29 10:16
linaAlso kernel changes cannot cause that kind of userspace issue#asahi-gpu · 2023-07-29 10:16
linaYeah that makes no sense