mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
ETHTOOL_A_RSS_HFUNC and ETHTOOL_A_RSS_INPUT_XFRM are NLA_U32 attributes, but ethnl_rss_set() and ethnl_rss_create_doit() parse them with ethnl_update_u8(), which reads a single byte. On little endian this happens to read the least significant byte and works as long as the value fits in a byte. On big endian it reads the most significant byte, so the requested value is parsed incorrectly. The destination fields in struct ethtool_rxfh_param are u8, so the attribute can't be read directly with ethnl_update_u32(). Cap the hfunc policy at U8_MAX so an out of range value is rejected instead of being silently truncated into the u8 field, and add ethnl_update_u8_u32() to read the full u32 and narrow it into the u8 destination. Fixes: |
||
|---|---|---|
| .. | ||
| bitset.c | ||
| bitset.h | ||
| cabletest.c | ||
| channels.c | ||
| cmis_cdb.c | ||
| cmis_fw_update.c | ||
| cmis.h | ||
| coalesce.c | ||
| common.c | ||
| common.h | ||
| debug.c | ||
| eee.c | ||
| eeprom.c | ||
| features.c | ||
| fec.c | ||
| ioctl.c | ||
| linkinfo.c | ||
| linkmodes.c | ||
| linkstate.c | ||
| Makefile | ||
| mm.c | ||
| module_fw.h | ||
| module.c | ||
| mse.c | ||
| netlink.c | ||
| netlink.h | ||
| pause.c | ||
| phc_vclocks.c | ||
| phy.c | ||
| plca.c | ||
| privflags.c | ||
| pse-pd.c | ||
| rings.c | ||
| rss.c | ||
| stats.c | ||
| strset.c | ||
| ts.h | ||
| tsconfig.c | ||
| tsinfo.c | ||
| tunnels.c | ||
| wol.c | ||