Thread (10 messages) 10 messages, 4 authors, 2021-10-22

Re: [PATCH] selftests: proc: Make sure wchan works when it exists

From: Kees Cook <hidden>
Date: 2021-10-21 17:09:53
Also in: linux-fsdevel, linux-hardening, linux-kselftest, lkml

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 <redacted>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: Kees Cook <redacted>
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

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help