linux/drivers/net/ethernet/marvell
Dan Carpenter a280ef90af 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: 0daa55d033 ("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>
2021-11-17 20:25:40 -08:00
..
mvpp2 net: marvell: mvpp2: Fix wrong SerDes reconfiguration order 2021-11-10 14:34:02 +00:00
octeontx2 octeontx2-af: debugfs: don't corrupt user memory 2021-11-17 20:25:40 -08:00
prestera Networking fixes for 5.16-rc1, including fixes from bpf, can 2021-11-11 09:49:36 -08:00
Kconfig net: marvell: Remove reference to CONFIG_MV64X60 2021-03-18 14:19:39 -07:00
Makefile net: marvell: prestera: Add driver for Prestera family ASIC devices 2020-09-17 16:35:46 -07:00
mv643xx_eth.c ethernet: mv643xx: use eth_hw_addr_set() 2021-10-19 12:41:47 +01:00
mvmdio.c net: mvmdio: fix compilation warning 2021-11-16 18:55:17 -08:00
mvneta_bm.c
mvneta_bm.h
mvneta.c net: mvneta: drop use of phylink_helper_basex_speed() 2021-10-27 14:50:11 +01:00
pxa168_eth.c net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
skge.c ethernet: sky2/skge: use eth_hw_addr_set() 2021-10-19 12:41:47 +01:00
skge.h net: marvell: remove leading spaces before tabs 2021-05-19 12:17:31 -07:00
sky2.c sky2: Remove redundant assignment and parentheses 2021-10-28 14:39:06 +01:00
sky2.h net: marvell: remove leading spaces before tabs 2021-05-19 12:17:31 -07:00