linux-stable/tools
Ilpo Järvinen 59a31165fe 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:57:06 +01:00
..
accounting
arch asm-generic: regression fix for 6.5 2023-08-18 18:13:36 +02:00
bootconfig
bpf bpftool: Use a local bpf_perf_event_value to fix accessing its fields 2023-09-13 09:53:02 +02:00
build perf build: Update build rule for generated files 2023-09-19 12:30:26 +02:00
certs
cgroup
counter tools/counter: Makefile: Replace rmdir by rm to avoid make,clean failure 2023-07-24 10:29:52 -04:00
debugging
edid
firewire
firmware
gpio
hv vmbus_testing: fix wrong python syntax for integer value comparison 2023-07-23 23:19:30 +00:00
iio tools: iio: iio_generic_buffer: Fix some integer type and calculation 2023-09-23 11:14:28 +02:00
include maple_tree: add GFP_KERNEL to allocations in mas_expected_entries() 2023-11-02 09:36:48 +01:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Free btf_vmlinux when closing bpf_object 2023-09-23 11:14:22 +02:00
memory-model
mm tools/mm: fix undefined reference to pthread_once 2023-09-19 12:30:13 +02:00
net/ynl tools: ynl-gen: fix parse multi-attr enum attribute 2023-07-26 13:38:23 -07:00
objtool objtool: Propagate early errors 2023-11-20 11:56:43 +01:00
pci
pcmcia
perf perf evlist: Avoid frequency mode for the dummy event 2023-11-08 14:09:04 +01:00
power platform-drivers-x86 for v6.5-1 2023-06-30 14:50:00 -07:00
rcu
scripts
spi
testing selftests/resctrl: Ensure the benchmark commands fits to its array 2023-11-20 11:57:06 +01:00
thermal
time
tracing rtla/timerlat: Do not stop user-space if a cpu is offline 2023-10-10 22:03:00 +02:00
usb
verification
virtio tools/virtio: fix build break for aarch64 2023-06-27 10:47:08 -04:00
wmi
workqueue
Makefile