From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
<igt-dev@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] tests/kms_invalid_mode: Attempt divide-by-zero in drm_mode_vrefresh()
Date: Fri, 29 Nov 2024 09:15:01 +0530 [thread overview]
Message-ID: <3982ab70-de35-485c-aca3-53c4296987ba@intel.com> (raw)
In-Reply-To: <20241127110012.13349-1-ville.syrjala@linux.intel.com>
On 11/27/2024 4:30 PM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Add a new subtest which attempts to invoke a div-by-zero via
> an overflow in drm_mode_vrefresh() (found by syzbot).
>
> Link: https://syzkaller.appspot.com/bug?extid=622bba18029bcde672e1
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Catching the issue nicely:
https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12217/shard-mtlp-5/igt@kms_invalid_mode@overflow-vrefresh.html#dmesg-warnings177
LGTM.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
> tests/kms_invalid_mode.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
>
> diff --git a/tests/kms_invalid_mode.c b/tests/kms_invalid_mode.c
> index 4fd644594ef9..5fa85338c799 100644
> --- a/tests/kms_invalid_mode.c
> +++ b/tests/kms_invalid_mode.c
> @@ -210,6 +210,20 @@ adjust_mode_bad_vtotal(data_t *data, drmModeModeInfoPtr mode)
> return true;
> }
>
> +static bool
> +adjust_mode_overflow_vrefresh(data_t *data, drmModeModeInfoPtr mode)
> +{
> + /*
> + * htotal * vtotal * vscan == 2^32
> + * overflow during vrefresh calculation
> + */
> + mode->htotal = 32768;
> + mode->vtotal = 32768;
> + mode->vscan = 4;
> +
> + return true;
> +}
> +
> static void
> test_output(data_t *data)
> {
> @@ -285,6 +299,9 @@ static const struct {
> { .name = "bad-vtotal",
> .adjust_mode = adjust_mode_bad_vtotal,
> },
> + { .name = "overflow-vrefresh",
> + .adjust_mode = adjust_mode_overflow_vrefresh,
> + },
> };
>
> static data_t data;
next prev parent reply other threads:[~2024-11-29 3:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-27 11:00 [PATCH i-g-t] tests/kms_invalid_mode: Attempt divide-by-zero in drm_mode_vrefresh() Ville Syrjala
2024-11-27 13:43 ` ✗ GitLab.Pipeline: warning for " Patchwork
2024-11-28 19:09 ` [PATCH i-g-t v2] " Ville Syrjala
2024-11-29 3:46 ` Nautiyal, Ankit K
2024-11-28 20:52 ` ✓ i915.CI.BAT: success for tests/kms_invalid_mode: Attempt divide-by-zero in drm_mode_vrefresh() (rev2) Patchwork
2024-11-28 20:59 ` ✓ Xe.CI.BAT: " Patchwork
2024-11-29 1:11 ` ✗ i915.CI.Full: failure " Patchwork
2024-11-29 3:45 ` Nautiyal, Ankit K [this message]
2024-11-29 7:47 ` ✗ Xe.CI.Full: " 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=3982ab70-de35-485c-aca3-53c4296987ba@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.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