Home
last modified time | relevance | path

Searched hist:dd98d289 (Results 1 – 3 of 3) sorted by relevance

/openbmc/linux/net/ethtool/
H A Dioctl.cdd98d289 Thu Jul 22 09:28:59 CDT 2021 Arnd Bergmann <arnd@arndb.de> ethtool: improve compat ioctl handling

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 84a1d9c48200 ("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>
/openbmc/linux/include/linux/
H A Dethtool.hdd98d289 Thu Jul 22 09:28:59 CDT 2021 Arnd Bergmann <arnd@arndb.de> ethtool: improve compat ioctl handling

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 84a1d9c48200 ("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>
/openbmc/linux/net/
H A Dsocket.cdd98d289 Thu Jul 22 09:28:59 CDT 2021 Arnd Bergmann <arnd@arndb.de> ethtool: improve compat ioctl handling

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 84a1d9c48200 ("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>