Commit 80c29a67 authored by Rajneesh Bhardwaj's avatar Rajneesh Bhardwaj Committed by Guo Mengqi
Browse files

drm/amdgpu: restrict bo mapping within gpu address limits

mainline inclusion
from mainline-v5.9-rc1
commit 8b80d74b
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9J3KG
CVE: CVE-2024-26922

Reference: https://lore.kernel.org/all/20200602182735.5940-1-rajneesh.bhardwaj@amd.com/



--------------------------------

Have strict check on bo mapping since on some systems, such as A+A or
hybrid, the cpu might support 5 level paging or can address memory above
48 bits but gpu might be limited by hardware to just use 48 bits. In
general, this applies to all asics where this limitation can be checked
against their max_pfn range. This restricts the range to map bo within
pratical limits of cpu and gpu for shared virtual memory access.

Reviewed-by: default avatarOak Zeng <oak.zeng@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarRajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarGuo Mengqi <guomengqi3@huawei.com>
parent fa2fe487
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment