From: Javier Martinez Canillas <javierm@redhat.com>
To: "José Expósito" <jose.exposito89@gmail.com>,
"David Gow" <davidgow@google.com>
Cc: "Sam Ravnborg" <sam@ravnborg.org>,
"Naresh Kamboju" <naresh.kamboju@linaro.org>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
"Maíra Canal" <mairacanal@riseup.net>,
"Maxime Ripard" <maxime@cerno.tech>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Linux Kernel Functional Testing" <lkft@linaro.org>,
kunit-dev@googlegroups.com
Subject: Re: [PATCH] drm: tests: Fix a buffer overflow in format_helper_test
Date: Thu, 20 Oct 2022 10:03:13 +0200 [thread overview]
Message-ID: <5639218e-bcc8-55b0-ea30-7bf2b26c92b9@redhat.com> (raw)
In-Reply-To: <20221019172919.GA5336@elementary>
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..2191e57f2297 100644
>> --- a/drivers/gpu/drm/tests/drm_format_helper_test.c
>> +++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
>> @@ -438,7 +438,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
>> iosys_map_set_vaddr(&src, xrgb8888);
>>
>> drm_fb_xrgb8888_to_xrgb2101010(&dst, &result->dst_pitch, &src, &fb, ¶ms->clip);
>> - buf = le32buf_to_cpu(test, buf, TEST_BUF_SIZE);
>> + buf = le32buf_to_cpu(test, buf, dst_size / sizeof(u32));
>> KUNIT_EXPECT_EQ(test, memcmp(buf, result->expected, dst_size), 0);
>> }
>
> Thanks a lot for fixing this bug David, I just tested it and
> worked as expected.
>
I've pushed this to drm-misc (drm-misc-fixes) now. Thanks!
> Do you think that we should update the other calls to
> le32buf_to_cpu() to follow a similar approach?
>
Feel free to post follow-up patches if you think that other changes are needed.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
next prev parent reply other threads:[~2022-10-20 8:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 7:32 [PATCH] drm: tests: Fix a buffer overflow in format_helper_test David Gow
2022-10-19 11:36 ` Maíra Canal
2022-10-19 16:14 ` Javier Martinez Canillas
2022-10-21 7:43 ` David Gow
2022-10-19 17:29 ` José Expósito
2022-10-20 8:03 ` Javier Martinez Canillas [this message]
2022-10-21 7:37 ` David Gow
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5639218e-bcc8-55b0-ea30-7bf2b26c92b9@redhat.com \
--to=javierm@redhat.com \
--cc=davidgow@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jose.exposito89@gmail.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft@linaro.org \
--cc=mairacanal@riseup.net \
--cc=maxime@cerno.tech \
--cc=naresh.kamboju@linaro.org \
--cc=sam@ravnborg.org \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox