* [PATCH]selftests/powerpc: skip tests for unavailable mitigations.
@ 2021-12-13 16:42 Sachin Sant
2021-12-14 4:27 ` Nageswara Sastry
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sachin Sant @ 2021-12-13 16:42 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Sachin Sant, Nageswara R Sastry
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>
---
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 ..."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]selftests/powerpc: skip tests for unavailable mitigations.
2021-12-13 16:42 [PATCH]selftests/powerpc: skip tests for unavailable mitigations Sachin Sant
@ 2021-12-14 4:27 ` Nageswara Sastry
2021-12-15 4:35 ` Russell Currey
2021-12-21 12:14 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Nageswara Sastry @ 2021-12-14 4:27 UTC (permalink / raw)
To: Sachin Sant, linuxppc-dev
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]selftests/powerpc: skip tests for unavailable mitigations.
2021-12-13 16:42 [PATCH]selftests/powerpc: skip tests for unavailable mitigations Sachin Sant
2021-12-14 4:27 ` Nageswara Sastry
@ 2021-12-15 4:35 ` Russell Currey
2021-12-21 12:14 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Russell Currey @ 2021-12-15 4:35 UTC (permalink / raw)
To: Sachin Sant, linuxppc-dev; +Cc: Nageswara R Sastry
On Mon, 2021-12-13 at 22:12 +0530, 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>
Reviewed-by: Russell Currey <ruscur@russell.cc>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]selftests/powerpc: skip tests for unavailable mitigations.
2021-12-13 16:42 [PATCH]selftests/powerpc: skip tests for unavailable mitigations Sachin Sant
2021-12-14 4:27 ` Nageswara Sastry
2021-12-15 4:35 ` Russell Currey
@ 2021-12-21 12:14 ` Michael Ellerman
2 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2021-12-21 12:14 UTC (permalink / raw)
To: linuxppc-dev, Sachin Sant; +Cc: Nageswara R Sastry
On Mon, 13 Dec 2021 22:12:23 +0530, 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
>
> [...]
Applied to powerpc/next.
[1/1] selftests/powerpc: skip tests for unavailable mitigations.
https://git.kernel.org/powerpc/c/18678591846d668649fbd4f87b4a4c470818d386
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-21 12:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-13 16:42 [PATCH]selftests/powerpc: skip tests for unavailable mitigations Sachin Sant
2021-12-14 4:27 ` Nageswara Sastry
2021-12-15 4:35 ` Russell Currey
2021-12-21 12:14 ` Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.