* [PATCH] drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-06 9:13 ` Chris Wilson 0 siblings, 0 replies; 12+ messages in thread From: Chris Wilson @ 2019-11-06 9:13 UTC (permalink / raw) To: intel-gfx As we read the ctx->vm unlocked before cloning/exporting, we should validate our reference is correct before returning it. We already do for clone_vm() but were not so strict around get_ppgtt(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 80 +++++++++++---------- 1 file changed, 43 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index de6e55af82cf..a06cc8e63281 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c @@ -995,6 +995,38 @@ static int context_barrier_task(struct i915_gem_context *ctx, return err; } +static struct i915_address_space * +context_get_vm_rcu(struct i915_gem_context *ctx) +{ + do { + struct i915_address_space *vm; + + vm = rcu_dereference(ctx->vm); + if (!kref_get_unless_zero(&vm->ref)) + continue; + + /* + * This ppgtt may have be reallocated between + * the read and the kref, and reassigned to a third + * context. In order to avoid inadvertent sharing + * of this ppgtt with that third context (and not + * src), we have to confirm that we have the same + * ppgtt after passing through the strong memory + * barrier implied by a successful + * kref_get_unless_zero(). + * + * Once we have acquired the current ppgtt of src, + * we no longer care if it is released from src, as + * it cannot be reallocated elsewhere. + */ + + if (vm == rcu_access_pointer(ctx->vm)) + return rcu_pointer_handoff(vm); + + i915_vm_put(vm); + } while (1); +} + static int get_ppgtt(struct drm_i915_file_private *file_priv, struct i915_gem_context *ctx, struct drm_i915_gem_context_param *args) @@ -1006,7 +1038,7 @@ static int get_ppgtt(struct drm_i915_file_private *file_priv, return -ENODEV; rcu_read_lock(); - vm = i915_vm_get(ctx->vm); + vm = context_get_vm_rcu(ctx); rcu_read_unlock(); ret = mutex_lock_interruptible(&file_priv->vm_idr_lock); @@ -2035,47 +2067,21 @@ static int clone_vm(struct i915_gem_context *dst, struct i915_address_space *vm; int err = 0; - rcu_read_lock(); - do { - vm = rcu_dereference(src->vm); - if (!vm) - break; - - if (!kref_get_unless_zero(&vm->ref)) - continue; - - /* - * This ppgtt may have be reallocated between - * the read and the kref, and reassigned to a third - * context. In order to avoid inadvertent sharing - * of this ppgtt with that third context (and not - * src), we have to confirm that we have the same - * ppgtt after passing through the strong memory - * barrier implied by a successful - * kref_get_unless_zero(). - * - * Once we have acquired the current ppgtt of src, - * we no longer care if it is released from src, as - * it cannot be reallocated elsewhere. - */ - - if (vm == rcu_access_pointer(src->vm)) - break; + if (!rcu_access_pointer(src->vm)) + return 0; - i915_vm_put(vm); - } while (1); + rcu_read_lock(); + vm = context_get_vm_rcu(src); rcu_read_unlock(); - if (vm) { - if (!mutex_lock_interruptible(&dst->mutex)) { - __assign_ppgtt(dst, vm); - mutex_unlock(&dst->mutex); - } else { - err = -EINTR; - } - i915_vm_put(vm); + if (!mutex_lock_interruptible(&dst->mutex)) { + __assign_ppgtt(dst, vm); + mutex_unlock(&dst->mutex); + } else { + err = -EINTR; } + i915_vm_put(vm); return err; } -- 2.24.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Intel-gfx] [PATCH] drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-06 9:13 ` Chris Wilson 0 siblings, 0 replies; 12+ messages in thread From: Chris Wilson @ 2019-11-06 9:13 UTC (permalink / raw) To: intel-gfx As we read the ctx->vm unlocked before cloning/exporting, we should validate our reference is correct before returning it. We already do for clone_vm() but were not so strict around get_ppgtt(). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 80 +++++++++++---------- 1 file changed, 43 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index de6e55af82cf..a06cc8e63281 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c @@ -995,6 +995,38 @@ static int context_barrier_task(struct i915_gem_context *ctx, return err; } +static struct i915_address_space * +context_get_vm_rcu(struct i915_gem_context *ctx) +{ + do { + struct i915_address_space *vm; + + vm = rcu_dereference(ctx->vm); + if (!kref_get_unless_zero(&vm->ref)) + continue; + + /* + * This ppgtt may have be reallocated between + * the read and the kref, and reassigned to a third + * context. In order to avoid inadvertent sharing + * of this ppgtt with that third context (and not + * src), we have to confirm that we have the same + * ppgtt after passing through the strong memory + * barrier implied by a successful + * kref_get_unless_zero(). + * + * Once we have acquired the current ppgtt of src, + * we no longer care if it is released from src, as + * it cannot be reallocated elsewhere. + */ + + if (vm == rcu_access_pointer(ctx->vm)) + return rcu_pointer_handoff(vm); + + i915_vm_put(vm); + } while (1); +} + static int get_ppgtt(struct drm_i915_file_private *file_priv, struct i915_gem_context *ctx, struct drm_i915_gem_context_param *args) @@ -1006,7 +1038,7 @@ static int get_ppgtt(struct drm_i915_file_private *file_priv, return -ENODEV; rcu_read_lock(); - vm = i915_vm_get(ctx->vm); + vm = context_get_vm_rcu(ctx); rcu_read_unlock(); ret = mutex_lock_interruptible(&file_priv->vm_idr_lock); @@ -2035,47 +2067,21 @@ static int clone_vm(struct i915_gem_context *dst, struct i915_address_space *vm; int err = 0; - rcu_read_lock(); - do { - vm = rcu_dereference(src->vm); - if (!vm) - break; - - if (!kref_get_unless_zero(&vm->ref)) - continue; - - /* - * This ppgtt may have be reallocated between - * the read and the kref, and reassigned to a third - * context. In order to avoid inadvertent sharing - * of this ppgtt with that third context (and not - * src), we have to confirm that we have the same - * ppgtt after passing through the strong memory - * barrier implied by a successful - * kref_get_unless_zero(). - * - * Once we have acquired the current ppgtt of src, - * we no longer care if it is released from src, as - * it cannot be reallocated elsewhere. - */ - - if (vm == rcu_access_pointer(src->vm)) - break; + if (!rcu_access_pointer(src->vm)) + return 0; - i915_vm_put(vm); - } while (1); + rcu_read_lock(); + vm = context_get_vm_rcu(src); rcu_read_unlock(); - if (vm) { - if (!mutex_lock_interruptible(&dst->mutex)) { - __assign_ppgtt(dst, vm); - mutex_unlock(&dst->mutex); - } else { - err = -EINTR; - } - i915_vm_put(vm); + if (!mutex_lock_interruptible(&dst->mutex)) { + __assign_ppgtt(dst, vm); + mutex_unlock(&dst->mutex); + } else { + err = -EINTR; } + i915_vm_put(vm); return err; } -- 2.24.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply related [flat|nested] 12+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-06 11:20 ` Patchwork 0 siblings, 0 replies; 12+ messages in thread From: Patchwork @ 2019-11-06 11:20 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915/gem: Safely acquire the ctx->vm when copying URL : https://patchwork.freedesktop.org/series/69044/ State : success == Summary == CI Bug Log - changes from CI_DRM_7266 -> Patchwork_15148 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/index.html Known issues ------------ Here are the changes found in Patchwork_15148 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_flink_basic@bad-open: - fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/fi-icl-u3/igt@gem_flink_basic@bad-open.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/fi-icl-u3/igt@gem_flink_basic@bad-open.html #### Possible fixes #### * igt@gem_flink_basic@double-flink: - fi-icl-u3: [DMESG-WARN][3] ([fdo#107724]) -> [PASS][4] +1 similar issue [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/fi-icl-u3/igt@gem_flink_basic@double-flink.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/fi-icl-u3/igt@gem_flink_basic@double-flink.html * igt@kms_frontbuffer_tracking@basic: - {fi-icl-guc}: [FAIL][5] ([fdo#103167]) -> [PASS][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/fi-icl-guc/igt@kms_frontbuffer_tracking@basic.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/fi-icl-guc/igt@kms_frontbuffer_tracking@basic.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724 Participating hosts (50 -> 42) ------------------------------ Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bwr-2160 fi-ctg-p8600 fi-gdg-551 fi-byt-clapper Build changes ------------- * CI: CI-20190529 -> None * Linux: CI_DRM_7266 -> Patchwork_15148 CI-20190529: 20190529 CI_DRM_7266: 1476c64a0b4c7ee43e50f83ba1d6518e60211a36 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5263: 8a5d44dc5e51622cd43f23c2cf24d44c24a0564d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15148: 7ea9036094764c8f7ec10f7ae0d5e4c128a9ab97 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 7ea903609476 drm/i915/gem: Safely acquire the ctx->vm when copying == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/index.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-06 11:20 ` Patchwork 0 siblings, 0 replies; 12+ messages in thread From: Patchwork @ 2019-11-06 11:20 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915/gem: Safely acquire the ctx->vm when copying URL : https://patchwork.freedesktop.org/series/69044/ State : success == Summary == CI Bug Log - changes from CI_DRM_7266 -> Patchwork_15148 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/index.html Known issues ------------ Here are the changes found in Patchwork_15148 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_flink_basic@bad-open: - fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/fi-icl-u3/igt@gem_flink_basic@bad-open.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/fi-icl-u3/igt@gem_flink_basic@bad-open.html #### Possible fixes #### * igt@gem_flink_basic@double-flink: - fi-icl-u3: [DMESG-WARN][3] ([fdo#107724]) -> [PASS][4] +1 similar issue [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/fi-icl-u3/igt@gem_flink_basic@double-flink.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/fi-icl-u3/igt@gem_flink_basic@double-flink.html * igt@kms_frontbuffer_tracking@basic: - {fi-icl-guc}: [FAIL][5] ([fdo#103167]) -> [PASS][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/fi-icl-guc/igt@kms_frontbuffer_tracking@basic.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/fi-icl-guc/igt@kms_frontbuffer_tracking@basic.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724 Participating hosts (50 -> 42) ------------------------------ Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bwr-2160 fi-ctg-p8600 fi-gdg-551 fi-byt-clapper Build changes ------------- * CI: CI-20190529 -> None * Linux: CI_DRM_7266 -> Patchwork_15148 CI-20190529: 20190529 CI_DRM_7266: 1476c64a0b4c7ee43e50f83ba1d6518e60211a36 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5263: 8a5d44dc5e51622cd43f23c2cf24d44c24a0564d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15148: 7ea9036094764c8f7ec10f7ae0d5e4c128a9ab97 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 7ea903609476 drm/i915/gem: Safely acquire the ctx->vm when copying == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/index.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-07 7:44 ` Patchwork 0 siblings, 0 replies; 12+ messages in thread From: Patchwork @ 2019-11-07 7:44 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915/gem: Safely acquire the ctx->vm when copying URL : https://patchwork.freedesktop.org/series/69044/ State : success == Summary == CI Bug Log - changes from CI_DRM_7266_full -> Patchwork_15148_full ==================================================== Summary ------- **SUCCESS** No regressions found. Known issues ------------ Here are the changes found in Patchwork_15148_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_ctx_exec@basic-invalid-context-vcs1: - shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#112080]) +19 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb1/igt@gem_ctx_exec@basic-invalid-context-vcs1.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb5/igt@gem_ctx_exec@basic-invalid-context-vcs1.html * igt@gem_ctx_isolation@vcs1-dirty-create: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276] / [fdo#112080]) +2 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb4/igt@gem_ctx_isolation@vcs1-dirty-create.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb6/igt@gem_ctx_isolation@vcs1-dirty-create.html * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110841]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb3/igt@gem_ctx_shared@exec-single-timeline-bsd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb2/igt@gem_ctx_shared@exec-single-timeline-bsd.html * igt@gem_exec_balancer@smoke: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#110854]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb2/igt@gem_exec_balancer@smoke.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb7/igt@gem_exec_balancer@smoke.html * igt@gem_exec_schedule@preempt-other-chain-bsd: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +8 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb8/igt@gem_exec_schedule@preempt-other-chain-bsd.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb1/igt@gem_exec_schedule@preempt-other-chain-bsd.html * igt@gem_softpin@noreloc-s3: - shard-apl: [PASS][11] -> [DMESG-WARN][12] ([fdo#108566]) +1 similar issue [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-apl8/igt@gem_softpin@noreloc-s3.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-apl6/igt@gem_softpin@noreloc-s3.html * igt@gem_userptr_blits@sync-unmap: - shard-snb: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-snb5/igt@gem_userptr_blits@sync-unmap.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-snb1/igt@gem_userptr_blits@sync-unmap.html * igt@i915_pm_rc6_residency@rc6-accuracy: - shard-kbl: [PASS][15] -> [SKIP][16] ([fdo#109271]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl6/igt@i915_pm_rc6_residency@rc6-accuracy.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl3/igt@i915_pm_rc6_residency@rc6-accuracy.html * igt@kms_color@pipe-a-ctm-0-75: - shard-skl: [PASS][17] -> [DMESG-WARN][18] ([fdo#106107]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl8/igt@kms_color@pipe-a-ctm-0-75.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl3/igt@kms_color@pipe-a-ctm-0-75.html * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-glk: [PASS][19] -> [FAIL][20] ([fdo#104873]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-glk9/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-glk9/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html * igt@kms_draw_crc@draw-method-rgb565-blt-xtiled: - shard-skl: [PASS][21] -> [FAIL][22] ([fdo#103184] / [fdo#103232]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl7/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl7/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html * igt@kms_flip@flip-vs-expired-vblank: - shard-skl: [PASS][23] -> [FAIL][24] ([fdo#105363]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl5/igt@kms_flip@flip-vs-expired-vblank.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl8/igt@kms_flip@flip-vs-expired-vblank.html * igt@kms_flip@flip-vs-suspend-interruptible: - shard-kbl: [PASS][25] -> [DMESG-WARN][26] ([fdo#108566]) +3 similar issues [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl2/igt@kms_flip@flip-vs-suspend-interruptible.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl4/igt@kms_flip@flip-vs-suspend-interruptible.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt: - shard-iclb: [PASS][27] -> [FAIL][28] ([fdo#103167]) +6 similar issues [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc: - shard-skl: [PASS][29] -> [FAIL][30] ([fdo#108145] / [fdo#110403]) [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl3/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl4/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html * igt@kms_psr@psr2_sprite_mmap_gtt: - shard-iclb: [PASS][31] -> [SKIP][32] ([fdo#109441]) +1 similar issue [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb6/igt@kms_psr@psr2_sprite_mmap_gtt.html * igt@prime_vgem@fence-wait-bsd2: - shard-iclb: [PASS][33] -> [SKIP][34] ([fdo#109276]) +24 similar issues [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb1/igt@prime_vgem@fence-wait-bsd2.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb6/igt@prime_vgem@fence-wait-bsd2.html #### Possible fixes #### * igt@gem_ctx_isolation@vcs1-none: - shard-iclb: [SKIP][35] ([fdo#109276] / [fdo#112080]) -> [PASS][36] +3 similar issues [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb6/igt@gem_ctx_isolation@vcs1-none.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb1/igt@gem_ctx_isolation@vcs1-none.html * igt@gem_ctx_isolation@vcs1-s3: - {shard-tglb}: [INCOMPLETE][37] ([fdo#111832]) -> [PASS][38] +1 similar issue [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb4/igt@gem_ctx_isolation@vcs1-s3.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb7/igt@gem_ctx_isolation@vcs1-s3.html * igt@gem_ctx_switch@queue-heavy: - {shard-tglb}: [INCOMPLETE][39] ([fdo#111747]) -> [PASS][40] [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb6/igt@gem_ctx_switch@queue-heavy.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb6/igt@gem_ctx_switch@queue-heavy.html * igt@gem_exec_async@concurrent-writes-bsd: - shard-iclb: [SKIP][41] ([fdo#112146]) -> [PASS][42] +2 similar issues [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb2/igt@gem_exec_async@concurrent-writes-bsd.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb7/igt@gem_exec_async@concurrent-writes-bsd.html * igt@gem_exec_schedule@independent-bsd2: - shard-iclb: [SKIP][43] ([fdo#109276]) -> [PASS][44] +21 similar issues [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb5/igt@gem_exec_schedule@independent-bsd2.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb4/igt@gem_exec_schedule@independent-bsd2.html * igt@gem_exec_schedule@smoketest-all: - {shard-tglb}: [INCOMPLETE][45] ([fdo#111855]) -> [PASS][46] [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb6/igt@gem_exec_schedule@smoketest-all.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb1/igt@gem_exec_schedule@smoketest-all.html * igt@gem_persistent_relocs@forked-interruptible-thrashing: - shard-kbl: [FAIL][47] ([fdo#112037]) -> [PASS][48] [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl6/igt@gem_persistent_relocs@forked-interruptible-thrashing.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl6/igt@gem_persistent_relocs@forked-interruptible-thrashing.html * igt@gem_persistent_relocs@forked-thrashing: - shard-snb: [FAIL][49] ([fdo#112037]) -> [PASS][50] [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-snb1/igt@gem_persistent_relocs@forked-thrashing.html [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-snb6/igt@gem_persistent_relocs@forked-thrashing.html * igt@gem_userptr_blits@map-fixed-invalidate-busy: - shard-snb: [DMESG-WARN][51] ([fdo#111870]) -> [PASS][52] [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-snb2/igt@gem_userptr_blits@map-fixed-invalidate-busy.html [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-snb7/igt@gem_userptr_blits@map-fixed-invalidate-busy.html - shard-hsw: [DMESG-WARN][53] ([fdo#111870]) -> [PASS][54] [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-hsw4/igt@gem_userptr_blits@map-fixed-invalidate-busy.html [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-hsw8/igt@gem_userptr_blits@map-fixed-invalidate-busy.html * igt@i915_selftest@mock_requests: - shard-skl: [INCOMPLETE][55] ([fdo#108972]) -> [PASS][56] [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl1/igt@i915_selftest@mock_requests.html [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl2/igt@i915_selftest@mock_requests.html * igt@kms_cursor_crc@pipe-a-cursor-suspend: - shard-kbl: [DMESG-WARN][57] ([fdo#108566]) -> [PASS][58] +10 similar issues [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-suspend.html [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-suspend.html * igt@kms_flip@2x-blocking-wf_vblank: - shard-hsw: [INCOMPLETE][59] ([fdo#103540]) -> [PASS][60] [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-hsw2/igt@kms_flip@2x-blocking-wf_vblank.html [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-hsw1/igt@kms_flip@2x-blocking-wf_vblank.html * igt@kms_flip@flip-vs-suspend-interruptible: - shard-skl: [INCOMPLETE][61] ([fdo#109507]) -> [PASS][62] [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl9/igt@kms_flip@flip-vs-suspend-interruptible.html [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl5/igt@kms_flip@flip-vs-suspend-interruptible.html - shard-apl: [DMESG-WARN][63] ([fdo#108566]) -> [PASS][64] +3 similar issues [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-apl4/igt@kms_flip@flip-vs-suspend-interruptible.html [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible.html * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render: - shard-iclb: [FAIL][65] ([fdo#103167]) -> [PASS][66] +4 similar issues [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite: - {shard-tglb}: [FAIL][67] ([fdo#103167]) -> [PASS][68] +2 similar issues [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min: - shard-skl: [FAIL][69] ([fdo#108145]) -> [PASS][70] [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl10/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl5/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html * igt@kms_psr2_su@page_flip: - shard-iclb: [SKIP][71] ([fdo#109642] / [fdo#111068]) -> [PASS][72] [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb3/igt@kms_psr2_su@page_flip.html [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb2/igt@kms_psr2_su@page_flip.html * igt@kms_psr@psr2_cursor_plane_move: - shard-iclb: [SKIP][73] ([fdo#109441]) -> [PASS][74] +2 similar issues [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb1/igt@kms_psr@psr2_cursor_plane_move.html [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html * igt@kms_psr@suspend: - {shard-tglb}: [INCOMPLETE][75] ([fdo#111832] / [fdo#111850]) -> [PASS][76] +3 similar issues [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb2/igt@kms_psr@suspend.html [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb6/igt@kms_psr@suspend.html * igt@kms_setmode@basic: - shard-skl: [FAIL][77] ([fdo#99912]) -> [PASS][78] [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl8/igt@kms_setmode@basic.html [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl3/igt@kms_setmode@basic.html - shard-kbl: [FAIL][79] ([fdo#99912]) -> [PASS][80] [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl3/igt@kms_setmode@basic.html [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl7/igt@kms_setmode@basic.html * igt@perf_pmu@init-busy-vcs1: - shard-iclb: [SKIP][81] ([fdo#112080]) -> [PASS][82] +17 similar issues [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb5/igt@perf_pmu@init-busy-vcs1.html [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb4/igt@perf_pmu@init-busy-vcs1.html #### Warnings #### * igt@gem_ctx_isolation@vcs1-nonpriv: - shard-iclb: [FAIL][83] ([fdo#111329]) -> [SKIP][84] ([fdo#109276] / [fdo#112080]) [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb4/igt@gem_ctx_isolation@vcs1-nonpriv.html [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb6/igt@gem_ctx_isolation@vcs1-nonpriv.html * igt@gem_mocs_settings@mocs-rc6-bsd2: - shard-iclb: [FAIL][85] ([fdo#111330]) -> [SKIP][86] ([fdo#109276]) [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb2/igt@gem_mocs_settings@mocs-rc6-bsd2.html [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb5/igt@gem_mocs_settings@mocs-rc6-bsd2.html * igt@gem_mocs_settings@mocs-settings-bsd2: - shard-iclb: [SKIP][87] ([fdo#109276]) -> [FAIL][88] ([fdo#111330]) [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb5/igt@gem_mocs_settings@mocs-settings-bsd2.html [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb4/igt@gem_mocs_settings@mocs-settings-bsd2.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184 [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232 [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540 [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873 [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363 [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411 [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107 [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145 [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566 [fdo#108972]: https://bugs.freedesktop.org/show_bug.cgi?id=108972 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276 [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441 [fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507 [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642 [fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403 [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841 [fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854 [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068 [fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329 [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330 [fdo#111593]: https://bugs.freedesktop.org/show_bug.cgi?id=111593 [fdo#111606]: https://bugs.freedesktop.org/show_bug.cgi?id=111606 [fdo#111677]: https://bugs.freedesktop.org/show_bug.cgi?id=111677 [fdo#111747]: https://bugs.freedesktop.org/show_bug.cgi?id=111747 [fdo#111781]: https://bugs.freedesktop.org/show_bug.cgi?id=111781 [fdo#111830 ]: https://bugs.freedesktop.org/show_bug.cgi?id=111830 [fdo#111832]: https://bugs.freedesktop.org/show_bug.cgi?id=111832 [fdo#111850]: https://bugs.freedesktop.org/show_bug.cgi?id=111850 [fdo#111855]: https://bugs.freedesktop.org/show_bug.cgi?id=111855 [fdo#111865]: https://bugs.freedesktop.org/show_bug.cgi?id=111865 [fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870 [fdo#112037]: https://bugs.freedesktop.org/show_bug.cgi?id=112037 [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080 [fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146 [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912 Participating hosts (11 -> 11) ------------------------------ No changes in participating hosts Build changes ------------- * CI: CI-20190529 -> None * Linux: CI_DRM_7266 -> Patchwork_15148 CI-20190529: 20190529 CI_DRM_7266: 1476c64a0b4c7ee43e50f83ba1d6518e60211a36 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5263: 8a5d44dc5e51622cd43f23c2cf24d44c24a0564d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15148: 7ea9036094764c8f7ec10f7ae0d5e4c128a9ab97 @ 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_15148/index.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
* [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-07 7:44 ` Patchwork 0 siblings, 0 replies; 12+ messages in thread From: Patchwork @ 2019-11-07 7:44 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx == Series Details == Series: drm/i915/gem: Safely acquire the ctx->vm when copying URL : https://patchwork.freedesktop.org/series/69044/ State : success == Summary == CI Bug Log - changes from CI_DRM_7266_full -> Patchwork_15148_full ==================================================== Summary ------- **SUCCESS** No regressions found. Known issues ------------ Here are the changes found in Patchwork_15148_full that come from known issues: ### IGT changes ### #### Issues hit #### * igt@gem_ctx_exec@basic-invalid-context-vcs1: - shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#112080]) +19 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb1/igt@gem_ctx_exec@basic-invalid-context-vcs1.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb5/igt@gem_ctx_exec@basic-invalid-context-vcs1.html * igt@gem_ctx_isolation@vcs1-dirty-create: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276] / [fdo#112080]) +2 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb4/igt@gem_ctx_isolation@vcs1-dirty-create.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb6/igt@gem_ctx_isolation@vcs1-dirty-create.html * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110841]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb3/igt@gem_ctx_shared@exec-single-timeline-bsd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb2/igt@gem_ctx_shared@exec-single-timeline-bsd.html * igt@gem_exec_balancer@smoke: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#110854]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb2/igt@gem_exec_balancer@smoke.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb7/igt@gem_exec_balancer@smoke.html * igt@gem_exec_schedule@preempt-other-chain-bsd: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +8 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb8/igt@gem_exec_schedule@preempt-other-chain-bsd.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb1/igt@gem_exec_schedule@preempt-other-chain-bsd.html * igt@gem_softpin@noreloc-s3: - shard-apl: [PASS][11] -> [DMESG-WARN][12] ([fdo#108566]) +1 similar issue [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-apl8/igt@gem_softpin@noreloc-s3.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-apl6/igt@gem_softpin@noreloc-s3.html * igt@gem_userptr_blits@sync-unmap: - shard-snb: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-snb5/igt@gem_userptr_blits@sync-unmap.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-snb1/igt@gem_userptr_blits@sync-unmap.html * igt@i915_pm_rc6_residency@rc6-accuracy: - shard-kbl: [PASS][15] -> [SKIP][16] ([fdo#109271]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl6/igt@i915_pm_rc6_residency@rc6-accuracy.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl3/igt@i915_pm_rc6_residency@rc6-accuracy.html * igt@kms_color@pipe-a-ctm-0-75: - shard-skl: [PASS][17] -> [DMESG-WARN][18] ([fdo#106107]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl8/igt@kms_color@pipe-a-ctm-0-75.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl3/igt@kms_color@pipe-a-ctm-0-75.html * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-glk: [PASS][19] -> [FAIL][20] ([fdo#104873]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-glk9/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-glk9/igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic.html * igt@kms_draw_crc@draw-method-rgb565-blt-xtiled: - shard-skl: [PASS][21] -> [FAIL][22] ([fdo#103184] / [fdo#103232]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl7/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl7/igt@kms_draw_crc@draw-method-rgb565-blt-xtiled.html * igt@kms_flip@flip-vs-expired-vblank: - shard-skl: [PASS][23] -> [FAIL][24] ([fdo#105363]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl5/igt@kms_flip@flip-vs-expired-vblank.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl8/igt@kms_flip@flip-vs-expired-vblank.html * igt@kms_flip@flip-vs-suspend-interruptible: - shard-kbl: [PASS][25] -> [DMESG-WARN][26] ([fdo#108566]) +3 similar issues [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl2/igt@kms_flip@flip-vs-suspend-interruptible.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl4/igt@kms_flip@flip-vs-suspend-interruptible.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt: - shard-iclb: [PASS][27] -> [FAIL][28] ([fdo#103167]) +6 similar issues [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb2/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt.html * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc: - shard-skl: [PASS][29] -> [FAIL][30] ([fdo#108145] / [fdo#110403]) [29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl3/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl4/igt@kms_plane_alpha_blend@pipe-c-coverage-7efc.html * igt@kms_psr@psr2_sprite_mmap_gtt: - shard-iclb: [PASS][31] -> [SKIP][32] ([fdo#109441]) +1 similar issue [31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb2/igt@kms_psr@psr2_sprite_mmap_gtt.html [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb6/igt@kms_psr@psr2_sprite_mmap_gtt.html * igt@prime_vgem@fence-wait-bsd2: - shard-iclb: [PASS][33] -> [SKIP][34] ([fdo#109276]) +24 similar issues [33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb1/igt@prime_vgem@fence-wait-bsd2.html [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb6/igt@prime_vgem@fence-wait-bsd2.html #### Possible fixes #### * igt@gem_ctx_isolation@vcs1-none: - shard-iclb: [SKIP][35] ([fdo#109276] / [fdo#112080]) -> [PASS][36] +3 similar issues [35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb6/igt@gem_ctx_isolation@vcs1-none.html [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb1/igt@gem_ctx_isolation@vcs1-none.html * igt@gem_ctx_isolation@vcs1-s3: - {shard-tglb}: [INCOMPLETE][37] ([fdo#111832]) -> [PASS][38] +1 similar issue [37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb4/igt@gem_ctx_isolation@vcs1-s3.html [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb7/igt@gem_ctx_isolation@vcs1-s3.html * igt@gem_ctx_switch@queue-heavy: - {shard-tglb}: [INCOMPLETE][39] ([fdo#111747]) -> [PASS][40] [39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb6/igt@gem_ctx_switch@queue-heavy.html [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb6/igt@gem_ctx_switch@queue-heavy.html * igt@gem_exec_async@concurrent-writes-bsd: - shard-iclb: [SKIP][41] ([fdo#112146]) -> [PASS][42] +2 similar issues [41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb2/igt@gem_exec_async@concurrent-writes-bsd.html [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb7/igt@gem_exec_async@concurrent-writes-bsd.html * igt@gem_exec_schedule@independent-bsd2: - shard-iclb: [SKIP][43] ([fdo#109276]) -> [PASS][44] +21 similar issues [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb5/igt@gem_exec_schedule@independent-bsd2.html [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb4/igt@gem_exec_schedule@independent-bsd2.html * igt@gem_exec_schedule@smoketest-all: - {shard-tglb}: [INCOMPLETE][45] ([fdo#111855]) -> [PASS][46] [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb6/igt@gem_exec_schedule@smoketest-all.html [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb1/igt@gem_exec_schedule@smoketest-all.html * igt@gem_persistent_relocs@forked-interruptible-thrashing: - shard-kbl: [FAIL][47] ([fdo#112037]) -> [PASS][48] [47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl6/igt@gem_persistent_relocs@forked-interruptible-thrashing.html [48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl6/igt@gem_persistent_relocs@forked-interruptible-thrashing.html * igt@gem_persistent_relocs@forked-thrashing: - shard-snb: [FAIL][49] ([fdo#112037]) -> [PASS][50] [49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-snb1/igt@gem_persistent_relocs@forked-thrashing.html [50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-snb6/igt@gem_persistent_relocs@forked-thrashing.html * igt@gem_userptr_blits@map-fixed-invalidate-busy: - shard-snb: [DMESG-WARN][51] ([fdo#111870]) -> [PASS][52] [51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-snb2/igt@gem_userptr_blits@map-fixed-invalidate-busy.html [52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-snb7/igt@gem_userptr_blits@map-fixed-invalidate-busy.html - shard-hsw: [DMESG-WARN][53] ([fdo#111870]) -> [PASS][54] [53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-hsw4/igt@gem_userptr_blits@map-fixed-invalidate-busy.html [54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-hsw8/igt@gem_userptr_blits@map-fixed-invalidate-busy.html * igt@i915_selftest@mock_requests: - shard-skl: [INCOMPLETE][55] ([fdo#108972]) -> [PASS][56] [55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl1/igt@i915_selftest@mock_requests.html [56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl2/igt@i915_selftest@mock_requests.html * igt@kms_cursor_crc@pipe-a-cursor-suspend: - shard-kbl: [DMESG-WARN][57] ([fdo#108566]) -> [PASS][58] +10 similar issues [57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl2/igt@kms_cursor_crc@pipe-a-cursor-suspend.html [58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl3/igt@kms_cursor_crc@pipe-a-cursor-suspend.html * igt@kms_flip@2x-blocking-wf_vblank: - shard-hsw: [INCOMPLETE][59] ([fdo#103540]) -> [PASS][60] [59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-hsw2/igt@kms_flip@2x-blocking-wf_vblank.html [60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-hsw1/igt@kms_flip@2x-blocking-wf_vblank.html * igt@kms_flip@flip-vs-suspend-interruptible: - shard-skl: [INCOMPLETE][61] ([fdo#109507]) -> [PASS][62] [61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl9/igt@kms_flip@flip-vs-suspend-interruptible.html [62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl5/igt@kms_flip@flip-vs-suspend-interruptible.html - shard-apl: [DMESG-WARN][63] ([fdo#108566]) -> [PASS][64] +3 similar issues [63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-apl4/igt@kms_flip@flip-vs-suspend-interruptible.html [64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible.html * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render: - shard-iclb: [FAIL][65] ([fdo#103167]) -> [PASS][66] +4 similar issues [65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb8/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html [66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb1/igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite: - {shard-tglb}: [FAIL][67] ([fdo#103167]) -> [PASS][68] +2 similar issues [67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb1/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html [68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb3/igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite.html * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min: - shard-skl: [FAIL][69] ([fdo#108145]) -> [PASS][70] [69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl10/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html [70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl5/igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min.html * igt@kms_psr2_su@page_flip: - shard-iclb: [SKIP][71] ([fdo#109642] / [fdo#111068]) -> [PASS][72] [71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb3/igt@kms_psr2_su@page_flip.html [72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb2/igt@kms_psr2_su@page_flip.html * igt@kms_psr@psr2_cursor_plane_move: - shard-iclb: [SKIP][73] ([fdo#109441]) -> [PASS][74] +2 similar issues [73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb1/igt@kms_psr@psr2_cursor_plane_move.html [74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html * igt@kms_psr@suspend: - {shard-tglb}: [INCOMPLETE][75] ([fdo#111832] / [fdo#111850]) -> [PASS][76] +3 similar issues [75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-tglb2/igt@kms_psr@suspend.html [76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-tglb6/igt@kms_psr@suspend.html * igt@kms_setmode@basic: - shard-skl: [FAIL][77] ([fdo#99912]) -> [PASS][78] [77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl8/igt@kms_setmode@basic.html [78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl3/igt@kms_setmode@basic.html - shard-kbl: [FAIL][79] ([fdo#99912]) -> [PASS][80] [79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl3/igt@kms_setmode@basic.html [80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl7/igt@kms_setmode@basic.html * igt@perf_pmu@init-busy-vcs1: - shard-iclb: [SKIP][81] ([fdo#112080]) -> [PASS][82] +17 similar issues [81]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb5/igt@perf_pmu@init-busy-vcs1.html [82]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb4/igt@perf_pmu@init-busy-vcs1.html #### Warnings #### * igt@gem_ctx_isolation@vcs1-nonpriv: - shard-iclb: [FAIL][83] ([fdo#111329]) -> [SKIP][84] ([fdo#109276] / [fdo#112080]) [83]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb4/igt@gem_ctx_isolation@vcs1-nonpriv.html [84]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb6/igt@gem_ctx_isolation@vcs1-nonpriv.html * igt@gem_mocs_settings@mocs-rc6-bsd2: - shard-iclb: [FAIL][85] ([fdo#111330]) -> [SKIP][86] ([fdo#109276]) [85]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb2/igt@gem_mocs_settings@mocs-rc6-bsd2.html [86]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb5/igt@gem_mocs_settings@mocs-rc6-bsd2.html * igt@gem_mocs_settings@mocs-settings-bsd2: - shard-iclb: [SKIP][87] ([fdo#109276]) -> [FAIL][88] ([fdo#111330]) [87]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb5/igt@gem_mocs_settings@mocs-settings-bsd2.html [88]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb4/igt@gem_mocs_settings@mocs-settings-bsd2.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103184]: https://bugs.freedesktop.org/show_bug.cgi?id=103184 [fdo#103232]: https://bugs.freedesktop.org/show_bug.cgi?id=103232 [fdo#103540]: https://bugs.freedesktop.org/show_bug.cgi?id=103540 [fdo#104873]: https://bugs.freedesktop.org/show_bug.cgi?id=104873 [fdo#105363]: https://bugs.freedesktop.org/show_bug.cgi?id=105363 [fdo#105411]: https://bugs.freedesktop.org/show_bug.cgi?id=105411 [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107 [fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145 [fdo#108566]: https://bugs.freedesktop.org/show_bug.cgi?id=108566 [fdo#108972]: https://bugs.freedesktop.org/show_bug.cgi?id=108972 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276 [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441 [fdo#109507]: https://bugs.freedesktop.org/show_bug.cgi?id=109507 [fdo#109642]: https://bugs.freedesktop.org/show_bug.cgi?id=109642 [fdo#110403]: https://bugs.freedesktop.org/show_bug.cgi?id=110403 [fdo#110841]: https://bugs.freedesktop.org/show_bug.cgi?id=110841 [fdo#110854]: https://bugs.freedesktop.org/show_bug.cgi?id=110854 [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068 [fdo#111329]: https://bugs.freedesktop.org/show_bug.cgi?id=111329 [fdo#111330]: https://bugs.freedesktop.org/show_bug.cgi?id=111330 [fdo#111593]: https://bugs.freedesktop.org/show_bug.cgi?id=111593 [fdo#111606]: https://bugs.freedesktop.org/show_bug.cgi?id=111606 [fdo#111677]: https://bugs.freedesktop.org/show_bug.cgi?id=111677 [fdo#111747]: https://bugs.freedesktop.org/show_bug.cgi?id=111747 [fdo#111781]: https://bugs.freedesktop.org/show_bug.cgi?id=111781 [fdo#111830 ]: https://bugs.freedesktop.org/show_bug.cgi?id=111830 [fdo#111832]: https://bugs.freedesktop.org/show_bug.cgi?id=111832 [fdo#111850]: https://bugs.freedesktop.org/show_bug.cgi?id=111850 [fdo#111855]: https://bugs.freedesktop.org/show_bug.cgi?id=111855 [fdo#111865]: https://bugs.freedesktop.org/show_bug.cgi?id=111865 [fdo#111870]: https://bugs.freedesktop.org/show_bug.cgi?id=111870 [fdo#112037]: https://bugs.freedesktop.org/show_bug.cgi?id=112037 [fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080 [fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146 [fdo#99912]: https://bugs.freedesktop.org/show_bug.cgi?id=99912 Participating hosts (11 -> 11) ------------------------------ No changes in participating hosts Build changes ------------- * CI: CI-20190529 -> None * Linux: CI_DRM_7266 -> Patchwork_15148 CI-20190529: 20190529 CI_DRM_7266: 1476c64a0b4c7ee43e50f83ba1d6518e60211a36 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5263: 8a5d44dc5e51622cd43f23c2cf24d44c24a0564d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15148: 7ea9036094764c8f7ec10f7ae0d5e4c128a9ab97 @ 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_15148/index.html _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-07 16:09 ` Niranjan Vishwanathapura 0 siblings, 0 replies; 12+ messages in thread From: Niranjan Vishwanathapura @ 2019-11-07 16:09 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx On Wed, Nov 06, 2019 at 09:13:12AM +0000, Chris Wilson wrote: >As we read the ctx->vm unlocked before cloning/exporting, we should >validate our reference is correct before returning it. We already do for >clone_vm() but were not so strict around get_ppgtt(). > >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >--- > drivers/gpu/drm/i915/gem/i915_gem_context.c | 80 +++++++++++---------- > 1 file changed, 43 insertions(+), 37 deletions(-) > >diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c >index de6e55af82cf..a06cc8e63281 100644 >--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c >+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c >@@ -995,6 +995,38 @@ static int context_barrier_task(struct i915_gem_context *ctx, > return err; > } > >+static struct i915_address_space * >+context_get_vm_rcu(struct i915_gem_context *ctx) >+{ >+ do { >+ struct i915_address_space *vm; >+ >+ vm = rcu_dereference(ctx->vm); >+ if (!kref_get_unless_zero(&vm->ref)) >+ continue; But should we check for NULL vm? I know the callers are ensuring ctx->vm will not be NULL, but just wondering. >+ >+ /* >+ * This ppgtt may have be reallocated between >+ * the read and the kref, and reassigned to a third >+ * context. In order to avoid inadvertent sharing >+ * of this ppgtt with that third context (and not >+ * src), we have to confirm that we have the same >+ * ppgtt after passing through the strong memory >+ * barrier implied by a successful >+ * kref_get_unless_zero(). >+ * >+ * Once we have acquired the current ppgtt of src, >+ * we no longer care if it is released from src, as >+ * it cannot be reallocated elsewhere. >+ */ Comment should be made generic? It is too specific to cloning case. Other than that, patch looks good to me. Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> >+ >+ if (vm == rcu_access_pointer(ctx->vm)) >+ return rcu_pointer_handoff(vm); >+ >+ i915_vm_put(vm); >+ } while (1); >+} >+ > static int get_ppgtt(struct drm_i915_file_private *file_priv, > struct i915_gem_context *ctx, > struct drm_i915_gem_context_param *args) >@@ -1006,7 +1038,7 @@ static int get_ppgtt(struct drm_i915_file_private *file_priv, > return -ENODEV; > > rcu_read_lock(); >- vm = i915_vm_get(ctx->vm); >+ vm = context_get_vm_rcu(ctx); > rcu_read_unlock(); > > ret = mutex_lock_interruptible(&file_priv->vm_idr_lock); >@@ -2035,47 +2067,21 @@ static int clone_vm(struct i915_gem_context *dst, > struct i915_address_space *vm; > int err = 0; > >- rcu_read_lock(); >- do { >- vm = rcu_dereference(src->vm); >- if (!vm) >- break; >- >- if (!kref_get_unless_zero(&vm->ref)) >- continue; >- >- /* >- * This ppgtt may have be reallocated between >- * the read and the kref, and reassigned to a third >- * context. In order to avoid inadvertent sharing >- * of this ppgtt with that third context (and not >- * src), we have to confirm that we have the same >- * ppgtt after passing through the strong memory >- * barrier implied by a successful >- * kref_get_unless_zero(). >- * >- * Once we have acquired the current ppgtt of src, >- * we no longer care if it is released from src, as >- * it cannot be reallocated elsewhere. >- */ >- >- if (vm == rcu_access_pointer(src->vm)) >- break; >+ if (!rcu_access_pointer(src->vm)) >+ return 0; > >- i915_vm_put(vm); >- } while (1); >+ rcu_read_lock(); >+ vm = context_get_vm_rcu(src); > rcu_read_unlock(); > >- if (vm) { >- if (!mutex_lock_interruptible(&dst->mutex)) { >- __assign_ppgtt(dst, vm); >- mutex_unlock(&dst->mutex); >- } else { >- err = -EINTR; >- } >- i915_vm_put(vm); >+ if (!mutex_lock_interruptible(&dst->mutex)) { >+ __assign_ppgtt(dst, vm); >+ mutex_unlock(&dst->mutex); >+ } else { >+ err = -EINTR; > } > >+ i915_vm_put(vm); > return err; > } > >-- >2.24.0 > >_______________________________________________ >Intel-gfx mailing list >Intel-gfx@lists.freedesktop.org >https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-07 16:09 ` Niranjan Vishwanathapura 0 siblings, 0 replies; 12+ messages in thread From: Niranjan Vishwanathapura @ 2019-11-07 16:09 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx On Wed, Nov 06, 2019 at 09:13:12AM +0000, Chris Wilson wrote: >As we read the ctx->vm unlocked before cloning/exporting, we should >validate our reference is correct before returning it. We already do for >clone_vm() but were not so strict around get_ppgtt(). > >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >--- > drivers/gpu/drm/i915/gem/i915_gem_context.c | 80 +++++++++++---------- > 1 file changed, 43 insertions(+), 37 deletions(-) > >diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c >index de6e55af82cf..a06cc8e63281 100644 >--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c >+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c >@@ -995,6 +995,38 @@ static int context_barrier_task(struct i915_gem_context *ctx, > return err; > } > >+static struct i915_address_space * >+context_get_vm_rcu(struct i915_gem_context *ctx) >+{ >+ do { >+ struct i915_address_space *vm; >+ >+ vm = rcu_dereference(ctx->vm); >+ if (!kref_get_unless_zero(&vm->ref)) >+ continue; But should we check for NULL vm? I know the callers are ensuring ctx->vm will not be NULL, but just wondering. >+ >+ /* >+ * This ppgtt may have be reallocated between >+ * the read and the kref, and reassigned to a third >+ * context. In order to avoid inadvertent sharing >+ * of this ppgtt with that third context (and not >+ * src), we have to confirm that we have the same >+ * ppgtt after passing through the strong memory >+ * barrier implied by a successful >+ * kref_get_unless_zero(). >+ * >+ * Once we have acquired the current ppgtt of src, >+ * we no longer care if it is released from src, as >+ * it cannot be reallocated elsewhere. >+ */ Comment should be made generic? It is too specific to cloning case. Other than that, patch looks good to me. Reviewed-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> >+ >+ if (vm == rcu_access_pointer(ctx->vm)) >+ return rcu_pointer_handoff(vm); >+ >+ i915_vm_put(vm); >+ } while (1); >+} >+ > static int get_ppgtt(struct drm_i915_file_private *file_priv, > struct i915_gem_context *ctx, > struct drm_i915_gem_context_param *args) >@@ -1006,7 +1038,7 @@ static int get_ppgtt(struct drm_i915_file_private *file_priv, > return -ENODEV; > > rcu_read_lock(); >- vm = i915_vm_get(ctx->vm); >+ vm = context_get_vm_rcu(ctx); > rcu_read_unlock(); > > ret = mutex_lock_interruptible(&file_priv->vm_idr_lock); >@@ -2035,47 +2067,21 @@ static int clone_vm(struct i915_gem_context *dst, > struct i915_address_space *vm; > int err = 0; > >- rcu_read_lock(); >- do { >- vm = rcu_dereference(src->vm); >- if (!vm) >- break; >- >- if (!kref_get_unless_zero(&vm->ref)) >- continue; >- >- /* >- * This ppgtt may have be reallocated between >- * the read and the kref, and reassigned to a third >- * context. In order to avoid inadvertent sharing >- * of this ppgtt with that third context (and not >- * src), we have to confirm that we have the same >- * ppgtt after passing through the strong memory >- * barrier implied by a successful >- * kref_get_unless_zero(). >- * >- * Once we have acquired the current ppgtt of src, >- * we no longer care if it is released from src, as >- * it cannot be reallocated elsewhere. >- */ >- >- if (vm == rcu_access_pointer(src->vm)) >- break; >+ if (!rcu_access_pointer(src->vm)) >+ return 0; > >- i915_vm_put(vm); >- } while (1); >+ rcu_read_lock(); >+ vm = context_get_vm_rcu(src); > rcu_read_unlock(); > >- if (vm) { >- if (!mutex_lock_interruptible(&dst->mutex)) { >- __assign_ppgtt(dst, vm); >- mutex_unlock(&dst->mutex); >- } else { >- err = -EINTR; >- } >- i915_vm_put(vm); >+ if (!mutex_lock_interruptible(&dst->mutex)) { >+ __assign_ppgtt(dst, vm); >+ mutex_unlock(&dst->mutex); >+ } else { >+ err = -EINTR; > } > >+ i915_vm_put(vm); > return err; > } > >-- >2.24.0 > >_______________________________________________ >Intel-gfx mailing list >Intel-gfx@lists.freedesktop.org >https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-07 17:01 ` Chris Wilson 0 siblings, 0 replies; 12+ messages in thread From: Chris Wilson @ 2019-11-07 17:01 UTC (permalink / raw) To: Niranjan Vishwanathapura; +Cc: intel-gfx Quoting Niranjan Vishwanathapura (2019-11-07 16:09:31) > On Wed, Nov 06, 2019 at 09:13:12AM +0000, Chris Wilson wrote: > >As we read the ctx->vm unlocked before cloning/exporting, we should > >validate our reference is correct before returning it. We already do for > >clone_vm() but were not so strict around get_ppgtt(). > > > >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > >--- > > drivers/gpu/drm/i915/gem/i915_gem_context.c | 80 +++++++++++---------- > > 1 file changed, 43 insertions(+), 37 deletions(-) > > > >diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c > >index de6e55af82cf..a06cc8e63281 100644 > >--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c > >+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c > >@@ -995,6 +995,38 @@ static int context_barrier_task(struct i915_gem_context *ctx, > > return err; > > } > > > >+static struct i915_address_space * > >+context_get_vm_rcu(struct i915_gem_context *ctx) > >+{ > >+ do { > >+ struct i915_address_space *vm; > >+ > >+ vm = rcu_dereference(ctx->vm); > >+ if (!kref_get_unless_zero(&vm->ref)) > >+ continue; > > But should we check for NULL vm? > I know the callers are ensuring ctx->vm will not be NULL, but just wondering. We don't need to as the rule is that ctx->vm once set can never be unset; and it can only be set during construction based on the HW properties. The idea is that !!ctx->vm is an invariant indicating whether or not we have full-ppgtt enabled. From a security perspective, allowing a downgrade from full-ppgtt to a shared global gtt is a big no, so I don't anticipating us allowing setting ctx->vm to NULL anytime in the near future :) > >+ > >+ /* > >+ * This ppgtt may have be reallocated between > >+ * the read and the kref, and reassigned to a third > >+ * context. In order to avoid inadvertent sharing > >+ * of this ppgtt with that third context (and not > >+ * src), we have to confirm that we have the same > >+ * ppgtt after passing through the strong memory > >+ * barrier implied by a successful > >+ * kref_get_unless_zero(). > >+ * > >+ * Once we have acquired the current ppgtt of src, > >+ * we no longer care if it is released from src, as > >+ * it cannot be reallocated elsewhere. > >+ */ > > Comment should be made generic? It is too specific to cloning case. s/src/ctx/ -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-07 17:01 ` Chris Wilson 0 siblings, 0 replies; 12+ messages in thread From: Chris Wilson @ 2019-11-07 17:01 UTC (permalink / raw) To: Niranjan Vishwanathapura; +Cc: intel-gfx Quoting Niranjan Vishwanathapura (2019-11-07 16:09:31) > On Wed, Nov 06, 2019 at 09:13:12AM +0000, Chris Wilson wrote: > >As we read the ctx->vm unlocked before cloning/exporting, we should > >validate our reference is correct before returning it. We already do for > >clone_vm() but were not so strict around get_ppgtt(). > > > >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > >--- > > drivers/gpu/drm/i915/gem/i915_gem_context.c | 80 +++++++++++---------- > > 1 file changed, 43 insertions(+), 37 deletions(-) > > > >diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c > >index de6e55af82cf..a06cc8e63281 100644 > >--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c > >+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c > >@@ -995,6 +995,38 @@ static int context_barrier_task(struct i915_gem_context *ctx, > > return err; > > } > > > >+static struct i915_address_space * > >+context_get_vm_rcu(struct i915_gem_context *ctx) > >+{ > >+ do { > >+ struct i915_address_space *vm; > >+ > >+ vm = rcu_dereference(ctx->vm); > >+ if (!kref_get_unless_zero(&vm->ref)) > >+ continue; > > But should we check for NULL vm? > I know the callers are ensuring ctx->vm will not be NULL, but just wondering. We don't need to as the rule is that ctx->vm once set can never be unset; and it can only be set during construction based on the HW properties. The idea is that !!ctx->vm is an invariant indicating whether or not we have full-ppgtt enabled. From a security perspective, allowing a downgrade from full-ppgtt to a shared global gtt is a big no, so I don't anticipating us allowing setting ctx->vm to NULL anytime in the near future :) > >+ > >+ /* > >+ * This ppgtt may have be reallocated between > >+ * the read and the kref, and reassigned to a third > >+ * context. In order to avoid inadvertent sharing > >+ * of this ppgtt with that third context (and not > >+ * src), we have to confirm that we have the same > >+ * ppgtt after passing through the strong memory > >+ * barrier implied by a successful > >+ * kref_get_unless_zero(). > >+ * > >+ * Once we have acquired the current ppgtt of src, > >+ * we no longer care if it is released from src, as > >+ * it cannot be reallocated elsewhere. > >+ */ > > Comment should be made generic? It is too specific to cloning case. s/src/ctx/ -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-07 19:40 ` Niranjan Vishwanathapura 0 siblings, 0 replies; 12+ messages in thread From: Niranjan Vishwanathapura @ 2019-11-07 19:40 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx On Thu, Nov 07, 2019 at 05:01:14PM +0000, Chris Wilson wrote: >Quoting Niranjan Vishwanathapura (2019-11-07 16:09:31) >> On Wed, Nov 06, 2019 at 09:13:12AM +0000, Chris Wilson wrote: >> >As we read the ctx->vm unlocked before cloning/exporting, we should >> >validate our reference is correct before returning it. We already do for >> >clone_vm() but were not so strict around get_ppgtt(). >> > >> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >> >--- >> > drivers/gpu/drm/i915/gem/i915_gem_context.c | 80 +++++++++++---------- >> > 1 file changed, 43 insertions(+), 37 deletions(-) >> > >> >diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c >> >index de6e55af82cf..a06cc8e63281 100644 >> >--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c >> >+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c >> >@@ -995,6 +995,38 @@ static int context_barrier_task(struct i915_gem_context *ctx, >> > return err; >> > } >> > >> >+static struct i915_address_space * >> >+context_get_vm_rcu(struct i915_gem_context *ctx) >> >+{ >> >+ do { >> >+ struct i915_address_space *vm; >> >+ >> >+ vm = rcu_dereference(ctx->vm); >> >+ if (!kref_get_unless_zero(&vm->ref)) >> >+ continue; >> >> But should we check for NULL vm? >> I know the callers are ensuring ctx->vm will not be NULL, but just wondering. > >We don't need to as the rule is that ctx->vm once set can never be >unset; and it can only be set during construction based on the HW >properties. The idea is that !!ctx->vm is an invariant indicating >whether or not we have full-ppgtt enabled. From a security perspective, >allowing a downgrade from full-ppgtt to a shared global gtt is a big no, >so I don't anticipating us allowing setting ctx->vm to NULL anytime in >the near future :) OK, sounds right. > >> >+ >> >+ /* >> >+ * This ppgtt may have be reallocated between >> >+ * the read and the kref, and reassigned to a third >> >+ * context. In order to avoid inadvertent sharing >> >+ * of this ppgtt with that third context (and not >> >+ * src), we have to confirm that we have the same >> >+ * ppgtt after passing through the strong memory >> >+ * barrier implied by a successful >> >+ * kref_get_unless_zero(). >> >+ * >> >+ * Once we have acquired the current ppgtt of src, >> >+ * we no longer care if it is released from src, as >> >+ * it cannot be reallocated elsewhere. >> >+ */ >> >> Comment should be made generic? It is too specific to cloning case. > >s/src/ctx/ >-Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/gem: Safely acquire the ctx->vm when copying @ 2019-11-07 19:40 ` Niranjan Vishwanathapura 0 siblings, 0 replies; 12+ messages in thread From: Niranjan Vishwanathapura @ 2019-11-07 19:40 UTC (permalink / raw) To: Chris Wilson; +Cc: intel-gfx On Thu, Nov 07, 2019 at 05:01:14PM +0000, Chris Wilson wrote: >Quoting Niranjan Vishwanathapura (2019-11-07 16:09:31) >> On Wed, Nov 06, 2019 at 09:13:12AM +0000, Chris Wilson wrote: >> >As we read the ctx->vm unlocked before cloning/exporting, we should >> >validate our reference is correct before returning it. We already do for >> >clone_vm() but were not so strict around get_ppgtt(). >> > >> >Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> >> >--- >> > drivers/gpu/drm/i915/gem/i915_gem_context.c | 80 +++++++++++---------- >> > 1 file changed, 43 insertions(+), 37 deletions(-) >> > >> >diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c >> >index de6e55af82cf..a06cc8e63281 100644 >> >--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c >> >+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c >> >@@ -995,6 +995,38 @@ static int context_barrier_task(struct i915_gem_context *ctx, >> > return err; >> > } >> > >> >+static struct i915_address_space * >> >+context_get_vm_rcu(struct i915_gem_context *ctx) >> >+{ >> >+ do { >> >+ struct i915_address_space *vm; >> >+ >> >+ vm = rcu_dereference(ctx->vm); >> >+ if (!kref_get_unless_zero(&vm->ref)) >> >+ continue; >> >> But should we check for NULL vm? >> I know the callers are ensuring ctx->vm will not be NULL, but just wondering. > >We don't need to as the rule is that ctx->vm once set can never be >unset; and it can only be set during construction based on the HW >properties. The idea is that !!ctx->vm is an invariant indicating >whether or not we have full-ppgtt enabled. From a security perspective, >allowing a downgrade from full-ppgtt to a shared global gtt is a big no, >so I don't anticipating us allowing setting ctx->vm to NULL anytime in >the near future :) OK, sounds right. > >> >+ >> >+ /* >> >+ * This ppgtt may have be reallocated between >> >+ * the read and the kref, and reassigned to a third >> >+ * context. In order to avoid inadvertent sharing >> >+ * of this ppgtt with that third context (and not >> >+ * src), we have to confirm that we have the same >> >+ * ppgtt after passing through the strong memory >> >+ * barrier implied by a successful >> >+ * kref_get_unless_zero(). >> >+ * >> >+ * Once we have acquired the current ppgtt of src, >> >+ * we no longer care if it is released from src, as >> >+ * it cannot be reallocated elsewhere. >> >+ */ >> >> Comment should be made generic? It is too specific to cloning case. > >s/src/ctx/ >-Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2019-11-07 19:52 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-11-06 9:13 [PATCH] drm/i915/gem: Safely acquire the ctx->vm when copying Chris Wilson 2019-11-06 9:13 ` [Intel-gfx] " Chris Wilson 2019-11-06 11:20 ` ✓ Fi.CI.BAT: success for " Patchwork 2019-11-06 11:20 ` [Intel-gfx] " Patchwork 2019-11-07 7:44 ` ✓ Fi.CI.IGT: " Patchwork 2019-11-07 7:44 ` [Intel-gfx] " Patchwork 2019-11-07 16:09 ` [PATCH] " Niranjan Vishwanathapura 2019-11-07 16:09 ` [Intel-gfx] " Niranjan Vishwanathapura 2019-11-07 17:01 ` Chris Wilson 2019-11-07 17:01 ` [Intel-gfx] " Chris Wilson 2019-11-07 19:40 ` Niranjan Vishwanathapura 2019-11-07 19:40 ` [Intel-gfx] " Niranjan Vishwanathapura
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.