From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Likun Gao <Likun.Gao@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>,
kbuild-all@lists.01.org, lkp@intel.com,
dri-devel@lists.freedesktop.org,
Dan Carpenter <error27@gmail.com>
Subject: [radeon-alex:amd-staging-drm-next 744/765] drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/sienna_cichlid_ppt.c:2280 sienna_cichlid_dump_pptable() error: buffer overflow 'pptable->SkuReserved' 8 <= 8
Date: Mon, 26 Oct 2020 12:15:04 +0300 [thread overview]
Message-ID: <20201026091504.GG1042@kadam> (raw)
[-- Attachment #1: Type: text/plain, Size: 3845 bytes --]
tree: git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head: 1e5c252665ac026e977cd87fb8fcdb6f0bc0b759
commit: 62b1f5006728492c79182d960635d749d84f71ec [744/765] drm/amd/pm: update driver if file for sienna cichlid
config: i386-randconfig-m031-20201022 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/sienna_cichlid_ppt.c:2280 sienna_cichlid_dump_pptable() error: buffer overflow 'pptable->SkuReserved' 8 <= 8
vim +2280 drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/sienna_cichlid_ppt.c
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2263 dev_info(smu->adev->dev, "ReservedEquation2{a = 0x%x b = 0x%x c = 0x%x}\n",
b455159c053130d drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Likun Gao 2020-05-29 2264 pptable->ReservedEquation2.a,
b455159c053130d drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Likun Gao 2020-05-29 2265 pptable->ReservedEquation2.b,
b455159c053130d drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Likun Gao 2020-05-29 2266 pptable->ReservedEquation2.c);
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2267 dev_info(smu->adev->dev, "ReservedEquation3{a = 0x%x b = 0x%x c = 0x%x}\n",
b455159c053130d drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Likun Gao 2020-05-29 2268 pptable->ReservedEquation3.a,
b455159c053130d drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Likun Gao 2020-05-29 2269 pptable->ReservedEquation3.b,
b455159c053130d drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Likun Gao 2020-05-29 2270 pptable->ReservedEquation3.c);
b455159c053130d drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Likun Gao 2020-05-29 2271
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2272 dev_info(smu->adev->dev, "SkuReserved[0] = 0x%x\n", pptable->SkuReserved[0]);
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2273 dev_info(smu->adev->dev, "SkuReserved[1] = 0x%x\n", pptable->SkuReserved[1]);
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2274 dev_info(smu->adev->dev, "SkuReserved[2] = 0x%x\n", pptable->SkuReserved[2]);
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2275 dev_info(smu->adev->dev, "SkuReserved[3] = 0x%x\n", pptable->SkuReserved[3]);
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2276 dev_info(smu->adev->dev, "SkuReserved[4] = 0x%x\n", pptable->SkuReserved[4]);
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2277 dev_info(smu->adev->dev, "SkuReserved[5] = 0x%x\n", pptable->SkuReserved[5]);
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2278 dev_info(smu->adev->dev, "SkuReserved[6] = 0x%x\n", pptable->SkuReserved[6]);
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2279 dev_info(smu->adev->dev, "SkuReserved[7] = 0x%x\n", pptable->SkuReserved[7]);
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 @2280 dev_info(smu->adev->dev, "SkuReserved[8] = 0x%x\n", pptable->SkuReserved[8]);
^^^
Smatch thinks this array only has 8 elements.
d9811cfc0ebdf50 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c Evan Quan 2020-06-05 2281
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37080 bytes --]
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
reply other threads:[~2020-10-26 9:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201026091504.GG1042@kadam \
--to=dan.carpenter@oracle.com \
--cc=Hawking.Zhang@amd.com \
--cc=Likun.Gao@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=error27@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=lkp@intel.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