diff options
| author | Tom Lendacky <[email protected]> | 2023-06-22 13:45:05 +0000 |
|---|---|---|
| committer | Borislav Petkov (AMD) <[email protected]> | 2023-10-02 12:55:41 +0000 |
| commit | 62d5e970d022ef4bde18948dd67247c3194384c1 (patch) | |
| tree | f1d1ec383e920c940e9236ee5ba94741e9f2a510 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | |
| parent | x86/sev: Use the GHCB protocol when available for SNP CPUID requests (diff) | |
| download | kernel-62d5e970d022ef4bde18948dd67247c3194384c1.tar.gz kernel-62d5e970d022ef4bde18948dd67247c3194384c1.zip | |
x86/sev: Change npages to unsigned long in snp_accept_memory()
In snp_accept_memory(), the npages variables value is calculated from
phys_addr_t variables but is an unsigned int. A very large range passed
into snp_accept_memory() could lead to truncating npages to zero. This
doesn't happen at the moment but let's be prepared.
Fixes: 6c3211796326 ("x86/sev: Add SNP-specific unaccepted memory support")
Signed-off-by: Tom Lendacky <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/6d511c25576494f682063c9fb6c705b526a3757e.1687441505.git.thomas.lendacky@amd.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.h')
0 files changed, 0 insertions, 0 deletions
