* drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1229 mes_v12_1_kiq_enable_queue() error: buffer overflow 'adev->mes.ring' 16 <= s32max
@ 2026-08-07 0:29 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-08-07 0:29 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Jack Xiao <Jack.Xiao@amd.com>
CC: Alex Deucher <alexander.deucher@amd.com>
CC: Hawking Zhang <Hawking.Zhang@amd.com>
CC: Mukul Joshi <mukul.joshi@amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 6c68fa601b49683ecb04eded993a71dfa8b2ba0b
commit: e220edf2d6fd6dbf08fa93790809500a80217948 drm/amdgpu/mes_v12_1: initial support for mes_v12_1
date: 8 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 8 months ago
config: i386-randconfig-141-20260806 (https://download.01.org/0day-ci/archive/20260807/202608070852.ZI0TtEht-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
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: e220edf2d6fd ("drm/amdgpu/mes_v12_1: initial support for mes_v12_1")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608070852.ZI0TtEht-lkp@intel.com/
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1229 mes_v12_1_kiq_enable_queue() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1516 mes_v12_1_kiq_dequeue_sched() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1604 mes_v12_1_kiq_hw_fini() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1625 mes_v12_1_xcc_hw_init() error: buffer overflow 'adev->mes.ring' 16 <= s32max
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1607 mes_v12_1_kiq_hw_fini() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1612 mes_v12_1_kiq_hw_fini() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1680 mes_v12_1_xcc_hw_init() error: buffer overflow 'adev->mes.ring' 16 <= s32max
vim +1229 drivers/gpu/drm/amd/amdgpu/mes_v12_1.c
e220edf2d6fd6d Jack Xiao 2025-05-14 1213
e220edf2d6fd6d Jack Xiao 2025-05-14 1214 static int mes_v12_1_kiq_enable_queue(struct amdgpu_device *adev, int xcc_id)
e220edf2d6fd6d Jack Xiao 2025-05-14 1215 {
e220edf2d6fd6d Jack Xiao 2025-05-14 1216 struct amdgpu_kiq *kiq = &adev->gfx.kiq[xcc_id];
e220edf2d6fd6d Jack Xiao 2025-05-14 1217 struct amdgpu_ring *kiq_ring = &adev->gfx.kiq[xcc_id].ring;
e220edf2d6fd6d Jack Xiao 2025-05-14 1218 int r, inst = MES_PIPE_INST(xcc_id, AMDGPU_MES_SCHED_PIPE);
e220edf2d6fd6d Jack Xiao 2025-05-14 1219
e220edf2d6fd6d Jack Xiao 2025-05-14 1220 if (!kiq->pmf || !kiq->pmf->kiq_map_queues)
e220edf2d6fd6d Jack Xiao 2025-05-14 1221 return -EINVAL;
e220edf2d6fd6d Jack Xiao 2025-05-14 1222
e220edf2d6fd6d Jack Xiao 2025-05-14 1223 r = amdgpu_ring_alloc(kiq_ring, kiq->pmf->map_queues_size);
e220edf2d6fd6d Jack Xiao 2025-05-14 1224 if (r) {
e220edf2d6fd6d Jack Xiao 2025-05-14 1225 DRM_ERROR("Failed to lock KIQ (%d).\n", r);
e220edf2d6fd6d Jack Xiao 2025-05-14 1226 return r;
e220edf2d6fd6d Jack Xiao 2025-05-14 1227 }
e220edf2d6fd6d Jack Xiao 2025-05-14 1228
e220edf2d6fd6d Jack Xiao 2025-05-14 @1229 kiq->pmf->kiq_map_queues(kiq_ring, &adev->mes.ring[inst]);
e220edf2d6fd6d Jack Xiao 2025-05-14 1230
e220edf2d6fd6d Jack Xiao 2025-05-14 1231 r = amdgpu_ring_test_ring(kiq_ring);
e220edf2d6fd6d Jack Xiao 2025-05-14 1232 if (r) {
e220edf2d6fd6d Jack Xiao 2025-05-14 1233 DRM_ERROR("kfq enable failed\n");
e220edf2d6fd6d Jack Xiao 2025-05-14 1234 kiq_ring->sched.ready = false;
e220edf2d6fd6d Jack Xiao 2025-05-14 1235 }
e220edf2d6fd6d Jack Xiao 2025-05-14 1236 return r;
e220edf2d6fd6d Jack Xiao 2025-05-14 1237 }
e220edf2d6fd6d Jack Xiao 2025-05-14 1238
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1229 mes_v12_1_kiq_enable_queue() error: buffer overflow 'adev->mes.ring' 16 <= s32max
@ 2026-08-08 11:41 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2026-08-08 11:41 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp, Dan Carpenter
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
CC: linux-kernel@vger.kernel.org
TO: Jack Xiao <Jack.Xiao@amd.com>
CC: Alex Deucher <alexander.deucher@amd.com>
CC: Hawking Zhang <Hawking.Zhang@amd.com>
CC: Mukul Joshi <mukul.joshi@amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: bcc44b6785f216eb939226ade6e3910baa30516b
commit: e220edf2d6fd6dbf08fa93790809500a80217948 drm/amdgpu/mes_v12_1: initial support for mes_v12_1
date: 8 months ago
:::::: branch date: 13 hours ago
:::::: commit date: 8 months ago
config: i386-randconfig-141-20260806 (https://download.01.org/0day-ci/archive/20260808/202608081921.zUla9MpN-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
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: e220edf2d6fd ("drm/amdgpu/mes_v12_1: initial support for mes_v12_1")
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202608081921.zUla9MpN-lkp@intel.com/
New smatch warnings:
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1229 mes_v12_1_kiq_enable_queue() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1516 mes_v12_1_kiq_dequeue_sched() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1604 mes_v12_1_kiq_hw_fini() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1625 mes_v12_1_xcc_hw_init() error: buffer overflow 'adev->mes.ring' 16 <= s32max
Old smatch warnings:
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1607 mes_v12_1_kiq_hw_fini() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1612 mes_v12_1_kiq_hw_fini() error: buffer overflow 'adev->mes.ring' 16 <= s32max
drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1680 mes_v12_1_xcc_hw_init() error: buffer overflow 'adev->mes.ring' 16 <= s32max
vim +1229 drivers/gpu/drm/amd/amdgpu/mes_v12_1.c
e220edf2d6fd6d Jack Xiao 2025-05-14 1213
e220edf2d6fd6d Jack Xiao 2025-05-14 1214 static int mes_v12_1_kiq_enable_queue(struct amdgpu_device *adev, int xcc_id)
e220edf2d6fd6d Jack Xiao 2025-05-14 1215 {
e220edf2d6fd6d Jack Xiao 2025-05-14 1216 struct amdgpu_kiq *kiq = &adev->gfx.kiq[xcc_id];
e220edf2d6fd6d Jack Xiao 2025-05-14 1217 struct amdgpu_ring *kiq_ring = &adev->gfx.kiq[xcc_id].ring;
e220edf2d6fd6d Jack Xiao 2025-05-14 1218 int r, inst = MES_PIPE_INST(xcc_id, AMDGPU_MES_SCHED_PIPE);
e220edf2d6fd6d Jack Xiao 2025-05-14 1219
e220edf2d6fd6d Jack Xiao 2025-05-14 1220 if (!kiq->pmf || !kiq->pmf->kiq_map_queues)
e220edf2d6fd6d Jack Xiao 2025-05-14 1221 return -EINVAL;
e220edf2d6fd6d Jack Xiao 2025-05-14 1222
e220edf2d6fd6d Jack Xiao 2025-05-14 1223 r = amdgpu_ring_alloc(kiq_ring, kiq->pmf->map_queues_size);
e220edf2d6fd6d Jack Xiao 2025-05-14 1224 if (r) {
e220edf2d6fd6d Jack Xiao 2025-05-14 1225 DRM_ERROR("Failed to lock KIQ (%d).\n", r);
e220edf2d6fd6d Jack Xiao 2025-05-14 1226 return r;
e220edf2d6fd6d Jack Xiao 2025-05-14 1227 }
e220edf2d6fd6d Jack Xiao 2025-05-14 1228
e220edf2d6fd6d Jack Xiao 2025-05-14 @1229 kiq->pmf->kiq_map_queues(kiq_ring, &adev->mes.ring[inst]);
e220edf2d6fd6d Jack Xiao 2025-05-14 1230
e220edf2d6fd6d Jack Xiao 2025-05-14 1231 r = amdgpu_ring_test_ring(kiq_ring);
e220edf2d6fd6d Jack Xiao 2025-05-14 1232 if (r) {
e220edf2d6fd6d Jack Xiao 2025-05-14 1233 DRM_ERROR("kfq enable failed\n");
e220edf2d6fd6d Jack Xiao 2025-05-14 1234 kiq_ring->sched.ready = false;
e220edf2d6fd6d Jack Xiao 2025-05-14 1235 }
e220edf2d6fd6d Jack Xiao 2025-05-14 1236 return r;
e220edf2d6fd6d Jack Xiao 2025-05-14 1237 }
e220edf2d6fd6d Jack Xiao 2025-05-14 1238
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-08 11:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-07 0:29 drivers/gpu/drm/amd/amdgpu/mes_v12_1.c:1229 mes_v12_1_kiq_enable_queue() error: buffer overflow 'adev->mes.ring' 16 <= s32max kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-08-08 11:41 kernel test robot
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.