]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdkfd: Clear VRAM on allocation to prevent stale data exposure
authorAmir Shetaia <Amir.Shetaia@amd.com>
Fri, 10 Apr 2026 14:38:13 +0000 (10:38 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 May 2026 15:16:30 +0000 (17:16 +0200)
commit047d44d8d29a6a1a5757256837aa9dd78e3cd0b5
tree64eedf125ca0cd1ab4f41f7a1f0315583038066f
parent765708fd5a934c32321cf3e7de990bd9e6b7dab1
drm/amdkfd: Clear VRAM on allocation to prevent stale data exposure

commit ad52d61d82181dbdb7f05826de38352d5e550cc2 upstream.

KFD VRAM allocations set AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE
but not AMDGPU_GEM_CREATE_VRAM_CLEARED, leaving freshly allocated
VRAM with stale data from prior use observable by compute kernels.

The GEM ioctl path already sets VRAM_CLEARED for all userspace
allocations via amdgpu_gem_create_ioctl() and
amdgpu_mode_dumb_create(). The KFD path was missing this flag,
allowing stale page table remnants to leak into user buffers.

This causes crashes in RCCL P2P transport where non-zero data in
ptrExchange/head/tail fields corrupts the protocol handshake.

Signed-off-by: Amir Shetaia <Amir.Shetaia@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c