Subject: CVE-2024-47729: drm/xe: Use reserved copy engine for user binds on faulting devices

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

drm/xe: Use reserved copy engine for user binds on faulting devices

User binds map to engines with can fault, faults depend on user binds
completion, thus we can deadlock. Avoid this by using reserved copy
engine for user binds on faulting devices.

While we are here, normalize bind queue creation with a helper.

v2:
 - Pass in extensions to bind queue creation (CI)
v3:
 - s/resevered/reserved (Lucas)
 - Fix NULL hwe check (Jonathan)

The Linux kernel CVE team has assigned CVE-2024-47729 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.8 with commit dd08ebf6c352 and fixed in 6.11.2 with commit 439fc1e569c5
	Issue introduced in 6.8 with commit dd08ebf6c352 and fixed in 6.12-rc1 with commit 852856e3b6f6

Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to
older supported kernel versions.  The official CVE entry at
	https://cve.org/CVERecord/?id=CVE-2024-47729
will be updated if fixes are backported, please check that for the most
up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
	drivers/gpu/drm/xe/xe_exec_queue.c
	drivers/gpu/drm/xe/xe_exec_queue.h
	drivers/gpu/drm/xe/xe_migrate.c
	drivers/gpu/drm/xe/xe_vm.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes.  Individual
changes are never tested alone, but rather are part of a larger kernel
release.  Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all.  If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
	https://git.kernel.org/stable/c/439fc1e569c57669dbb842d0a77c7ba0a82a9f5d
	https://git.kernel.org/stable/c/852856e3b6f679c694dd5ec41e5a3c11aa46640b