[<prev] [next>] [day] [month] [year] [list]
Message-ID: <7e1d5d2d-1b6d-4232-8d1b-6523849708b5@linuxfoundation.org>
Date: Fri, 4 Oct 2024 11:33:49 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: "Sundararaju, Sathishkumar" <sasundar@....com>,
Advait Dhamorikar <advaitdhamorikar@...il.com>, alexander.deucher@....com,
christian.koenig@....com, Xinhui.Pan@....com, airlied@...il.com,
simona@...ll.ch, leo.liu@....com, sathishkumar.sundararaju@....com,
saleemkhan.jamadar@....com, Veerabadhran.Gopalakrishnan@....com,
sonny.jiang@....com
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, anupnewsmail@...il.com,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH-next] Fix unintentional integer overflow
On 10/4/24 03:15, Sundararaju, Sathishkumar wrote:
>
> All occurrences of this error fix should have been together in a single patch both in _get and _set callbacks corresponding to f0b19b84d391, please avoid separate patch for each occurrence.
>
> Sorry Alex, I missed to note this yesterday.
>
>
> Regards,
> Sathish
Sathish,
Please don't post on top when responding to kernel emails
and patches. It makes it difficult to follow the discussions
>
>
> On 10/4/2024 1:46 PM, Advait Dhamorikar wrote:
>> Fix shift-count-overflow when creating mask.
>> The expression's value may not be what the
>> programmer intended, because the expression is
>> evaluated using a narrower integer type.
>>
>> Fixes: f0b19b84d391 ("drm/amdgpu: add amdgpu_jpeg_sched_mask debugfs")
>> Signed-off-by: Advait Dhamorikar<advaitdhamorikar@...il.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c
>> index 95e2796919fc..7df402c45f40 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c
>> @@ -388,7 +388,7 @@ static int amdgpu_debugfs_jpeg_sched_mask_get(void *data, u64 *val)
>> for (j = 0; j < adev->jpeg.num_jpeg_rings; ++j) {
>> ring = &adev->jpeg.inst[i].ring_dec[j];
>> if (ring->sched.ready)
>> - mask |= 1 << ((i * adev->jpeg.num_jpeg_rings) + j);
>> + mask |= (u64)1 << ((i * adev->jpeg.num_jpeg_rings) + j);
>> }
>> }
>> *val = mask;
thanks,
-- Shuah
Powered by blists - more mailing lists