1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel/e1000e
Sasha Neftin 04ebaa1cfd e1000e: Fix possible overflow in LTR decoding
When we decode the latency and the max_latency, u16 value may not fit
the required size and could lead to the wrong LTR representation.

Scaling is represented as:
scale 0 - 1         (2^(5*0)) = 2^0
scale 1 - 32        (2^(5 *1))= 2^5
scale 2 - 1024      (2^(5 *2)) =2^10
scale 3 - 32768     (2^(5 *3)) =2^15
scale 4 - 1048576   (2^(5 *4)) = 2^20
scale 5 - 33554432  (2^(5 *4)) = 2^25
scale 4 and scale 5 required 20 and 25 bits respectively.
scale 6 reserved.

Replace the u16 type with the u32 type and allow corrected LTR
representation.

Cc: stable@vger.kernel.org
Fixes: 44a13a5d99 ("e1000e: Fix the max snoop/no-snoop latency for 10M")
Reported-by: James Hutchinson <jahutchinson99@googlemail.com>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=215689
Suggested-by: Dima Ruinskiy <dima.ruinskiy@intel.com>
Signed-off-by: Sasha Neftin <sasha.neftin@intel.com>
Tested-by: Naama Meir <naamax.meir@linux.intel.com>
Tested-by: James Hutchinson <jahutchinson99@googlemail.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2022-04-13 09:18:27 -07:00
..
80003es2lan.c intel-ethernet: clean up W=1 warnings in kdoc 2020-09-25 16:28:59 -07:00
80003es2lan.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
82571.c e1000e: Fix error handling in e1000_set_d0_lplu_state_82571 2021-03-11 09:37:48 -08:00
82571.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
defines.h e1000e: PCIm function state support 2019-06-28 16:00:28 -07:00
e1000.h e1000e: Separate ADP board type from TGP 2022-02-01 08:59:45 -08:00
ethtool.c ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
hw.h e1000e: Fix possible HW unit hang after an s0ix exit 2022-02-28 13:42:28 -08:00
ich8lan.c e1000e: Fix possible overflow in LTR decoding 2022-04-13 09:18:27 -07:00
ich8lan.h e1000e: Fix possible HW unit hang after an s0ix exit 2022-02-28 13:42:28 -08:00
mac.c net: intel: e1000e: fix possible sleep-in-atomic-context bugs in e1000e_get_hw_semaphore() 2020-02-19 15:25:59 -08:00
mac.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
Makefile net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
manage.c net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
manage.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
netdev.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-03 11:55:12 -08:00
nvm.c e1000e: Reduce boot time by tightening sleep ranges 2019-06-28 15:59:52 -07:00
nvm.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
param.c ethernet/intel: Convert fallthrough code comments 2020-07-01 13:47:43 -07:00
phy.c e1000e: Print PHY register address when MDI read/write fails 2022-03-09 19:53:03 -08:00
phy.h net: intel: Cleanup the copyright/license headers 2018-04-27 14:00:04 -04:00
ptp.c e1000e: Add support for Lunar Lake 2021-07-20 16:11:36 -07:00
regs.h e1000e: Add polling mechanism to indicate CSME DPG exit 2021-07-20 16:11:36 -07:00