summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-11-17 10:34:54 +0300
committerJakub Kicinski <kuba@kernel.org>2021-11-17 20:25:40 -0800
commita280ef90af01dc133d0a52387e563015686d6294 (patch)
tree2f77ada52e80adab6f8963e2e7b21bcad45bde94 /tools/perf/scripts/python/Perf-Trace-Util/lib
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 <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20211117073454.GD5237@kili Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib')
0 files changed, 0 insertions, 0 deletions