aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2021-11-17 10:34:54 +0300
committerJakub Kicinski <[email protected]>2021-11-17 20:25:40 -0800
commita280ef90af01dc133d0a52387e563015686d6294 (patch)
tree2f77ada52e80adab6f8963e2e7b21bcad45bde94 /tools/perf/scripts/python/bin/stackcollapse-record
parent48b71a9e66c2eab60564b1b1c85f4928ed04e406 (diff)
octeontx2-af: debugfs: don't corrupt user memory
The user supplies the "count" value to say how big its read buffer is. The rvu_dbg_lmtst_map_table_display() function does not take the "count" into account but instead just copies the whole table, potentially corrupting the user's data. Introduce the "ret" variable to store how many bytes we can copy. Also I changed the type of "off" to size_t to make using min() simpler. Fixes: 0daa55d033b0 ("octeontx2-af: cn10k: debugfs for dumping LMTST map table") Signed-off-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/20211117073454.GD5237@kili Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions