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:	Fri, 1 Jun 2012 15:34:54 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Oliver Neukum <oneukum@...e.de>
Cc:	Stefani Seibold <stefani@...bold.net>,
	linux-kernel@...r.kernel.org, greg@...ah.com,
	gregkh@...uxfoundation.org,
	thomas.braunstorfinger@...de-schwarz.com
Subject: Re: [PATCH] add new NRP power meter USB device driver

On Fri, 1 Jun 2012 16:16:36 +0200
Oliver Neukum <oneukum@...e.de> wrote:

> Am Donnerstag, 31. Mai 2012, 11:21:40 schrieb Stefani Seibold:
> > On Thu, 2012-05-31 at 10:20 +0200, Oliver Neukum wrote:
> > 
> > > > > 
> > > > > > +		if (arg) {
> > > > > > +			ret = wait_event_interruptible_timeout(
> > > > > > +				dev->out_running.wait,
> > > > > > +				list_empty(&dev->out_running.urb_list),
> > > > > > +				msecs_to_jiffies(arg));
> > > > > > +			if (!ret)
> > > > > > +				return -ETIMEDOUT;
> > > > > > +			if (ret < 0)
> > > > > > +				return ret;
> > > > > > +			return 0;
> > > > > > +		} else {
> > > > > > +			return wait_event_interruptible(
> > > > > > +				dev->out_running.wait,
> > > > > > +				list_empty(&dev->out_running.urb_list));
> > > > > > +		}
> > > > > > +		break;
> > > > > 
> > > > > This is very ugly. If you need fsync(), then implement it.
> > > > > 
> > > > 
> > > > fsync() did not meat the requirements, since i need in some case a
> > > > timeout for the device. poll() will also not help, since it signals only
> > > > that there is space to write.
> > > 
> > > Well, then implement fsync() with interruptible sleep and use a timer
> > > in user space.
> > > 
> > 
> > But this will not solve the problem of older software which is still
> > depending on this ioctl.
> 
> Yes. I guess it might be included in a depreated form. However
> a sane alternative must be provided.

It's a new kernel driver it's not bound to any existing API and we
regularly enforce a sane API on drivers being merged so I think the
legacy stuff is just "tough" - the out of tree driver will work fine with
any legacy code.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ