From: Daniel Stone <daniels@collabora.com>
To: Vignesh Raman <vignesh.raman@collabora.com>,
bhanuprakash.modem@intel.com, igt-dev@lists.freedesktop.org
Cc: helen.koike@collabora.com
Subject: Re: [igt-dev] [PATCH i-g-t v2] lib/igt_kms: Fix memory corruption
Date: Tue, 7 Nov 2023 11:24:04 +0000 [thread overview]
Message-ID: <653b83e4-940c-42f8-b72f-d8fb3fc0a604@collabora.com> (raw)
In-Reply-To: <1b0a6bc9-9e45-95b7-a108-738dd7fd2a90@collabora.com>
On 07/11/2023 08:58, Vignesh Raman wrote:
> On 06/11/23 20:13, Daniel Stone wrote:
>> What I mean is to make sure that the code cannot access out of
>> bounds, regardless of the number. We can set IGT_MAX_PIPES to 32 but
>> then someone will hit the same failure when there are more CRTCs than
>> that.
>>
>> The way to do this would probably be to igt_require() that
>> count_crtcs does not exceed IGT_MAX_PIPES, in all the paths where we
>> access the crtcs array. There is no need to bump the limit to 32
>> until it's required.
>
> Okay understood. We can use igt_assert_f to make the test fail
> (instead of skipping it) if count_crtcs exceeds IGT_MAX_PIPES.
>
> ERROR - Igt error: (kms_vblank:81) igt_kms-CRITICAL: Failed assertion:
> resources->count_crtcs <= IGT_MAX_PIPES
> ERROR - Igt error: (kms_vblank:81) igt_kms-CRITICAL: count_crtcs
> exceeds IGT_MAX_PIPES, count_crtcs=16, IGT_MAX_PIPES=8
> ERROR - Igt error: Test kms_vblank failed.
>
> I will check other code paths as well. Thanks.
That's perfect, thanks Vignesh.
Cheers,
Daniel
next prev parent reply other threads:[~2023-11-07 11:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-27 14:40 [igt-dev] [PATCH i-g-t v2] lib/igt_kms: Fix memory corruption Vignesh Raman
2023-10-27 16:37 ` Daniel Stone
2023-11-06 2:40 ` Vignesh Raman
2023-11-06 14:43 ` Daniel Stone
2023-11-07 8:58 ` Vignesh Raman
2023-11-07 11:24 ` Daniel Stone [this message]
2023-10-27 18:21 ` [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_kms: Fix memory corruption (rev2) Patchwork
2023-10-27 18:23 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
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=653b83e4-940c-42f8-b72f-d8fb3fc0a604@collabora.com \
--to=daniels@collabora.com \
--cc=bhanuprakash.modem@intel.com \
--cc=helen.koike@collabora.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=vignesh.raman@collabora.com \
/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