Skip to contentSkip to conversation

Revert "i915: don't use a vma that didn't match the context VM"

PATCH Superseded Joonas Lahtinen 3 participants 3 messages May 12

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Joonas Lahtinen

author maintainer
#0 lore raw

PATCH 1/1 Revert "i915: don't use a vma that didn't match the context VM"

This reverts commit 5401b9adebc9e5f68df58226f51493ef0e6ceb4d.

Commit is no-op as per discussion in the linked mail thread. The debated UAF scenario has not been possible in mainline kernel since 2021.

---
 drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +0 -2
index 05997e8bbb29..1f303d4eaa4d 100644
@@ -898,8 +898,6 @@ static struct i915_vma *eb_lookup_vma(struct i915_execbuffer *eb, u32 handle)
 		vma = radix_tree_lookup(&eb->gem_context->handles_vma, handle);
 		if (likely(vma))
 			vma = i915_vma_tryget(vma);
-		else
-			vma = NULL;
 		rcu_read_unlock();
 		if (likely(vma))
 			return vma;
Signature · 1 line
2.54.0
#1 lore raw

✗ i915.CI.BAT: failure for Revert "i915: don't use a vma that didn't match the context VM"

== Series Details ==

== Series Details ==

Series: Revert "i915: don't use a vma that didn't match the context VM"
URL : https://patchwork.freedesktop.org/series/166398/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_18473 -> Patchwork_166398v1
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with Patchwork_166398v1 absolutely need to be verified manually.

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

External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_166398v1/index.html

Participating hosts (42 -> 39)
------------------------------

Missing (3): bat-dg2-13 fi-snb-2520m bat-adls-6

Possible new issues
-------------------

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@guc:
- fi-skl-6600u: [PASS][1] -> [INCOMPLETE][2] +1 other test incomplete
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18473/fi-skl-6600u/igt@i915_selftest@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_166398v1/fi-skl-6600u/igt@i915_selftest@[email protected]

Known issues
------------

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

### IGT changes ###

#### Issues hit ####

* igt@i915_selftest@live:
- bat-mtlp-8: [PASS][3] -> [DMESG-FAIL][4] ([i915#12061]) +1 other test dmesg-fail
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18473/bat-mtlp-8/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_166398v1/bat-mtlp-8/igt@[email protected]
- bat-dg2-8: [PASS][5] -> [DMESG-FAIL][6] ([i915#12061]) +1 other test dmesg-fail
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18473/bat-dg2-8/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_166398v1/bat-dg2-8/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc:
- fi-cfl-8109u: [PASS][7] -> [DMESG-WARN][8] ([i915#15673]) +48 other tests dmesg-warn
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18473/fi-cfl-8109u/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_166398v1/fi-cfl-8109u/igt@[email protected]

#### Possible fixes ####

* igt@core_hotunplug@unbind-rebind:
- bat-rpls-4: [DMESG-WARN][9] ([i915#13400]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_18473/bat-rpls-4/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_166398v1/bat-rpls-4/igt@[email protected]

[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#13400]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13400
[i915#15673]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15673

Build changes
-------------

* Linux: CI_DRM_18473 -> Patchwork_166398v1

CI-20190529: 20190529
CI_DRM_18473: b83102e9c06357b09f2cfbe944269786cb6985c4 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_8903: 6f88532e2fe22529195cc2f8cabff93d994688f8 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_166398v1: b83102e9c06357b09f2cfbe944269786cb6985c4 @ git://anongit.freedesktop.org/gfx-ci/linux

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_166398v1/index.html

#2 lore raw
In reply to Joonas Lahtinen
Quoted 4 lines · Joonas Lahtinen

Commit is no-op as per discussion in the linked mail thread. The debated UAF scenario has not been possible in mainline kernel since 2021.

That was never the issue.

The issue was that the code used to do this:

                if (likely(vma && vma->vm == vm))
                        vma = i915_vma_tryget(vma);

and the vma->vm == vm condition was nonsensical - and if it ever was false, that code was all horribly buggy.

So the "since 2021" is complete nonsense.

It's only since April this year - commit a13edf9b92fc ("drm/i915/gem:
Drop check for changed VM in EXECBUF") that the "else" side is now pointless and the revert makes sense.

Stop writing misleading commit logs and excuses for bad code. There is no "since 2021".

Linus