On Fri, Oct 08, 2021 at 04:55:04PM -0700, Kees Cook wrote:
This makes sure that wchan contains a sensible symbol when a process is blocked. Specifically this calls the sleep() syscall, and expects the architecture to have called schedule() from a function that has "sleep" somewhere in its name. For example, on the architectures I tested (x86_64, arm64, arm, mips, and powerpc) this is "hrtimer_nanosleep":
$ tools/testing/selftests/proc/proc-pid-wchan ok: found 'sleep' in wchan 'hrtimer_nanosleep'
Cc: Peter Zijlstra peterz@infradead.org Cc: Mark Rutland mark.rutland@arm.com Cc: Shuah Khan shuah@kernel.org Cc: Alexey Dobriyan adobriyan@gmail.com Cc: linux-kselftest@vger.kernel.org Signed-off-by: Kees Cook keescook@chromium.org
Friendly ping.
Hi Peter,
Can you add this to the wchan series, please? This should help wchan from regressing in the future, and allow us to notice if the depth accidentally changes, like Mark saw.
I'd like to make sure we have a regression test for this. Will you add this to the wchan series please?
-Kees