Skip to content

drm/tests: Fix for UAF and a test for drm_exec lock alloc tracking warning

Thomas Hellström dri-devel intel-xe stable 3 versions – Applied

Status from this message: Applied to drm/drm-misc (drm-misc-fixes).

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 14 repliesApplied
  2. v23 patches 0 repliesSuperseded
  3. v13 patches 15 repliesSuperseded

Changes in v3 from the cover letter

- Remove an already committed patch
- Rework the test to not require dmesg inspection (Maxime Ripard)
- Condition the test on CONFIG_LOCK_ALLOC
- Update code comments and commit messages (Maxime Ripard)

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2drm/tests: helpers: Avoid a driver uafinclude/drm/drm_kunit_helpers.h+3 -14 replies
2/2drm/tests/drm_exec: Add a test for object freeing within drm_exec_fini()drivers/gpu/drm/tests/drm_exec_test.c+82 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMaxime RipardFrancois Dugast
1/2A-b R-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] drm/tests: Fix for UAF and a test for drm_exec lock alloc tracking warning

While trying to replicate a weird drm_exec lock alloc tracking warning using the drm_exec kunit test, the warning was shadowed by a UAF warning from KASAN due to a bug in the drm kunit helpers.

Patch 1 fixes that drm kunit UAF.
Patch 2 introduces a drm_exec kunit subtest that fails if the conditions
for the weird warning are met.

The series previously also had a patch with a drm_exec workaround for the warning but that patch has already been commited to drm_misc_next_fixes.

v2:
- Rewording of commit messages
- Add some commit message tags
v3:
- Remove an already committed patch
- Rework the test to not require dmesg inspection (Maxime Ripard)
- Condition the test on CONFIG_LOCK_ALLOC
- Update code comments and commit messages (Maxime Ripard)

Cc Maxime Ripard <[email protected]>
Cc Christian König <[email protected]>

Thomas Hellström (2):
drm/tests: helpers: Avoid a driver uaf drm/tests/drm_exec: Add a test for object freeing within

    drm_exec_fini()
 drivers/gpu/drm/tests/drm_exec_test.c | 82 +++++++++++++++++++++++++++
 include/drm/drm_kunit_helpers.h       |  4 +-
 2 files changed, 85 insertions(+), 1 deletion(-)
Signature · 1 line
2.41.0