]> git.hungrycats.org Git - linux/commit
drm/amdkfd: Check bounds on CRIU restore queue type and mqd size
authorDavid Francis <David.Francis@amd.com>
Mon, 6 Jul 2026 14:19:04 +0000 (10:19 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 8 Jul 2026 18:21:51 +0000 (14:21 -0400)
commitf19d8086f6644083c913d70bfdeee20e1b6f46a5
tree34f3b1e05c6e1a9cce10151bfd3b18aaf4d1f432
parent9d01579f3f868b333acc901815972685989092c7
drm/amdkfd: Check bounds on CRIU restore queue type and mqd size

We weren't checking whether the values provided in the private
data in kfd CRIU restore were within bounds.

For queue type, add a KFD_QUEUE_TYPE_MAX and ensure the provided
type is less than it.

For mqd_size, add new function mqd_size_from_queue_type and confirm
that the provided mqd_size matches expectations.

Reviewed-by: David Yat Sin <david.yatsin@amd.com>
Signed-off-by: David Francis <David.Francis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
drivers/gpu/drm/amd/amdkfd/kfd_priv.h
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c