Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jan 2011 02:15:41 +0300
From:      Peter Vereshagin <peter@vereshagin.org>
To:        freebsd-questions@freebsd.org
Subject:   use can't open tap
Message-ID:  <20110103231540.GB5302@external.screwed.box>

next in thread | raw e-mail | index | archive | help
You know St. Peter won't call my name, freebsd-questions!

Recently I upgraded the base system (7.3-stable to 7.4-prerelease) and my qemu
can not open tap device after that:
===
# ifconfig tap4 create 
# chmod o+rw /dev/tap4
# ls -l /dev/tap4
crw-rw-rw-  1 root  qemu    0, 249 Jan  3 18:59 /dev/tap4
# :> /dev/tap4
# su - user
$ id
uid=XXXXX(user) gid=XXXXX(user) groups=XXXXX(user), ....,ZZZZ(qemu)
$ :> /dev/tap4
-su: /dev/tap4: Operation not permitted
===

Is anything wrong here with the system?

qemu is traced like this
===
  3580 qemu     STRU  struct stat {dev=117505792, ino=234, mode=crw--w---- , nlink=1, uid=10010, gid=4, rdev=234, atime=1294095695, stime=1294095695, ctime=1294095695, birthtime=-1, size=0, blksize=4096, blocks=0, flags=0x0 }
  3580 qemu     RET   fstat 0
  3580 qemu     CALL  clock_gettime(0x4,0xbfbfe5c0)
  3580 qemu     RET   clock_gettime 0
  3580 qemu     CALL  sigaction(SIGALRM,0xbfbfe47c,0)
  3580 qemu     RET   sigaction 0
  3580 qemu     CALL  setitimer(0,0xbfbfe494,0)
  3580 qemu     RET   setitimer 0
  3580 qemu     CALL  open(0xbfbfe2ec,O_RDWR,<unused>0)
  3580 qemu     NAMI  "/dev/tap4"
  3580 qemu     RET   open -1 errno 1 Operation not permitted
  3580 qemu     CALL  write(0x2,0xbfbfcfc0,0x5a)
  3580 qemu     GIO   fd 2 wrote 90 bytes
       "warning: could not open /dev/tap4 (Operation not permitted): no virtual network emulation
       "
===

and qemu runs well as a root user. sysctl looks like this:
===
$ sysctl -a | grep tap
net.link.tap.debug: 1
net.link.tap.devfs_cloning: 1
net.link.tap.up_on_open: 1
net.link.tap.user_open: 1
debug.if_tap_debug: 1
hw.ata.atapi_dma: 1
hw.psm.tap_timeout: 125000
hw.psm.tap_threshold: 25
dev.atapci.0.%desc: VIA 8233A UDMA133 controller
dev.atapci.0.%driver: atapci
dev.atapci.0.%location: slot=17 function=1 handle=\_SB_.PCI0.IDE0
dev.atapci.0.%pnpinfo: vendor=0x1106 device=0x0571 subvendor=0x1043 subdevice=0x808c class=0x01018a
dev.atapci.0.%parent: pci0
dev.ata.0.%parent: atapci0
dev.ata.1.%parent: atapci0
dev.atapicam.0.%desc: ATAPI CAM Attachment
dev.atapicam.0.%driver: atapicam
dev.atapicam.0.%parent: ata0
dev.atapicam.1.%desc: ATAPI CAM Attachment
dev.atapicam.1.%driver: atapicam
dev.atapicam.1.%parent: ata1
===

Should I report this as a bug?
Thank you.

73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB  12F8 0CE1 4AAC A0E2 6627)
--
http://vereshagin.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110103231540.GB5302>