Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Andrew Paniakin <apanyaki@amazon.com>
To: <stable@vger.kernel.org>
Cc: <luizcap@amazon.com>, <keescook@chromium.org>, <shuah@kernel.org>,
	<linux-kselftest@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<apanyaki@amazon.com>
Subject: [5.15] Please apply 'selftest/lkdtm: Skip stack-entropy test if lkdtm is not available'
Date: Fri, 17 Feb 2023 14:17:05 -0800	[thread overview]
Message-ID: <20230217221705.2525177-1-apanyaki@amazon.com> (raw)

commit 90091c367e74d5b58d9ebe979cc363f7468f58d3 upstream.

This patch fixes the stack-entropy.sh test to exit gracefully when the LKDTM is
not available. Test will hang otherwise as reported in [1].

Applicability of this fix to other LTS kernels:
- 4.14: No lkdtm selftest
- 4.19: No lkdtm selftest
- 5.4:  No lkdtm selftests
- 5.10: Inital selftest version introduced in 46d1a0f03d661 ("selftests/lkdtm:
  Add tests for LKDTM targets") is a single script which has the LKDTM
  availability check
- 6.1: Fix applied

This patch applies cleanly to stable-5.15 tree. Updated test was executed in
Qemu VM with different kernels:
- CONFIG_LKDTM not enabled. Test finished with status SKIP.
- CONFIG_LKDTM enabled. Test failed (but not hanged) with error 'Stack entropy
  is low'.
- CONFIG_LKDTM enabled and randomize_kstack_offset=on boot argument provided.
  Test succeed.

[1] https://lore.kernel.org/lkml/2836f48a-d4e2-7f00-f06c-9f556fbd6332@linuxfoundation.org

             reply	other threads:[~2023-02-17 22:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-17 22:17 Andrew Paniakin [this message]
2023-02-18 10:29 ` [5.15] Please apply 'selftest/lkdtm: Skip stack-entropy test if lkdtm is not available' Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230217221705.2525177-1-apanyaki@amazon.com \
    --to=apanyaki@amazon.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=luizcap@amazon.com \
    --cc=shuah@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox