From b470e5091d8658c26f3ec4a29e53c9ce7bf50078 Mon Sep 17 00:00:00 2001 From: Julien Thierry Date: Thu, 14 Jan 2021 09:47:50 +0100 Subject: [PATCH] kpatch: Inform user when signal subcommand is unnecessary From Linux-5.1 onward, the sysfs interface to send signals to processes stalling livepatch transitions is replace by a peridical signal sent by the kernel. On such systems, the kpatch signal subcommand does nothing. Just let the user know they don't need to worry about it. Fixes: #1151 Signed-off-by: Julien Thierry --- kpatch/kpatch | 3 +++ man/kpatch.1 | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/kpatch/kpatch b/kpatch/kpatch index b35b742..ccb6914 100755 --- a/kpatch/kpatch +++ b/kpatch/kpatch @@ -237,6 +237,9 @@ signal_stalled_processes() { if [[ -e "/sys/kernel/livepatch/$module/signal" ]] ; then echo "signaling stalled process(es):" echo 1 > "/sys/kernel/livepatch/$module/signal" + else + warn "Livepatch process signaling is performed automatically on your system." + warn "Skipping manual process signaling." fi } diff --git a/man/kpatch.1 b/man/kpatch.1 index a30bdb7..51c9811 100644 --- a/man/kpatch.1 +++ b/man/kpatch.1 @@ -36,7 +36,10 @@ list list installed patch modules signal - signal/poke any process stalling the current patch transition + signal/poke any process stalling the current patch transition. + This is only useful on systems that have the sysfs livepatch signal interface. + On other systems, the signaling should be done automatically by the OS and + this subcommand is a no-op. version display the kpatch version