diff options
| author | Heiner Kallweit <[email protected]> | 2024-03-02 14:18:27 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2024-03-06 03:07:13 +0000 |
| commit | 344f7a4651497ffc62166ec6318b33f79d71c3df (patch) | |
| tree | 06554963f9cfd567f956107eda96c76e592b3ddd /tools/net/ynl/cli.py | |
| parent | sock: Use unsafe_memcpy() for sock_copy() (diff) | |
| download | kernel-344f7a4651497ffc62166ec6318b33f79d71c3df.tar.gz kernel-344f7a4651497ffc62166ec6318b33f79d71c3df.zip | |
ethtool: ignore unused/unreliable fields in set_eee op
This function is used with the set_eee() ethtool operation. Certain
fields of struct ethtool_keee() are relevant only for the get_eee()
operation. In addition, in case of the ioctl interface, we have no
guarantee that userspace sends sane values in struct ethtool_eee.
Therefore explicitly ignore all fields not needed for set_eee().
This protects from drivers trying to use unchecked and unreliable
data, relying on specific userspace behavior.
Note: Such unsafe driver behavior has been found and fixed in the
tg3 driver.
Signed-off-by: Heiner Kallweit <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'tools/net/ynl/cli.py')
0 files changed, 0 insertions, 0 deletions
