aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin/export-to-postgresql-report
diff options
context:
space:
mode:
authorMichal Schmidt <[email protected]>2023-11-30 17:58:06 +0100
committerTony Nguyen <[email protected]>2023-12-13 10:44:31 -0800
commit91f9181c738101a276d9da333e0ab665ad806e6d (patch)
treeffe8e49713fa6e230916b93b72014142b2776b94 /tools/perf/scripts/python/bin/export-to-postgresql-report
parent2513974cc3e120bd26ecf43bcc1c40ac32669226 (diff)
ice: fix theoretical out-of-bounds access in ethtool link modes
To map phy types reported by the hardware to ethtool link mode bits, ice uses two lookup tables (phy_type_low_lkup, phy_type_high_lkup). The "low" table has 64 elements to cover every possible bit the hardware may report, but the "high" table has only 13. If the hardware reports a higher bit in phy_types_high, the driver would access memory beyond the lookup table's end. Instead of iterating through all 64 bits of phy_types_{low,high}, use the sizes of the respective lookup tables. Fixes: 9136e1f1e5c3 ("ice: refactor PHY type to ethtool link mode") Signed-off-by: Michal Schmidt <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/export-to-postgresql-report')
0 files changed, 0 insertions, 0 deletions