WSL2-Linux-Kernel/tools
Zenghui Yu 18e65173fe kselftests: dmabuf-heaps: Ensure the driver name is null-terminated
[ Upstream commit 291e4baf70019f17a81b7b47aeb186b27d222159 ]

Even if a vgem device is configured in, we will skip the import_vgem_fd()
test almost every time.

  TAP version 13
  1..11
  # Testing heap: system
  # =======================================
  # Testing allocation and importing:
  ok 1 # SKIP Could not open vgem -1

The problem is that we use the DRM_IOCTL_VERSION ioctl to query the driver
version information but leave the name field a non-null-terminated string.
Terminate it properly to actually test against the vgem device.

While at it, let's check the length of the driver name is exactly 4 bytes
and return early otherwise (in case there is a name like "vgemfoo" that
gets converted to "vgem\0" unexpectedly).

Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20240729024604.2046-1-yuzenghui@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-12 11:07:49 +02:00
..
accounting
arch x86/insn: Fix PUSH instruction in x86 instruction decoder opcode map 2024-06-16 13:39:31 +02:00
bootconfig bootconfig: Fix testcase to increase max node 2023-03-30 12:47:47 +02:00
bpf bpf: Fix potential integer overflow in resolve_btfids 2024-06-16 13:39:50 +02:00
build perf cs-etm: Bump minimum OpenCSD version to ensure a bugfix is present 2024-02-23 08:54:50 +01:00
cgroup
debugging
edid
firewire
firmware
gpio tools: gpio: fix debounce_period_us output of lsgpio 2023-06-21 15:59:12 +02:00
hv vmbus_testing: fix wrong python syntax for integer value comparison 2023-09-19 12:22:28 +02:00
iio tools: iio: replace seekdir() in iio_generic_buffer 2024-04-13 13:01:46 +02:00
include tools: move alignment-related macros to new <linux/align.h> 2024-09-04 13:23:37 +02:00
io_uring tools/io_uring/io_uring-cp: sync with liburing example 2021-08-13 08:58:11 -06:00
kvm/kvm_stat tools/kvm_stat: fix display of error when multiple processes are found 2022-08-11 13:07:51 +02:00
laptop
leds
lib libbpf: Add NULL checks to bpf_object__{prev_map,next_map} 2024-09-12 11:07:48 +02:00
memory-model tools/memory-model: Fix bug in lock.cat 2024-08-19 05:45:15 +02:00
objtool exit: Rename module_put_and_exit to module_put_and_kthread_exit 2024-04-10 16:18:55 +02:00
pci tools: PCI: Zero-initialize param 2021-08-05 11:01:30 +01:00
pcmcia
perf perf intel-pt: Fix exclude_guest setting 2024-08-19 05:45:02 +02:00
power tools/power/cpupower: Fix Pstate frequency reporting on AMD Family 1Ah CPUs 2024-07-27 10:46:07 +02:00
rcu
scripts
spi
testing kselftests: dmabuf-heaps: Ensure the driver name is null-terminated 2024-09-12 11:07:49 +02:00
thermal/tmon tools/thermal: Fix possible path truncations 2022-08-17 14:24:15 +02:00
time
tracing tools/latency-collector: Fix -Wformat-security compile warns 2024-06-16 13:39:12 +02:00
usb usb: testusb: Fix for showing the connection speed 2021-09-14 10:31:41 +02:00
virtio tools/virtio: fix build 2024-03-01 13:21:52 +01:00
vm tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep" 2022-12-08 11:28:42 +01:00
wmi
Makefile