Skip to contentSkip to conversation

tun new missing ioctl32

DISCUSSION Michael Tokarev 2 participants 3 messages Jan 29, 2009 – Jan 30, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Just saw in dmesg:

ioctl32(kvm:4408): Unknown cmd fd(9) cmd(800454cf){t:'T';sz:4} arg(ffc668e4) on /dev/net/tun

I guess it's the recent stuff, TUNSETOFFLOAD perhaps, which is missing compat_ioctl entry... Who knows this area, care to fix it please? :)

(Yes, 32bit userspace on 64bit kernel)

Thanks!

/mjt

maintainer
#1 lore raw

From: Michael Tokarev <[email protected]>
Date: Fri, 30 Jan 2009 02:43:53 +0300

Quoted 7 lines

Just saw in dmesg:

ioctl32(kvm:4408): Unknown cmd fd(9) cmd(800454cf){t:'T';sz:4} arg(ffc668e4) on /dev/net/tun

I guess it's the recent stuff, TUNSETOFFLOAD perhaps, which is missing compat_ioctl entry... Who knows this area, care to fix it please? :)

I'll take a look at this, thanks for the report.

maintainer
#2 lore raw

From: David Miller <[email protected]>
Date: Thu, 29 Jan 2009 16:06:00 -0800 (PST)

Quoted 5 lines

From: Michael Tokarev <[email protected]>
Date: Fri, 30 Jan 2009 02:43:53 +0300

Quoted 2 lines

Just saw in dmesg:

Quoted 7 lines
Quoted 5 lines

ioctl32(kvm:4408): Unknown cmd fd(9) cmd(800454cf){t:'T';sz:4} arg(ffc668e4) on /dev/net/tun

I guess it's the recent stuff, TUNSETOFFLOAD perhaps, which is missing compat_ioctl entry... Who knows this area, care to fix it please? :)

I'll take a look at this, thanks for the report.

This should fix it:

tun: Add some missing TUN compat ioctl translations.

Based upon a report from Michael Tokarev <[email protected]>:

	Just saw in dmesg:

	ioctl32(kvm:4408): Unknown cmd fd(9) cmd(800454cf){t:'T';sz:4} arg(ffc668e4) on /dev/net/tun
---
 fs/compat_ioctl.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
fs/compat_ioctl.c +7 -0
index 5235c67..c8f8d59 100644
@@ -538,6 +538,7 @@ static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg)
 		 * cannot be fixed without breaking all existing apps.
 		 */
 		case TUNSETIFF:
+		case TUNGETIFF:
 		case SIOCGIFFLAGS:
 		case SIOCGIFMETRIC:
 		case SIOCGIFMTU:
@@ -1982,6 +1983,11 @@ COMPATIBLE_IOCTL(TUNSETNOCSUM)
 COMPATIBLE_IOCTL(TUNSETDEBUG)
 COMPATIBLE_IOCTL(TUNSETPERSIST)
 COMPATIBLE_IOCTL(TUNSETOWNER)
+COMPATIBLE_IOCTL(TUNSETLINK)
+COMPATIBLE_IOCTL(TUNSETGROUP)
+COMPATIBLE_IOCTL(TUNGETFEATURES)
+COMPATIBLE_IOCTL(TUNSETOFFLOAD)
+COMPATIBLE_IOCTL(TUNSETTXFILTER)
 /* Big V */
 COMPATIBLE_IOCTL(VT_SETMODE)
 COMPATIBLE_IOCTL(VT_GETMODE)
@@ -2573,6 +2579,7 @@ HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc)
 HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc)
 HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc)
 HANDLE_IOCTL(TUNSETIFF, dev_ifsioc)
+HANDLE_IOCTL(TUNGETIFF, dev_ifsioc)
 HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl)
 HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl)
 HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl)
Signature · 1 line
1.6.1.2.253.ga34a