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 v3] lib/igt_kms: Fix memory corruption
Date: Wed, 8 Nov 2023 18:58:15 +0000 [thread overview]
Message-ID: <486ab228-3db5-4eea-a90a-c27477203c67@collabora.com> (raw)
In-Reply-To: <20231108062902.390248-1-vignesh.raman@collabora.com>
Hi Vignesh,
On 08/11/2023 06:29, Vignesh Raman wrote:
> In crosvm
Strictly speaking, the change is in virtio-gpu (the kernel driver
providing KMS), not crosvm (the KVM host for the kernel), but this is an
unimportant detail.
> , 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.
>
> [...]
> # Received signal SIGABRT.
> # Stack trace:
> # #0 [fatal_sig_handler+0x17b]
> # #1 [__sigaction+0x40]
> # #2 [pthread_key_delete+0x14c]
> # #3 [gsignal+0x12]
> # #4 [abort+0xd3]
> # #5 [__fsetlocking+0x290]
> # #6 [timer_settime+0x37a]
> # #7 [__default_morecore+0x1f1b]
> # #8 [__libc_calloc+0x161]
> # #9 [drmModeGetPlaneResources+0x44]
> # #10 [igt_display_require+0x194]
> # #11 [__igt_unique____real_main1356+0x93c]
> # #12 [main+0x3f]
> # #13 [__libc_init_first+0x8a]
> # #14 [__libc_start_main+0x85]
> # #15 [_start+0x21]
>
> Increase IGT_MAX_PIPES to 16 to fix this memory corruption issue.
> igt_display_require initializes display and allocate resources as
> a prerequisite for the tests. Fail the test if count_crtcs exceeds
> IGT_MAX_PIPES with debug information.
>
> This fix is required for drm-ci to run igt tests on virtio-gpu.
The rest is all good though, so this change is:
Reviewed-by: Daniel Stone <daniels@collabora.com>
Thanks,
Daniel
next prev parent reply other threads:[~2023-11-08 18:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-08 6:29 [igt-dev] [PATCH i-g-t v3] lib/igt_kms: Fix memory corruption Vignesh Raman
2023-11-08 6:42 ` [igt-dev] ✗ Fi.CI.BUILD: failure for lib/igt_kms: Fix memory corruption (rev3) Patchwork
2023-11-08 6:48 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2023-11-08 15:18 ` [igt-dev] [PATCH i-g-t v3] lib/igt_kms: Fix memory corruption Helen Koike
2023-11-08 18:58 ` Daniel Stone [this message]
2023-11-09 11:49 ` Modem, Bhanuprakash
2023-11-09 13:41 ` Vignesh Raman
2023-11-09 13:52 ` Vignesh Raman
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=486ab228-3db5-4eea-a90a-c27477203c67@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