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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 8 Apr 2008 04:35:53 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	virtualization@...ts.linux-foundation.org
Cc:	Rusty Russell <rusty@...tcorp.com.au>,
	linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
	Max Krasnyansky <maxk@...lcomm.com>
Subject: Re: [PATCH RFC 1/5] vringfd syscall

On Saturday 05 April 2008, Rusty Russell wrote:
> +asmlinkage long sys_vringfd(void __user *addr,
> +                           unsigned num_descs,
> +                           u16 __user *last_used)
> +{
> +       int fd, err;
> +       struct file *filp;
> +       struct vring_info *vr;
> +
> +       /* Must be a power of two, and representable by u16 */
> +       if (!num_descs || (num_descs & (num_descs-1)) || num_descs > 65536) {
> +               err = -EINVAL;
> +               goto out;
> +       }
> +
> +       fd = get_unused_fd();
> +       if (fd < 0) {
> +               err = fd;
> +               goto out;
> +       }
> +
> +       filp = alloc_file(vring_mnt, dget(vring_mnt->mnt_root), FMODE_WRITE,
> +                         &vring_fops);
> +       if (!filp) {
> +               err = -ENFILE;
> +               goto put_fd;
> +       }

This looks like a candidate for anon_inode_getfd(), which would let you
get rid of the code for registering your own file system.

	Arnd <><

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ