torture: Remove use of "eval" in torture.sh
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 23 Nov 2020 15:27:32 +0000 (07:27 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 7 Jan 2021 01:03:40 +0000 (17:03 -0800)
commit197220d4a3347aa2c21389235db4a4457e7dc0a7
tree1dc1f13715f1a9cd1def3b5d547eef44dfa24e20
parent1adb5d6b52251105f77630432b36e340cdcb3390
torture: Remove use of "eval" in torture.sh

The bash "eval" command enables Bobby Tables attacks, which might not
be a concern in torture testing by themselves, but one could imagine
these combined with a cut-and-paste attack.  This commit therefore gets
rid of them.  This comes at a price in terms of bash quoting not working
nicely, so the "--bootargs" argument lists are now passed to torture_one
via a bash-variable side channel.  This might be a bit ugly, but it will
also allow torture.sh to grow its own --bootargs parameter.

While in the area, add proper header comments for the bash functions.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/testing/selftests/rcutorture/bin/torture.sh