* [PATCH tip/core/rcu 0/3] Torture updates for 3.17
@ 2014-07-07 22:44 Paul E. McKenney
2014-07-07 22:44 ` [PATCH tip/core/rcu 1/3] torture: Enable versions without CFcommon to function correctly Paul E. McKenney
0 siblings, 1 reply; 4+ messages in thread
From: Paul E. McKenney @ 2014-07-07 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, niv, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg, sbw
Hello!
This series provides torture-test updates:
1. Enable old script versions without CFcommon files to operate
correctly.
2. Clean up diagnostics from --buildonly runs.
3. Avoid format string leak to thead name, courtesy of Kees Cook.
Thanx, Paul
------------------------------------------------------------------------
b/kernel/torture.c | 2 -
b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | 8 ++++
b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 9 ++++-
b/tools/testing/selftests/rcutorture/bin/kvm.sh | 21 +++++++------
4 files changed, 27 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH tip/core/rcu 1/3] torture: Enable versions without CFcommon to function correctly
2014-07-07 22:44 [PATCH tip/core/rcu 0/3] Torture updates for 3.17 Paul E. McKenney
@ 2014-07-07 22:44 ` Paul E. McKenney
2014-07-07 22:44 ` [PATCH tip/core/rcu 2/3] torture: Clean up diagnostics from --buildonly runs Paul E. McKenney
2014-07-07 22:44 ` [PATCH tip/core/rcu 3/3] torture: Avoid format string leak to thead name Paul E. McKenney
0 siblings, 2 replies; 4+ messages in thread
From: Paul E. McKenney @ 2014-07-07 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, niv, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg, sbw,
Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
The CFcommon file must now be present, which makes using the current
scripts against old kernel versions cumbersome. This commit therefore
makes the CFcommon file be optional, so that old kernel versions can be
used with current torture scripts.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
index 27e544e29510..fa37010c34db 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -42,6 +42,7 @@ grace=120
T=/tmp/kvm-test-1-run.sh.$$
trap 'rm -rf $T' 0
+touch $T
. $KVM/bin/functions.sh
. $KVPATH/ver_functions.sh
--
1.8.1.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH tip/core/rcu 2/3] torture: Clean up diagnostics from --buildonly runs
2014-07-07 22:44 ` [PATCH tip/core/rcu 1/3] torture: Enable versions without CFcommon to function correctly Paul E. McKenney
@ 2014-07-07 22:44 ` Paul E. McKenney
2014-07-07 22:44 ` [PATCH tip/core/rcu 3/3] torture: Avoid format string leak to thead name Paul E. McKenney
1 sibling, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2014-07-07 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, niv, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg, sbw,
Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Currently the post-processing complains about the lack of rcutorture
output when --buildonly is set and also emits misleading messages about
kernels being started and finishing. This commit suppresses these
complaints and messages.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
.../testing/selftests/rcutorture/bin/kvm-recheck.sh | 8 +++++++-
.../selftests/rcutorture/bin/kvm-test-1-run.sh | 8 ++++++--
tools/testing/selftests/rcutorture/bin/kvm.sh | 21 ++++++++++++---------
3 files changed, 25 insertions(+), 12 deletions(-)
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
index ee1f6cae3d70..3f6c9b78d177 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh
@@ -54,10 +54,16 @@ do
if test -f "$i/qemu-cmd"
then
print_bug qemu failed
+ echo " $i"
+ elif test -f "$i/buildonly"
+ then
+ echo Build-only run, no boot/test
+ configcheck.sh $i/.config $i/ConfigFragment
+ parse-build.sh $i/Make.out $configfile
else
print_bug Build failed
+ echo " $i"
fi
- echo " $i"
fi
done
done
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
index fa37010c34db..0f69dcbf9def 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -132,7 +132,10 @@ boot_args=$6
cd $KVM
kstarttime=`awk 'BEGIN { print systime() }' < /dev/null`
-echo ' ---' `date`: Starting kernel
+if test -z "$TORTURE_BUILDONLY"
+then
+ echo ' ---' `date`: Starting kernel
+fi
# Generate -smp qemu argument.
qemu_args="-nographic $qemu_args"
@@ -158,12 +161,13 @@ boot_args="`configfrag_boot_params "$boot_args" "$config_template"`"
# Generate kernel-version-specific boot parameters
boot_args="`per_version_boot_params "$boot_args" $builddir/.config $seconds`"
-echo $QEMU $qemu_args -m 512 -kernel $builddir/$BOOT_IMAGE -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd
if test -n "$TORTURE_BUILDONLY"
then
echo Build-only run specified, boot/test omitted.
+ touch $resdir/buildonly
exit 0
fi
+echo $QEMU $qemu_args -m 512 -kernel $builddir/$BOOT_IMAGE -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd
( $QEMU $qemu_args -m 512 -kernel $builddir/$BOOT_IMAGE -append "$qemu_append $boot_args"; echo $? > $resdir/qemu-retval ) &
qemu_pid=$!
commandcompleted=0
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index 40285c58653e..589e9c38413b 100644
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -340,12 +340,18 @@ function dump(first, pastlast)
for (j = 1; j < jn; j++) {
builddir=KVM "/b" j
print "rm -f " builddir ".ready"
- print "echo ----", cfr[j], cpusr[j] ovf ": Starting kernel. `date`";
- print "echo ----", cfr[j], cpusr[j] ovf ": Starting kernel. `date` >> " rd "/log";
+ print "if test -z \"$TORTURE_BUILDONLY\""
+ print "then"
+ print "\techo ----", cfr[j], cpusr[j] ovf ": Starting kernel. `date`";
+ print "\techo ----", cfr[j], cpusr[j] ovf ": Starting kernel. `date` >> " rd "/log";
+ print "fi"
}
print "wait"
- print "echo ---- All kernel runs complete. `date`";
- print "echo ---- All kernel runs complete. `date` >> " rd "/log";
+ print "if test -z \"$TORTURE_BUILDONLY\""
+ print "then"
+ print "\techo ---- All kernel runs complete. `date`";
+ print "\techo ---- All kernel runs complete. `date` >> " rd "/log";
+ print "fi"
for (j = 1; j < jn; j++) {
builddir=KVM "/b" j
print "echo ----", cfr[j], cpusr[j] ovf ": Build/run results:";
@@ -385,10 +391,7 @@ echo
echo
echo " --- `date` Test summary:"
echo Results directory: $resdir/$ds
-if test -z "$TORTURE_BUILDONLY"
-then
- kvm-recheck.sh $resdir/$ds
-fi
+kvm-recheck.sh $resdir/$ds
___EOF___
if test "$dryrun" = script
@@ -403,7 +406,7 @@ then
sed -e 's/:.*$//' -e 's/^echo //'
exit 0
else
- # Not a dryru, so run the script.
+ # Not a dryrun, so run the script.
sh $T/script
fi
--
1.8.1.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH tip/core/rcu 3/3] torture: Avoid format string leak to thead name
2014-07-07 22:44 ` [PATCH tip/core/rcu 1/3] torture: Enable versions without CFcommon to function correctly Paul E. McKenney
2014-07-07 22:44 ` [PATCH tip/core/rcu 2/3] torture: Clean up diagnostics from --buildonly runs Paul E. McKenney
@ 2014-07-07 22:44 ` Paul E. McKenney
1 sibling, 0 replies; 4+ messages in thread
From: Paul E. McKenney @ 2014-07-07 22:44 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, niv, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg, sbw,
Kees Cook, Paul E. McKenney
From: Kees Cook <keescook@chromium.org>
Since the torture-test thread creation interface does not include
format string arguments, this commit makes sure the name can never be
accidentally processed as a format string.
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
kernel/torture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/torture.c b/kernel/torture.c
index 40bb511cca48..d600af21f022 100644
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@ -708,7 +708,7 @@ int _torture_create_kthread(int (*fn)(void *arg), void *arg, char *s, char *m,
int ret = 0;
VERBOSE_TOROUT_STRING(m);
- *tp = kthread_run(fn, arg, s);
+ *tp = kthread_run(fn, arg, "%s", s);
if (IS_ERR(*tp)) {
ret = PTR_ERR(*tp);
VERBOSE_TOROUT_ERRSTRING(f);
--
1.8.1.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-07-07 22:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-07 22:44 [PATCH tip/core/rcu 0/3] Torture updates for 3.17 Paul E. McKenney
2014-07-07 22:44 ` [PATCH tip/core/rcu 1/3] torture: Enable versions without CFcommon to function correctly Paul E. McKenney
2014-07-07 22:44 ` [PATCH tip/core/rcu 2/3] torture: Clean up diagnostics from --buildonly runs Paul E. McKenney
2014-07-07 22:44 ` [PATCH tip/core/rcu 3/3] torture: Avoid format string leak to thead name Paul E. McKenney
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.