aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/compat_ioctl.c113
1 files changed, 1 insertions, 112 deletions
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index c54eaab71a19..ddefb8851a98 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -58,7 +58,6 @@
58#include <linux/syscalls.h> 58#include <linux/syscalls.h>
59#include <linux/i2c.h> 59#include <linux/i2c.h>
60#include <linux/i2c-dev.h> 60#include <linux/i2c-dev.h>
61#include <linux/wireless.h>
62#include <linux/atalk.h> 61#include <linux/atalk.h>
63#include <linux/loop.h> 62#include <linux/loop.h>
64 63
@@ -1759,64 +1758,6 @@ static int do_i2c_smbus_ioctl(unsigned int fd, unsigned int cmd, unsigned long a
1759 return sys_ioctl(fd, cmd, (unsigned long)tdata); 1758 return sys_ioctl(fd, cmd, (unsigned long)tdata);
1760} 1759}
1761 1760
1762struct compat_iw_point {
1763 compat_caddr_t pointer;
1764 __u16 length;
1765 __u16 flags;
1766};
1767
1768static int do_wireless_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
1769{
1770 struct iwreq __user *iwr;
1771 struct iwreq __user *iwr_u;
1772 struct iw_point __user *iwp;
1773 struct compat_iw_point __user *iwp_u;
1774 compat_caddr_t pointer_u;
1775 void __user *pointer;
1776 __u16 length, flags;
1777 int ret;
1778
1779 iwr_u = compat_ptr(arg);
1780 iwp_u = (struct compat_iw_point __user *) &iwr_u->u.data;
1781 iwr = compat_alloc_user_space(sizeof(*iwr));
1782 if (iwr == NULL)
1783 return -ENOMEM;
1784
1785 iwp = &iwr->u.data;
1786
1787 if (!access_ok(VERIFY_WRITE, iwr, sizeof(*iwr)))
1788 return -EFAULT;
1789
1790 if (__copy_in_user(&iwr->ifr_ifrn.ifrn_name[0],
1791 &iwr_u->ifr_ifrn.ifrn_name[0],
1792 sizeof(iwr->ifr_ifrn.ifrn_name)))
1793 return -EFAULT;
1794
1795 if (__get_user(pointer_u, &iwp_u->pointer) ||
1796 __get_user(length, &iwp_u->length) ||
1797 __get_user(flags, &iwp_u->flags))
1798 return -EFAULT;
1799
1800 if (__put_user(compat_ptr(pointer_u), &iwp->pointer) ||
1801 __put_user(length, &iwp->length) ||
1802 __put_user(flags, &iwp->flags))
1803 return -EFAULT;
1804
1805 ret = sys_ioctl(fd, cmd, (unsigned long) iwr);
1806
1807 if (__get_user(pointer, &iwp->pointer) ||
1808 __get_user(length, &iwp->length) ||
1809 __get_user(flags, &iwp->flags))
1810 return -EFAULT;
1811
1812 if (__put_user(ptr_to_compat(pointer), &iwp_u->pointer) ||
1813 __put_user(length, &iwp_u->length) ||
1814 __put_user(flags, &iwp_u->flags))
1815 return -EFAULT;
1816
1817 return ret;
1818}
1819
1820/* Since old style bridge ioctl's endup using SIOCDEVPRIVATE 1761/* Since old style bridge ioctl's endup using SIOCDEVPRIVATE
1821 * for some operations; this forces use of the newer bridge-utils that 1762 * for some operations; this forces use of the newer bridge-utils that
1822 * use compatiable ioctls 1763 * use compatiable ioctls
@@ -2501,36 +2442,6 @@ COMPATIBLE_IOCTL(I2C_TENBIT)
2501COMPATIBLE_IOCTL(I2C_PEC) 2442COMPATIBLE_IOCTL(I2C_PEC)
2502COMPATIBLE_IOCTL(I2C_RETRIES) 2443COMPATIBLE_IOCTL(I2C_RETRIES)
2503COMPATIBLE_IOCTL(I2C_TIMEOUT) 2444COMPATIBLE_IOCTL(I2C_TIMEOUT)
2504/* wireless */
2505COMPATIBLE_IOCTL(SIOCSIWCOMMIT)
2506COMPATIBLE_IOCTL(SIOCGIWNAME)
2507COMPATIBLE_IOCTL(SIOCSIWNWID)
2508COMPATIBLE_IOCTL(SIOCGIWNWID)
2509COMPATIBLE_IOCTL(SIOCSIWFREQ)
2510COMPATIBLE_IOCTL(SIOCGIWFREQ)
2511COMPATIBLE_IOCTL(SIOCSIWMODE)
2512COMPATIBLE_IOCTL(SIOCGIWMODE)
2513COMPATIBLE_IOCTL(SIOCSIWSENS)
2514COMPATIBLE_IOCTL(SIOCGIWSENS)
2515COMPATIBLE_IOCTL(SIOCSIWRANGE)
2516COMPATIBLE_IOCTL(SIOCSIWPRIV)
2517COMPATIBLE_IOCTL(SIOCSIWSTATS)
2518COMPATIBLE_IOCTL(SIOCSIWAP)
2519COMPATIBLE_IOCTL(SIOCGIWAP)
2520COMPATIBLE_IOCTL(SIOCSIWRATE)
2521COMPATIBLE_IOCTL(SIOCGIWRATE)
2522COMPATIBLE_IOCTL(SIOCSIWRTS)
2523COMPATIBLE_IOCTL(SIOCGIWRTS)
2524COMPATIBLE_IOCTL(SIOCSIWFRAG)
2525COMPATIBLE_IOCTL(SIOCGIWFRAG)
2526COMPATIBLE_IOCTL(SIOCSIWTXPOW)
2527COMPATIBLE_IOCTL(SIOCGIWTXPOW)
2528COMPATIBLE_IOCTL(SIOCSIWRETRY)
2529COMPATIBLE_IOCTL(SIOCGIWRETRY)
2530COMPATIBLE_IOCTL(SIOCSIWPOWER)
2531COMPATIBLE_IOCTL(SIOCGIWPOWER)
2532COMPATIBLE_IOCTL(SIOCSIWAUTH)
2533COMPATIBLE_IOCTL(SIOCGIWAUTH)
2534/* hiddev */ 2445/* hiddev */
2535COMPATIBLE_IOCTL(HIDIOCGVERSION) 2446COMPATIBLE_IOCTL(HIDIOCGVERSION)
2536COMPATIBLE_IOCTL(HIDIOCAPPLICATION) 2447COMPATIBLE_IOCTL(HIDIOCAPPLICATION)
@@ -2761,29 +2672,7 @@ COMPATIBLE_IOCTL(USBDEVFS_IOCTL32)
2761HANDLE_IOCTL(I2C_FUNCS, w_long) 2672HANDLE_IOCTL(I2C_FUNCS, w_long)
2762HANDLE_IOCTL(I2C_RDWR, do_i2c_rdwr_ioctl) 2673HANDLE_IOCTL(I2C_RDWR, do_i2c_rdwr_ioctl)
2763HANDLE_IOCTL(I2C_SMBUS, do_i2c_smbus_ioctl) 2674HANDLE_IOCTL(I2C_SMBUS, do_i2c_smbus_ioctl)
2764/* wireless */ 2675/* bridge */
2765HANDLE_IOCTL(SIOCGIWRANGE, do_wireless_ioctl)
2766HANDLE_IOCTL(SIOCGIWPRIV, do_wireless_ioctl)
2767HANDLE_IOCTL(SIOCGIWSTATS, do_wireless_ioctl)
2768HANDLE_IOCTL(SIOCSIWSPY, do_wireless_ioctl)
2769HANDLE_IOCTL(SIOCGIWSPY, do_wireless_ioctl)
2770HANDLE_IOCTL(SIOCSIWTHRSPY, do_wireless_ioctl)
2771HANDLE_IOCTL(SIOCGIWTHRSPY, do_wireless_ioctl)
2772HANDLE_IOCTL(SIOCSIWMLME, do_wireless_ioctl)
2773HANDLE_IOCTL(SIOCGIWAPLIST, do_wireless_ioctl)
2774HANDLE_IOCTL(SIOCSIWSCAN, do_wireless_ioctl)
2775HANDLE_IOCTL(SIOCGIWSCAN, do_wireless_ioctl)
2776HANDLE_IOCTL(SIOCSIWESSID, do_wireless_ioctl)
2777HANDLE_IOCTL(SIOCGIWESSID, do_wireless_ioctl)
2778HANDLE_IOCTL(SIOCSIWNICKN, do_wireless_ioctl)
2779HANDLE_IOCTL(SIOCGIWNICKN, do_wireless_ioctl)
2780HANDLE_IOCTL(SIOCSIWENCODE, do_wireless_ioctl)
2781HANDLE_IOCTL(SIOCGIWENCODE, do_wireless_ioctl)
2782HANDLE_IOCTL(SIOCSIWGENIE, do_wireless_ioctl)
2783HANDLE_IOCTL(SIOCGIWGENIE, do_wireless_ioctl)
2784HANDLE_IOCTL(SIOCSIWENCODEEXT, do_wireless_ioctl)
2785HANDLE_IOCTL(SIOCGIWENCODEEXT, do_wireless_ioctl)
2786HANDLE_IOCTL(SIOCSIWPMKSA, do_wireless_ioctl)
2787HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl) 2676HANDLE_IOCTL(SIOCSIFBR, old_bridge_ioctl)
2788HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl) 2677HANDLE_IOCTL(SIOCGIFBR, old_bridge_ioctl)
2789/* Not implemented in the native kernel */ 2678/* Not implemented in the native kernel */