Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

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

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


arnd at arndb

Nov 6, 2009, 10:09 AM

Post #1 of 4 (223 views)
Permalink
[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(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


davem at davemloft

Nov 6, 2009, 8:47 PM

Post #2 of 4 (200 views)
Permalink
Re: [RFC, PATCH 0/7] net, compat_ioctl: move handlers to net/socket.c [In reply to]

From: Arnd Bergmann <arnd [at] arndb>
Date: Fri, 6 Nov 2009 19:09:02 +0100

> 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.

This looks great, all applied. Please make the fixups recommended
to you in the feedback as followon patches.

Also, I added the following cure after your patch series:

net: compat: No need to define IFHWADDRLEN and IFNAMSIZ twice.

It's defined colloqually in linux/if.h and linux/compat.h
includes that.

Signed-off-by: David S. Miller <davem [at] davemloft>
---
include/linux/compat.h | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/include/linux/compat.h b/include/linux/compat.h
index 8311d2e..224c7a8 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -166,8 +166,6 @@ struct compat_ifmap {
};

struct compat_ifreq {
-#define IFHWADDRLEN 6
-#define IFNAMSIZ 16
union {
char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
} ifr_ifrn;
--
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


arnd at arndb

Nov 8, 2009, 1:31 PM

Post #3 of 4 (183 views)
Permalink
Re: [RFC, PATCH 0/7] net, compat_ioctl: move handlers to net/socket.c [In reply to]

On Saturday 07 November 2009, David Miller wrote:
> From: Arnd Bergmann <arnd [at] arndb>
> Date: Fri, 6 Nov 2009 19:09:02 +0100
>
> > 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.
>
> This looks great, all applied. Please make the fixups recommended
> to you in the feedback as followon patches.

Thanks! Two patches follow.

Any opinion on how to proceed with the ATM stuff? From my
point of view, I'm fine with having moved it out of fs/compat_ioctl.c,
but it's still a bit silly to have two half-complete implementations.

> Also, I added the following cure after your patch series:
>
> net: compat: No need to define IFHWADDRLEN and IFNAMSIZ twice.
>
> It's defined colloqually in linux/if.h and linux/compat.h
> includes that.

ok.

Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


davem at davemloft

Nov 8, 2009, 8:55 PM

Post #4 of 4 (181 views)
Permalink
Re: [RFC, PATCH 0/7] net, compat_ioctl: move handlers to net/socket.c [In reply to]

From: Arnd Bergmann <arnd [at] arndb>
Date: Sun, 8 Nov 2009 22:31:47 +0100

> Any opinion on how to proceed with the ATM stuff? From my
> point of view, I'm fine with having moved it out of fs/compat_ioctl.c,
> but it's still a bit silly to have two half-complete implementations.

I haven't looked at that stuff yes, you can be sure it's in
my queue :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.