kernel_optimize_test/net/ethtool
Arnd Bergmann 5b3a45eedd ethtool: improve compat ioctl handling
[ Upstream commit dd98d2895de6485c884a9cb42de69fed02826fa4 ]

The ethtool compat ioctl handling is hidden away in net/socket.c,
which introduces a couple of minor oddities:

- The implementation may end up diverging, as seen in the RXNFC
  extension in commit 84a1d9c482 ("net: ethtool: extend RXNFC
  API to support RSS spreading of filter matches") that does not work
  in compat mode.

- Most architectures do not need the compat handling at all
  because u64 and compat_u64 have the same alignment.

- On x86, the conversion is done for both x32 and i386 user space,
  but it's actually wrong to do it for x32 and cannot work there.

- On 32-bit Arm, it never worked for compat oabi user space, since
  that needs to do the same conversion but does not.

- It would be nice to get rid of both compat_alloc_user_space()
  and copy_in_user() throughout the kernel.

None of these actually seems to be a serious problem that real
users are likely to encounter, but fixing all of them actually
leads to code that is both shorter and more readable.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-09-18 13:40:21 +02:00
..
bitset.c
bitset.h
cabletest.c
channels.c ethtool: fix the check logic of at least one channel for RX/TX 2021-03-17 17:06:16 +01:00
coalesce.c
common.c
common.h
debug.c
eee.c ethtool: fix incorrect datatype in set_eee ops 2021-04-14 08:41:58 +02:00
features.c
ioctl.c ethtool: improve compat ioctl handling 2021-09-18 13:40:21 +02:00
linkinfo.c
linkmodes.c
linkstate.c
Makefile
netlink.c ethtool: fix missing NLM_F_MULTI flag when dumping 2021-05-19 10:13:08 +02:00
netlink.h
pause.c ethtool: pause: make sure we init driver stats 2021-04-21 13:00:57 +02:00
privflags.c
rings.c
strset.c ethtool: strset: fix message length calculation 2021-06-23 14:42:45 +02:00
tsinfo.c
tunnels.c
wol.c