Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vignesh Raman <vignesh.raman@collabora.com>
To: Daniel Stone <daniels@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: Mon, 6 Nov 2023 08:10:13 +0530	[thread overview]
Message-ID: <a106c443-eb67-c413-1ac0-cb8a86e8ab30@collabora.com> (raw)
In-Reply-To: <797dd2bf-25a3-4a6a-b2eb-5c5cbdb25b09@collabora.com>

Hi Daniel,

On 27/10/23 22:07, Daniel Stone wrote:
> Hi Vignesh,
> 
> On 27/10/2023 15:40, Vignesh Raman wrote:
>> In crosvm, the kernel reports 16 for count_crtcs, which exceeds
>> IGT_MAX_PIPES set to 8. The function igt_display_require allocates
>> memory for IGT_MAX_PIPES members of igt_pipe_t structures, but then
>> writes into it based on the count_crtcs reported by the kernel,
>> resulting in memory corruption.
> 
> To make this robust against future changes (32 CRTCs seems totally 
> fanciful, but so did 16 a while ago), this needs to also be robust 
> against count_crtcs exceeding IGT_NUM_PIPES, along the lines of your 
> previous change.

Yes, I agree to make the code robust against potential changes in the 
future. We can set IGT_MAX_PIPES to 32. I will send an updated patch.

Thanks.

Regards,
Vignesh



  reply	other threads:[~2023-11-06  2:40 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 [this message]
2023-11-06 14:43     ` Daniel Stone
2023-11-07  8:58       ` Vignesh Raman
2023-11-07 11:24         ` Daniel Stone
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=a106c443-eb67-c413-1ac0-cb8a86e8ab30@collabora.com \
    --to=vignesh.raman@collabora.com \
    --cc=bhanuprakash.modem@intel.com \
    --cc=daniels@collabora.com \
    --cc=helen.koike@collabora.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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