Skip to content

remove compat_alloc_user_space()

Arnd Bergmann linux-arch lkml netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest6 patches 5 repliesApplied 6/6
  2. v54 patches 4 repliesSuperseded
  3. v44 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v34 patches2 repliesSuperseded

Changes in v6 from the cover letter

- Split out and expand linux/compat.h rework
- Split ifconf change into two patches
- Rebase on latest net-next/master

Patches in v6 All 6 applied

#Subject and filesSizeRepliesApplied
1/6compat: make linux/compat.h available everywherearch/arm64/include/asm/compat.h arch/mips/include/asm/compat.h arch/parisc/include/asm/compat.h +7 more+59 -961 replyApplied
2/6ethtool: improve compat ioctl handlinginclude/linux/ethtool.h net/ethtool/ioctl.c net/socket.c+121 -1441 replyApplied
3/6net: socket: rework SIOC?IFMAP ioctlsnet/core/dev_ioctl.c net/socket.c+54 -500 repliesApplied
4/6net: socket: remove register_gifconfinclude/linux/inetdevice.h include/linux/netdevice.h net/core/dev_ioctl.c +1 more+20 -441 replyApplied
5/6net: socket: simplify dev_ifconf handlinginclude/linux/netdevice.h net/core/dev_ioctl.c net/socket.c+44 -721 replyApplied
6/6net: socket: rework compat_ifreq_ioctl()include/linux/netdevice.h net/appletalk/ddp.c net/ieee802154/socket.c +3 more+76 -471 replyApplied

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchChristoph Hellwig
1/6R-b
2/6R-b
3/6R-b
4/6R-b
5/6R-b
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH net-next v6 0/6] remove compat_alloc_user_space()

From: Arnd Bergmann <[email protected]>

This is the fifth version of my series, now spanning four patches instead of two, with a new approach for handling struct ifreq compatibility after I realized that my earlier approach introduces additional problems.

The idea here is to always push down the compat conversion deeper into the call stack: rather than pretending to be native mode with a modified copy of the original data on the user space stack, have the code that actually works on the data understand the difference between native and compat versions.

I have spent a long time looking at all drivers that implement an ndo_do_ioctl callback to verify that my assumptions are correct. This has led to a series of ~30 additional patches that I am not including here but will post separately, fixing a number of bugs in SIOCDEVPRIVATE ioctls, removing dead code, and splitting ndo_do_ioctl into multiple new ndo callbacks for private and ethernet specific commands.

Arnd

Changes in v6:
- Split out and expand linux/compat.h rework
- Split ifconf change into two patches
- Rebase on latest net-next/master

Changes in v5:
- Rebase to v5.14-rc2
- Fix a few build issues

Changes in v4:
- build fix without CONFIG_INET
- build fix without CONFIG_COMPAT
- style fixes pointed out by hch

Changes in v3:
- complete rewrite of the series

Arnd Bergmann (6):
compat: make linux/compat.h available everywhere
ethtool: improve compat ioctl handling
net: socket: rework SIOC?IFMAP ioctls
net: socket: remove register_gifconf
net: socket: simplify dev_ifconf handling
net: socket: rework compat_ifreq_ioctl()

 arch/arm64/include/asm/compat.h   |  14 +-
 arch/mips/include/asm/compat.h    |  24 ++-
 arch/parisc/include/asm/compat.h  |  14 +-
 arch/powerpc/include/asm/compat.h |  11 --
 arch/s390/include/asm/compat.h    |  14 +-
 arch/sparc/include/asm/compat.h   |  14 +-
 arch/x86/include/asm/compat.h     |  14 +-
 arch/x86/include/asm/signal.h     |   1 +
 include/asm-generic/compat.h      |  17 ++
 include/linux/compat.h            |  32 ++--
 include/linux/ethtool.h           |   4 -
 include/linux/inetdevice.h        |   9 +
 include/linux/netdevice.h         |  12 +-
 net/appletalk/ddp.c               |   4 +-
 net/core/dev_ioctl.c              | 153 +++++++++-------
 net/ethtool/ioctl.c               | 136 ++++++++++++--
 net/ieee802154/socket.c           |   4 +-
 net/ipv4/af_inet.c                |   6 +-
 net/ipv4/devinet.c                |   4 +-
 net/qrtr/qrtr.c                   |   4 +-
 net/socket.c                      | 292 +++++++-----------------------
 21 files changed, 352 insertions(+), 431 deletions(-)
Signature · 15 lines
2.29.2

Cc: Al Viro <[email protected]> 
Cc: Andrew Lunn <[email protected]> 
Cc: Christoph Hellwig <[email protected]>
Cc: David Ahern <[email protected]> 
Cc: "David S. Miller" <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Hideaki YOSHIFUJI <[email protected]> 
Cc: Jakub Kicinski <[email protected]> 
Cc: Kees Cook <[email protected]> 
Cc: Marco Elver <[email protected]> 
Cc: [email protected] 
Cc: [email protected] 
Cc: [email protected]