Re: [PATCH][next] drm/amdgpu: Fix potential integer overflow on shift of a int

2024-10-10 Thread Christian König
Am 10.10.24 um 13:22 schrieb Colin Ian King: The left shift of int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to and operated upon using a 64 bit unsigned integer. In the case where the shift is 32 or more this can lead to an overflow. Avoid this by shifting

[PATCH][next] drm/amdgpu: Fix potential integer overflow on shift of a int

2024-10-10 Thread Colin Ian King
The left shift of int 32 bit integer constant 1 is evaluated using 32 bit arithmetic and then assigned to and operated upon using a 64 bit unsigned integer. In the case where the shift is 32 or more this can lead to an overflow. Avoid this by shifting using the BIT_ULL macro instead. Fixes: f0b19b