On Sun Oct 16 22:08:54 2022 +0000, **** wrote:
Zebediah Figura replied on the mailing list:
From "[PATCH 13/13] ntdll: Tweak KeUserModeCallback to please Valgrind and GDB." On 10/16/22 12:24, Rémi Bernon wrote: > This is a hack, but valgrind heuristics are having a hard time with > the stack manipulation around here. This silents some annoying reports. What heuristics? Can they be fixed on the valgrind side, and if not, why? (And if not, shouldn't we add comments in the ntdll side so this doesn't get broken again?)
In the same way as for the kernel stack, and even with separate stacks, it either misses some stack pointer changes and considers the accessed memory as invalid, or doesn't like accesses from/to the other, inactive stack pointer somehow.
`KeUserModeCallback` is quite broken regarding unwinding anyway, even like this, though this improves a bit the experience in GDB.