Re: [PATCH] drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()

2023-11-30 Thread Alex Deucher
Applied. Thanks! On Wed, Nov 29, 2023 at 10:28 AM Nikita Zhandarovich wrote: > > While improbable, there may be a chance of hitting integer > overflow when the result of radeon_get_ib_value() gets shifted > left. > > Avoid it by casting one of the operands to larger data type (u64). > > Found

Re: [PATCH] drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()

2023-11-29 Thread Christian König
Am 29.11.23 um 17:03 schrieb Alex Deucher: On Wed, Nov 29, 2023 at 10:47 AM Christian König wrote: Am 29.11.23 um 16:22 schrieb Nikita Zhandarovich: While improbable, there may be a chance of hitting integer overflow when the result of radeon_get_ib_value() gets shifted left. Avoid it by

Re: [PATCH] drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()

2023-11-29 Thread Alex Deucher
On Wed, Nov 29, 2023 at 10:47 AM Christian König wrote: > > Am 29.11.23 um 16:22 schrieb Nikita Zhandarovich: > > While improbable, there may be a chance of hitting integer > > overflow when the result of radeon_get_ib_value() gets shifted > > left. > > > > Avoid it by casting one of the operands

Re: [PATCH] drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()

2023-11-29 Thread Christian König
Am 29.11.23 um 16:22 schrieb Nikita Zhandarovich: While improbable, there may be a chance of hitting integer overflow when the result of radeon_get_ib_value() gets shifted left. Avoid it by casting one of the operands to larger data type (u64). Found by Linux Verification Center

[PATCH] drm/radeon/r600_cs: Fix possible int overflows in r600_cs_check_reg()

2023-11-29 Thread Nikita Zhandarovich
While improbable, there may be a chance of hitting integer overflow when the result of radeon_get_ib_value() gets shifted left. Avoid it by casting one of the operands to larger data type (u64). Found by Linux Verification Center (linuxtesting.org) with static analysis tool SVACE. Fixes: