summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMuhammad Bilal <meatuni001@gmail.com>2026-09-16 05:46:06 +0500
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-09-18 19:41:43 +0300
commita97dd0e1e49a8590183cf2c79028315e0ac3f060 (patch)
tree073c44392145cd6fcfac31ae6f4a9b20c4b9ec05 /tools/perf/scripts/python/stackcollapse.py
parentc72dd9994952eb09442827caecb945474ae3072b (diff)
downloadlinux-next-a97dd0e1e49a8590183cf2c79028315e0ac3f060.tar.gz
linux-next-a97dd0e1e49a8590183cf2c79028315e0ac3f060.zip
platform/x86: hp-bioscfg: zero the hex-string decode buffer in hp_convert_hexstr_to_str()
hp_convert_hexstr_to_str() allocates its output buffer for the worst-case decoded length, then fills in only as many bytes as the input actually decodes to before shrinking the allocation down to that length with krealloc(). Well-formed input can decode to noticeably fewer bytes than the worst case, so the buffer is frequently only partially written by the time it is realloc'd and returned to the caller. Use kzalloc() instead of kmalloc() for the initial allocation, so any unused capacity starts out zeroed instead of holding leftover heap contents, rather than relying on every current and future caller and code path to fill the buffer exactly. Suggested-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Muhammad Bilal <meatuni001@gmail.com> Link: https://patch.msgid.link/20260916004606.165065-1-meatuni001@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions