This is a note to let you know that I've just added the patch titled selftests/lkdtm: Use "comm" instead of "diff" for dmesg to the 5.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: selftests-lkdtm-use-comm-instead-of-diff-for-dmesg.patch and it can be found in the queue-5.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 39102456467aa3166d49cf2be539e99a5c9e8eda Author: Kees Cook <keescook@xxxxxxxxxxxx> Date: Wed Sep 9 14:17:00 2020 -0700 selftests/lkdtm: Use "comm" instead of "diff" for dmesg [ Upstream commit d00451c8118f8f7ab8e057bc6ee2f8b7d70b6a1c ] Instead of full GNU diff (which smaller boot environments may not have), use "comm" which is more available. Reported-by: Naresh Kamboju <naresh.kamboju@xxxxxxxxxx> Cc: linux-kselftest@xxxxxxxxxxxxxxx Fixes: f131d9edc29d ("selftests/lkdtm: Don't clear dmesg when running tests") Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx> Acked-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20200909211700.2399399-1-keescook@xxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/tools/testing/selftests/lkdtm/run.sh b/tools/testing/selftests/lkdtm/run.sh index 8383eb89d88a9..bb7a1775307b8 100755 --- a/tools/testing/selftests/lkdtm/run.sh +++ b/tools/testing/selftests/lkdtm/run.sh @@ -82,7 +82,7 @@ dmesg > "$DMESG" ($SHELL -c 'cat <(echo '"$test"') >'"$TRIGGER" 2>/dev/null) || true # Record and dump the results -dmesg | diff --changed-group-format='%>' --unchanged-group-format='' "$DMESG" - > "$LOG" || true +dmesg | comm --nocheck-order -13 "$DMESG" - > "$LOG" || true cat "$LOG" # Check for expected output