diff options
author | Nirmoy Das <[email protected]> | 2023-06-08 13:01:03 +0200 |
---|---|---|
committer | Nirmoy Das <[email protected]> | 2023-06-10 23:02:44 +0200 |
commit | f56fe3e91787dc29c2a3e7ec8b7bc3b80f65fbbc (patch) | |
tree | fdb00963466969703f2c80f30b4a1f639ce9c08a /tools/perf/scripts/python | |
parent | 24335848e543dc95c9e2ffa0108d879ffefd0442 (diff) |
drm/i915: Fix a VMA UAF for multi-gt platform
Ensure correct handling of closed VMAs on multi-gt platforms to prevent
Use-After-Free. Currently, when GT0 goes idle, closed VMAs that are
exclusively added to GT0's closed_vma link (gt->closed_vma) and
subsequently freed by i915_vma_parked(), which assumes the entire GPU is
idle. However, on platforms with multiple GTs, such as MTL, GT1 may
remain active while GT0 is idle. This causes GT0 to mistakenly consider
the closed VMAs in its closed_vma list as unnecessary, potentially
leading to Use-After-Free issues if a job for GT1 attempts to access a
freed VMA.
Although we do take a wakeref for GT0 but it happens later, after
evaluating VMAs. To mitigate this, it is necessary to hold a GT0 wakeref
early.
v2: Use gt id to detect multi-tile(Andi)
Fix the incorrect error path.
v3: Add more comment(Andi)
Use the new gt var when possible(Andrzej)
Cc: Joonas Lahtinen <[email protected]>
Cc: Rodrigo Vivi <[email protected]>
Cc: Tvrtko Ursulin <[email protected]>
Cc: Thomas Hellström <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Andi Shyti <[email protected]>
Cc: Andrzej Hajda <[email protected]>
Cc: Sushma Venkatesh Reddy <[email protected]>
Signed-off-by: Nirmoy Das <[email protected]>
Tested-by: Andi Shyti <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Reviewed-by: Andrzej Hajda <[email protected]>
Tested-by: Sushma Venkatesh Reddy <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions