Skip to contentSkip to conversation

drm/i915/gvt: Off by one in intel_vgpu_write_fence()

PATCH In review Dan Carpenter 3 participants 4 messages Aug 7, 2018 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 drm/i915/gvt: Off by one in intel_vgpu_write_fence()

The > should be >= here so that we don't read one element beyond the end of the array.

Fixes 28a60dee2ce6 ("drm/i915/gvt: vGPU HW resource management")
drivers/gpu/drm/i915/gvt/aperture_gm.c +1 -1
index 380eeb2a0e83..fe754022e356 100644
@@ -131,7 +131,7 @@ void intel_vgpu_write_fence(struct intel_vgpu *vgpu,
 
 	assert_rpm_wakelock_held(dev_priv);
 
-	if (WARN_ON(fence > vgpu_fence_sz(vgpu)))
+	if (WARN_ON(fence >= vgpu_fence_sz(vgpu)))
 		return;
 
 	reg = vgpu->fence.regs[fence];

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer Reviewed-by on v1 1/1
#2 lore raw
Quoted 5 lines · Dan Carpenter

The > should be >= here so that we don't read one element beyond the end of the array.

Fixes 28a60dee2ce6 ("drm/i915/gvt: vGPU HW resource management")
Quoted 6 lines
drivers/gpu/drm/i915/gvt/aperture_gm.c +0 -0
index 380eeb2a0e83..fe754022e356 100644

drivers/gpu/drm/i915/gvt/aperture_gm.c void intel_vgpu_write_fence(struct intel_vgpu *vgpu, · line 137

Quoted 8 lines
drivers/gpu/drm/i915/gvt/aperture_gm.c +1 -1
@@ -131,7 +131,7 @@ void intel_vgpu_write_fence(struct intel_vgpu *vgpu,
 
 	assert_rpm_wakelock_held(dev_priv);
 
-	if (WARN_ON(fence > vgpu_fence_sz(vgpu)))
+	if (WARN_ON(fence >= vgpu_fence_sz(vgpu)))
 		return;
 
 	reg = vgpu->fence.regs[fence];

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

✓ Fi.CI.BAT: success for drm/i915/gvt: Off by one in intel_vgpu_write_fence()

In reply to a message not in the archive
== Series Details ==

== Series Details ==

Series: drm/i915/gvt: Off by one in intel_vgpu_write_fence()
URL : https://patchwork.freedesktop.org/series/47790/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4624 -> Patchwork_9865 =

== Summary - SUCCESS ==

No regressions found.

External URL: https://patchwork.freedesktop.org/api/1.0/series/47790/revisions/1/mbox/

== Known issues ==

Here are the changes found in Patchwork_9865 that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@drv_selftest@live_hangcheck:
      {fi-cfl-8109u}:     NOTRUN -> DMESG-FAIL (fdo#106560)
      {fi-icl-u}:         NOTRUN -> INCOMPLETE (fdo#107399)

    igt@drv_selftest@live_workarounds:
      fi-cnl-psr:         PASS -> DMESG-FAIL (fdo#107292)
      fi-kbl-7560u:       PASS -> DMESG-FAIL (fdo#107292)

    igt@kms_frontbuffer_tracking@basic:
      fi-hsw-peppy:       PASS -> DMESG-FAIL (fdo#106103, fdo#102614)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      {fi-icl-u}:         NOTRUN -> DMESG-WARN (fdo#107382) +4

    {igt@kms_psr@primary_mmap_gtt}:
      fi-cnl-psr:         PASS -> DMESG-WARN (fdo#107372)

    {igt@kms_psr@primary_page_flip}:
      {fi-icl-u}:         NOTRUN -> FAIL (fdo#107383) +3

    
    ==== Possible fixes ====

    igt@drv_selftest@live_hangcheck:
      fi-kbl-7560u:       DMESG-FAIL (fdo#106947, fdo#106560) -> PASS

    igt@gem_exec_suspend@basic-s3:
      {fi-cfl-8109u}:     DMESG-WARN (fdo#107345) -> PASS +1

    igt@kms_flip@basic-flip-vs-modeset:
      {fi-cfl-8109u}:     INCOMPLETE (fdo#107468) -> PASS

    igt@prime_vgem@basic-fence-flip:
      fi-ilk-650:         FAIL (fdo#104008) -> PASS

    
    ==== Warnings ====

    {igt@kms_psr@primary_page_flip}:
      fi-cnl-psr:         DMESG-FAIL (fdo#107372) -> DMESG-WARN (fdo#107372)

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104008 https://bugs.freedesktop.org/show_bug.cgi?id=104008
fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#107292 https://bugs.freedesktop.org/show_bug.cgi?id=107292
fdo#107345 https://bugs.freedesktop.org/show_bug.cgi?id=107345
fdo#107372 https://bugs.freedesktop.org/show_bug.cgi?id=107372
fdo#107382 https://bugs.freedesktop.org/show_bug.cgi?id=107382
fdo#107383 https://bugs.freedesktop.org/show_bug.cgi?id=107383
fdo#107399 https://bugs.freedesktop.org/show_bug.cgi?id=107399
fdo#107468 https://bugs.freedesktop.org/show_bug.cgi?id=107468

== Participating hosts (52 -> 48) ==

Additional (1): fi-icl-u
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u

== Build changes ==

* Linux: CI_DRM_4624 -> Patchwork_9865

CI_DRM_4624: e885609282870bc92658a5f63d592f806e8206e8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4587: 5d78c73d871525ec9caecd88ad7d9abe36637314 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9865: 6b53e705aad77a4abf8d3ac7d0da6ae9969a2aa9 @ git://anongit.freedesktop.org/gfx-ci/linux

== Linux commits ==

6b53e705aad7 drm/i915/gvt: Off by one in intel_vgpu_write_fence()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9865/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#4 lore raw

✓ Fi.CI.IGT: success for drm/i915/gvt: Off by one in intel_vgpu_write_fence()

In reply to a message not in the archive
== Series Details ==

== Series Details ==

Series: drm/i915/gvt: Off by one in intel_vgpu_write_fence()
URL : https://patchwork.freedesktop.org/series/47790/
State : success

== Summary ==

= CI Bug Log - changes from CI_DRM_4624_full -> Patchwork_9865_full =

== Summary - WARNING ==

Minor unknown changes coming with Patchwork_9865_full need to be verified manually.

If you think the reported changes have nothing to do with the changes introduced in Patchwork_9865_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.

== Possible new issues ==

Here are the unknown changes that may have been introduced in Patchwork_9865_full:

=== IGT changes ===

    ==== Warnings ====

    igt@kms_frontbuffer_tracking@fbc-1p-primscrn-indfb-msflip-blt:
      shard-snb:          SKIP -> PASS

== Known issues ==

Here are the changes found in Patchwork_9865_full that come from known issues:

=== IGT changes ===

    ==== Issues hit ====

    igt@gem_ppgtt@blt-vs-render-ctx0:
      shard-kbl:          PASS -> INCOMPLETE (fdo#106023, fdo#103665)

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking:
      shard-glk:          PASS -> FAIL (fdo#105703)

    igt@kms_setmode@basic:
      shard-apl:          PASS -> FAIL (fdo#99912)

    
    ==== Possible fixes ====

    igt@drv_suspend@shrink:
      shard-snb:          INCOMPLETE (fdo#105411, fdo#106886) -> PASS

    igt@kms_atomic_transition@1x-modeset-transitions-nonblocking-fencing:
      shard-glk:          FAIL -> PASS

    igt@kms_cursor_crc@cursor-128x128-suspend:
      shard-glk:          FAIL (fdo#103375) -> PASS

    igt@kms_setmode@basic:
      shard-glk:          FAIL (fdo#99912) -> PASS

    igt@perf@polling:
      shard-hsw:          FAIL (fdo#102252) -> PASS

fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#103665 https://bugs.freedesktop.org/show_bug.cgi?id=103665
fdo#105411 https://bugs.freedesktop.org/show_bug.cgi?id=105411
fdo#105703 https://bugs.freedesktop.org/show_bug.cgi?id=105703
fdo#106023 https://bugs.freedesktop.org/show_bug.cgi?id=106023
fdo#106886 https://bugs.freedesktop.org/show_bug.cgi?id=106886
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

== Participating hosts (5 -> 5) ==

No changes in participating hosts

== Build changes ==

* Linux: CI_DRM_4624 -> Patchwork_9865

CI_DRM_4624: e885609282870bc92658a5f63d592f806e8206e8 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4587: 5d78c73d871525ec9caecd88ad7d9abe36637314 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9865: 6b53e705aad77a4abf8d3ac7d0da6ae9969a2aa9 @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9865/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx