lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 30 May 2019 08:16:52 -0700
From:   "Paul E. McKenney" <>
        "Paul E . McKenney" <>
Subject: [PATCH tip/core/rcu 01/21] rcutorture: Select from only online CPUs

From: "Joel Fernandes (Google)" <>

The rcutorture script selects a random CPU but does not check
if it is offline or online. This leads to taskset errors many times. On
my machine, hyper threading is disabled so half the cores are offline
causing taskset errors a lot of times. Let us fix this by checking from
only the online CPUs on the system.

Signed-off-by: Joel Fernandes (Google) <>
Signed-off-by: Paul E. McKenney <>
 tools/testing/selftests/rcutorture/bin/ | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/ b/tools/testing/selftests/rcutorture/bin/
index 435b60933985..81c6e6ab5d83 100755
--- a/tools/testing/selftests/rcutorture/bin/
+++ b/tools/testing/selftests/rcutorture/bin/
@@ -34,10 +34,11 @@ do
 		exit 0;
-	# Set affinity to randomly selected CPU
-	cpus=`ls /sys/devices/system/cpu/*/online |
+	# Set affinity to randomly selected online CPU
+	cpus=`grep 1 /sys/devices/system/cpu/*/online |
 		sed -e 's,/[^/]*$,,' -e 's/^[^0-9]*//' |
 		grep -v '^0*$'`
 	cpumask=`awk -v cpus="$cpus" -v me=$me -v n=$n 'BEGIN {
 		srand(n + me + systime());
 		ncpus = split(cpus, ca);

Powered by blists - more mailing lists