From: Nageswara Sastry <rnsastry@linux.ibm.com>
To: Sachin Sant <sachinp@linux.vnet.ibm.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH]selftests/powerpc: skip tests for unavailable mitigations.
Date: Tue, 14 Dec 2021 09:57:07 +0530 [thread overview]
Message-ID: <745575be-382c-69bd-db6b-40f5d5a7ea5b@linux.ibm.com> (raw)
In-Reply-To: <163941374362.36967.18016981579099073379.sendpatchset@1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa>
On 13/12/21 10:12 pm, Sachin Sant wrote:
> Mitigation patching test iterates over a set of mitigations irrespective
> of whether a certain mitigation is supported/available in the kernel.
> This causes following messages on a kernel where some mitigations
> are unavailable:
>
> Spawned threads enabling/disabling mitigations ...
> cat: entry_flush: No such file or directory
> cat: uaccess_flush: No such file or directory
> Waiting for timeout ...
> OK
>
> This patch adds a check for available mitigations in the kernel.
>
> Reported-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
> Signed-off-by: Sachin Sant <sachinp@linux.vnet.ibm.com>
Tested-by: Nageswara R Sastry <rnsastry@linux.ibm.com>
> ---
> diff -Naurp aa/tools/testing/selftests/powerpc/security/mitigation-patching.sh bb/tools/testing/selftests/powerpc/security/mitigation-patching.sh
> --- aa/tools/testing/selftests/powerpc/security/mitigation-patching.sh 2021-12-13 10:17:05.714127154 -0500
> +++ bb/tools/testing/selftests/powerpc/security/mitigation-patching.sh 2021-12-13 10:19:32.575315913 -0500
> @@ -44,7 +44,10 @@ mitigations="barrier_nospec stf_barrier
>
> for m in $mitigations
> do
> - do_one "$m" &
> + if [[ -f /sys/kernel/debug/powerpc/$m ]]
> + then
> + do_one "$m" &
> + fi
> done
>
> echo "Spawned threads enabling/disabling mitigations ..."
--
Thanks and Regards
R.Nageswara Sastry
next prev parent reply other threads:[~2021-12-14 4:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 16:42 [PATCH]selftests/powerpc: skip tests for unavailable mitigations Sachin Sant
2021-12-14 4:27 ` Nageswara Sastry [this message]
2021-12-15 4:35 ` Russell Currey
2021-12-21 12:14 ` Michael Ellerman
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=745575be-382c-69bd-db6b-40f5d5a7ea5b@linux.ibm.com \
--to=rnsastry@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sachinp@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).