From: "Sundararaju, Sathishkumar" <sasundar@amd.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Advait Dhamorikar <advaitdhamorikar@gmail.com>,
alexander.deucher@amd.com, christian.koenig@amd.com,
Xinhui.Pan@amd.com, airlied@gmail.com, simona@ffwll.ch,
leo.liu@amd.com, sathishkumar.sundararaju@amd.com,
saleemkhan.jamadar@amd.com, Veerabadhran.Gopalakrishnan@amd.com,
sonny.jiang@amd.com, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
skhan@linuxfoundation.org, anupnewsmail@gmail.com, "Lazar,
Lijo" <lijo.lazar@amd.com>
Subject: Re: [PATCH-next] Fix unintentional integer overflow
Date: Sat, 5 Oct 2024 09:04:49 +0530 [thread overview]
Message-ID: <007679b9-b7b6-4385-9a2e-2be392cb5f58@amd.com> (raw)
In-Reply-To: <CADnq5_OKww1YZ1R_OytEMLcNVwdq=-ckc2gqQ+WMyOv6AZ9kqg@mail.gmail.com>
On 10/4/2024 11:30 PM, Alex Deucher wrote:
> On Fri, Oct 4, 2024 at 5:15 AM Sundararaju, Sathishkumar
> <sasundar@amd.com> 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.
> I've dropped the patch. Please pick it up once it's fixed up appropriately.
Thanks Alex.
Hi Advait,
Please collate the changes together with Lijo's suggestion as well,
"1ULL <<" instead of typecast, there are 3 occurrences of the error in
f0b19b84d391.
Regards,
Sathish
>
> Thanks,
>
> Alex
>
>>
>> Regards,
>> Sathish
>>
>>
>> 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@gmail.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;
next prev parent reply other threads:[~2024-10-05 3:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-04 8:16 Advait Dhamorikar
[not found] ` <00761132-75f3-41fd-b571-30b0cbe5565d@amd.com>
2024-10-04 17:33 ` Shuah Khan
2024-10-04 18:00 ` Alex Deucher
2024-10-05 3:34 ` Sundararaju, Sathishkumar [this message]
2024-10-05 7:05 ` Advait Dhamorikar
2024-10-07 13:56 ` Christian König
2024-10-08 3:38 ` Advait Dhamorikar
2024-10-08 6:56 ` Christian König
-- strict thread matches above, loose matches on Subject: below --
2024-10-03 7:14 Advait Dhamorikar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=007679b9-b7b6-4385-9a2e-2be392cb5f58@amd.com \
--to=sasundar@amd.com \
--cc=Veerabadhran.Gopalakrishnan@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=advaitdhamorikar@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=anupnewsmail@gmail.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=leo.liu@amd.com \
--cc=lijo.lazar@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=saleemkhan.jamadar@amd.com \
--cc=sathishkumar.sundararaju@amd.com \
--cc=simona@ffwll.ch \
--cc=skhan@linuxfoundation.org \
--cc=sonny.jiang@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®