lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090420112527.GA6692@dhcp-1-124.tlv.redhat.com>
Date:	Mon, 20 Apr 2009 14:25:27 +0300
From:	"Michael S. Tsirkin" <mst@...hat.com>
To:	"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
	Herbert Xu <herbert@...dor.apana.org.au>,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: [PATCH 0/3] tun: fix aio

tun device currently fills in aio_read/aio_write, however the implementation
corrupts the input iovec through const struct iovec *. As a side effect,
attempts to use io_submit/io_getevents on a tun/tap device result in EINVAL
(after actually sending/consuming a packet).

The following patches make tun_chr_aio_read and tun_chr_aio_write not modify
the iovec so that io_submit/io_getevents succeed, becoming functionally
equivalent to write/read on the device.  I am working on another patch set
supporting zero-copy transmit over tun, which will rely on this functionality,
but I think the patches might be already useful by themself. What do you think?
Please review.

Note: I started out just allocating and copying the iovec rather than adding
yet another skb-iterating routine, but this turned out to add small but
measurable overhead on data path: tx time per packet jumped from 6500 to 6700 ns
(let me know if you want to see that version of the patch).

Michael S. Tsirkin (3):
  net: skb_copy_datagram_const_iovec()
  tun: fix tun_chr_aio_read so that aio works
  tun: fix tun_chr_aio_write so that aio works

 drivers/net/tun.c      |   24 ++++++----
 include/linux/skbuff.h |    8 +++-
 include/linux/socket.h |    6 ++-
 net/core/datagram.c    |  112 +++++++++++++++++++++++++++++++++++++++++++++---
 net/core/iovec.c       |   33 +++++++++++++-
 5 files changed, 161 insertions(+), 22 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ