summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorWilliam Palacek <William.Palacek@amd.com>2026-05-25 12:09:36 -0400
committerAlex Deucher <alexander.deucher@amd.com>2026-07-01 11:16:48 -0400
commit9ba9a1486312dfbec99621eb5ae761739f2fd721 (patch)
tree84bccb79dd6c30204ac1340d1eaf271b890f724e /tools/perf/scripts/python/bin/stackcollapse-record
parent46fda8bda6f93a38db8ea8cca6d84eae304deff3 (diff)
drm/amdkfd: use scnprintf/vscnprintf in kfd_smi_event_add
snprintf() and vsnprintf() return the number of bytes that would have been written if the buffer were large enough, not the actual bytes written. If truncation occurs, the accumulated length can exceed the buffer size, causing kfifo_in() to read past the fifo_in[] stack buffer. Switch to scnprintf() and vscnprintf() which return the actual number of bytes written, excluding the null terminator. This prevents the potential buffer over-read when calculating the offset for subsequent writes. Signed-off-by: William Palacek <William.Palacek@amd.com> Reviewed-by: Alysa Liu <Alysa.Liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions