Skip to content

RFC net, compat_ioctl: move handlers to net/socket.c

Arnd Bergmann lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest7 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7compat: add struct compat_ifreq etc to compat.hinclude/linux/compat.h+39 -01 reply
2/7net/tun: handle compat_ioctl directlydrivers/net/tun.c fs/compat_ioctl.c+48 -270 replies
3/7net, compat_ioctl: handle socket ioctl abuses in tty driversdrivers/net/hamradio/6pack.c drivers/net/hamradio/mkiss.c drivers/net/slip.c +3 more+80 -20 replies
4/7appletalk: handle SIOCATALKDIFADDR compat ioctlfs/compat_ioctl.c net/appletalk/ddp.c+7 -60 replies
5/7copy socket ioctl code to net/socket.hnet/socket.c+717 -00 replies
6/7compat: move sockios handling to net/socket.cfs/compat_ioctl.c net/socket.c+243 -9530 replies
7/7net, compat_ioctl: handle more ioctls correctlynet/socket.c+17 -140 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC, PATCH 0/7] net, compat_ioctl: move handlers to net/socket.c

This cleans up some of the socket ioctl handling by moving it from fs/compat_ioctl.c to net/socket.c. The code is still untested, so this is an RFC for now. If you're happy with it, I'll do some testing to see if everything still works.

This series is a prerequisite for cleaning up the rest of compat_ioctl.c, saving some 30kb of kernel memory in the end.

The first four patches are probably worthwhile independently, because they fix some bugs in compat_ioctl handling. There is some obvious conflict with the ATM patch I sent independently today. That one should probably be worked out first.

	Arnd <><

---

Arnd Bergmann (7):
compat: add struct compat_ifreq etc to compat.h net/tun: handle compat_ioctl directly
net, compat_ioctl: handle socket ioctl abuses in tty drivers appletalk: handle SIOCATALKDIFADDR compat ioctl copy socket ioctl code to net/socket.h
compat: move sockios handling to net/socket.c
net, compat_ioctl: handle more ioctls correctly

 drivers/net/hamradio/6pack.c |   16 +
 drivers/net/hamradio/mkiss.c |   16 +
 drivers/net/slip.c           |   21 ++
 drivers/net/tun.c            |   55 +++-
 drivers/net/wan/x25_asy.c    |   15 +
 drivers/net/wireless/strip.c |   12 +
 fs/compat_ioctl.c            |  745 -----------------------------------------
 include/linux/compat.h       |   39 +++
 net/appletalk/ddp.c          |   12 +-
 net/socket.c                 |  748 +++++++++++++++++++++++++++++++++++++++++-
 10 files changed, 914 insertions(+), 765 deletions(-)