Revision 7089003304c67658caead22f841840fc4a26b198 authored by David Gow on 19 October 2022, 07:32:40 UTC, committed by Javier Martinez Canillas on 20 October 2022, 07:56:05 UTC
The xrgb2101010 format conversion test (unlike for other formats) does
an endianness conversion on the results. However, it always converts
TEST_BUF_SIZE 32-bit integers, which results in reading from (and
writing to) more memory than in present in the result buffer. Instead,
use the buffer size, divided by sizeof(u32).

The issue could be reproduced with KASAN:
./tools/testing/kunit/kunit.py run --kunitconfig drivers/gpu/drm/tests \
	--kconfig_add CONFIG_KASAN=y --kconfig_add CONFIG_KASAN_VMALLOC=y \
	--kconfig_add CONFIG_KASAN_KUNIT_TEST=y \
	drm_format_helper_test.*xrgb2101010

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Fixes: 453114319699 ("drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_xrgb2101010()")
Signed-off-by: David Gow <davidgow@google.com>
Reviewed-by: Maíra Canal <mairacanal@riseup.net>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221019073239.3779180-1-davidgow@google.com
1 parent 1aca5ce
History
File Mode Size
.gitignore -rw-r--r-- 120 bytes
Kconfig -rw-r--r-- 5.4 KB
Makefile -rw-r--r-- 3.2 KB
blacklist.c -rw-r--r-- 9.4 KB
blacklist.h -rw-r--r-- 135 bytes
blacklist_hashes.c -rw-r--r-- 147 bytes
check-blacklist-hashes.awk -rwxr-xr-x 1.0 KB
default_x509.genkey -rw-r--r-- 407 bytes
extract-cert.c -rw-r--r-- 3.6 KB
revocation_certificates.S -rw-r--r-- 495 bytes
system_certificates.S -rw-r--r-- 1017 bytes
system_keyring.c -rw-r--r-- 9.9 KB

back to top