From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c:69 gfxhub_v12_1_xcc_setup_vm_pt_regs() error: buffer overflow 'adev->vmhub' 13 <= 31
Date: Thu, 13 Aug 2026 19:46:00 +0800 [thread overview]
Message-ID: <202608131936.P4bbb5ZC-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Hawking Zhang <Hawking.Zhang@amd.com>
CC: Alex Deucher <alexander.deucher@amd.com>
CC: Le Ma <le.ma@amd.com>
CC: Likun Gao <Likun.Gao@amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 3d6d817622b0a9721e3cc404df3469171582be13
commit: e87bfaf55e7311b9587c0163060c6939c36f077e drm/amdgpu: Add gfxhub v12_1 support
date: 8 months ago
:::::: branch date: 21 hours ago
:::::: commit date: 8 months ago
config: s390-randconfig-r071-20260813 (https://download.01.org/0day-ci/archive/20260813/202608131936.P4bbb5ZC-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 6ea395e4fe4db26920d57779ddae98eac6ba945d)
smatch: v0.5.0-9187-g5189e3fb
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Fixes: e87bfaf55e73 ("drm/amdgpu: Add gfxhub v12_1 support")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608131936.P4bbb5ZC-lkp@intel.com/
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c:69 gfxhub_v12_1_xcc_setup_vm_pt_regs() error: buffer overflow 'adev->vmhub' 13 <= 31
drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c:470 gfxhub_v12_1_xcc_program_invalidation() error: buffer overflow 'adev->vmhub' 13 <= 31
drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c:539 gfxhub_v12_1_xcc_gart_disable() error: buffer overflow 'adev->vmhub' 13 <= 31
drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c:752 gfxhub_v12_1_xcc_init() error: buffer overflow 'adev->vmhub' 13 <= 31
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c:412 gfxhub_v12_1_xcc_setup_vmid_config() error: buffer overflow 'adev->vmhub' 13 <= 31
vim +69 drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c
e87bfaf55e7311 Hawking Zhang 2025-02-24 59
e87bfaf55e7311 Hawking Zhang 2025-02-24 60 static void gfxhub_v12_1_xcc_setup_vm_pt_regs(struct amdgpu_device *adev,
e87bfaf55e7311 Hawking Zhang 2025-02-24 61 uint32_t vmid,
e87bfaf55e7311 Hawking Zhang 2025-02-24 62 uint64_t page_table_base,
e87bfaf55e7311 Hawking Zhang 2025-02-24 63 uint32_t xcc_mask)
e87bfaf55e7311 Hawking Zhang 2025-02-24 64 {
e87bfaf55e7311 Hawking Zhang 2025-02-24 65 struct amdgpu_vmhub *hub;
e87bfaf55e7311 Hawking Zhang 2025-02-24 66 int i;
e87bfaf55e7311 Hawking Zhang 2025-02-24 67
e87bfaf55e7311 Hawking Zhang 2025-02-24 68 for_each_inst(i, xcc_mask) {
e87bfaf55e7311 Hawking Zhang 2025-02-24 @69 hub = &adev->vmhub[AMDGPU_GFXHUB(i)];
e87bfaf55e7311 Hawking Zhang 2025-02-24 70 WREG32_SOC15_OFFSET(GC, GET_INST(GC, i),
e87bfaf55e7311 Hawking Zhang 2025-02-24 71 regGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_LO32,
e87bfaf55e7311 Hawking Zhang 2025-02-24 72 hub->ctx_addr_distance * vmid,
e87bfaf55e7311 Hawking Zhang 2025-02-24 73 lower_32_bits(page_table_base));
e87bfaf55e7311 Hawking Zhang 2025-02-24 74
e87bfaf55e7311 Hawking Zhang 2025-02-24 75 WREG32_SOC15_OFFSET(GC, GET_INST(GC, i),
e87bfaf55e7311 Hawking Zhang 2025-02-24 76 regGCVM_CONTEXT0_PAGE_TABLE_BASE_ADDR_HI32,
e87bfaf55e7311 Hawking Zhang 2025-02-24 77 hub->ctx_addr_distance * vmid,
e87bfaf55e7311 Hawking Zhang 2025-02-24 78 upper_32_bits(page_table_base));
e87bfaf55e7311 Hawking Zhang 2025-02-24 79 }
e87bfaf55e7311 Hawking Zhang 2025-02-24 80 }
e87bfaf55e7311 Hawking Zhang 2025-02-24 81
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2026-08-13 11:46 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=202608131936.P4bbb5ZC-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.