Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-21 Thread David Gow
On Wed, Oct 19, 2022 at 7:36 PM Maíra Canal wrote: > > [cc Javier] > > Hi David, > > On 10/19/22 04:32, David Gow wrote: > > 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 inte

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-21 Thread David Gow
On Thu, Oct 20, 2022 at 4:03 PM Javier Martinez Canillas wrote: > > On 10/19/22 19:29, José Expósito wrote: > > [...] > > >> drivers/gpu/drm/tests/drm_format_helper_test.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/drivers/gpu/drm/tests/drm_format_helper_tes

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-20 Thread Javier Martinez Canillas
On 10/19/22 19:29, José Expósito wrote: [...] >> drivers/gpu/drm/tests/drm_format_helper_test.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c >> b/drivers/gpu/drm/tests/drm_format_helper_test.c >> index 8d86c250c2ec..2

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-19 Thread José Expósito
On Wed, Oct 19, 2022 at 03:32:40PM +0800, David Gow wrote: > 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 th

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-19 Thread Javier Martinez Canillas
On 10/19/22 13:36, Maíra Canal wrote: > [cc Javier] > > Hi David, > > On 10/19/22 04:32, David Gow wrote: >> 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 resul

Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-19 Thread Maíra Canal
[cc Javier] Hi David, On 10/19/22 04:32, David Gow wrote: > 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 t

[PATCH] drm: tests: Fix a buffer overflow in format_helper_test

2022-10-19 Thread David Gow
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, d