linux-stable/tools
Ilpo Järvinen 5176ebe6aa selftests/resctrl: Ensure the benchmark commands fits to its array
[ Upstream commit 4a28c7665c ]

Benchmark command is copied into an array in the stack. The array is
BENCHMARK_ARGS items long but the command line could try to provide a
longer command. Argument size is also fixed by BENCHMARK_ARG_SIZE (63
bytes of space after fitting the terminating \0 character) and user
could have inputted argument longer than that.

Return error in case the benchmark command does not fit to the space
allocated for it.

Fixes: ecdbb911f2 ("selftests/resctrl: Add MBM test")
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: "Wieczor-Retman, Maciej" <maciej.wieczor-retman@intel.com>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 11:06:50 +01:00
..
accounting
arch x86/bugs: Increase the x86 bugs vector size to two u32s 2023-08-08 19:57:39 +02:00
bootconfig bootconfig: Fix testcase to increase max node 2023-04-05 11:23:34 +02:00
bpf bpftool: Use a local bpf_perf_event_value to fix accessing its fields 2023-09-19 12:20:07 +02:00
build tools build: Switch to new openssl API for test-libcrypto 2022-08-25 11:38:01 +02:00
cgroup tools/cgroup/slabinfo.py: updated to work on current kernel 2021-05-07 11:04:31 +02:00
debugging
edid
firewire
firmware
gpio tools: gpio: fix debounce_period_us output of lsgpio 2023-06-21 15:45:35 +02:00
hv vmbus_testing: fix wrong python syntax for integer value comparison 2023-09-19 12:20:05 +02:00
iio tools/iio/iio_utils:fix memory leak 2023-03-11 16:40:17 +01:00
include bpf: Fix BTF_ID symbol generation collision in tools/ 2023-10-10 21:53:35 +02:00
io_uring
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2022-08-11 13:06:45 +02:00
laptop
leds
lib libbpf: fix offsetof() and container_of() to work with CO-RE 2023-07-27 08:43:37 +02:00
memory-model
objtool objtool/x86: add missing embedded_insn check 2023-11-08 17:30:47 +01:00
pci
pcmcia
perf perf build: Define YYNOMEM as YYNOABORT for bison < 3.81 2023-10-10 21:53:33 +02:00
power cpupower: add Makefile dependencies for install targets 2023-10-10 21:53:39 +02:00
scripts tools: Allow proper CC/CXX/... override with LLVM=1 in Makefile.include 2021-07-31 08:16:10 +02:00
spi
testing selftests/resctrl: Ensure the benchmark commands fits to its array 2023-11-20 11:06:50 +01:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-21 15:16:12 +02:00
time
usb usb: testusb: Fix for showing the connection speed 2021-10-09 14:40:56 +02:00
virtio tools/virtio: fix the vringh test for virtio ring changes 2023-02-22 12:55:53 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:23:57 +01:00
wmi
Makefile