public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v6 0/2] drm/i915/selftests: Use safe userspace memory for mappings
@ 2026-04-15  9:21 Krzysztof Karas
  2026-04-15  9:21 ` [PATCH v6 1/2] drm/i915/selftests: Prevent userspace mapping invalidation Krzysztof Karas
  2026-04-15  9:21 ` [PATCH v6 2/2] drm/i915/selftests: Run vma tests only if current->mm is present Krzysztof Karas
  0 siblings, 2 replies; 5+ messages in thread
From: Krzysztof Karas @ 2026-04-15  9:21 UTC (permalink / raw)
  To: intel-gfx
  Cc: Andi Shyti, Sebastian Brzezinka, Krzysztof Niemiec,
	Janusz Krzysztofik, Krzysztof Karas

Test-with: 20260330102400.1157658-1-krzysztof.karas@intel.com

Currently, i915 selftests use unknown process's address space to
perform mappings to userspace memory. This is problematic,
because there is no control over lifetime of the memory of such
task, so the test would occasionally borrow memory scheduled for
or in the middle of a cleanup causing SIGBUS errors.

Utilize user-provided PID of running userspace process to
perfofm mapping in a safe environment.

v4:
 * Rearrange the code in patches. (Janusz)

v5:
 * Move missing requirement warning to the test. (Janusz)

v6:
 * Move mm handling to new function (Andi).
 * Add checks for validity of user PID 

Krzysztof Karas (2):
  drm/i915/selftests: Prevent userspace mapping invalidation
  drm/i915/selftests: Run vma tests only if current->mm is present

 .../drm/i915/gem/selftests/i915_gem_mman.c    | 16 +++---
 drivers/gpu/drm/i915/i915_selftest.h          |  1 +
 .../gpu/drm/i915/selftests/i915_selftest.c    | 57 +++++++++++++++++++
 3 files changed, 66 insertions(+), 8 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-15 22:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-15  9:21 [PATCH v6 0/2] drm/i915/selftests: Use safe userspace memory for mappings Krzysztof Karas
2026-04-15  9:21 ` [PATCH v6 1/2] drm/i915/selftests: Prevent userspace mapping invalidation Krzysztof Karas
2026-04-15 22:21   ` Andi Shyti
2026-04-15  9:21 ` [PATCH v6 2/2] drm/i915/selftests: Run vma tests only if current->mm is present Krzysztof Karas
2026-04-15 22:23   ` Andi Shyti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox