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]
Message-ID: <CAMP5XgfpM8309wHMW+W0XrEYvsz6pYdcwdqxkp-Jgpbm1m5hgQ@mail.gmail.com>
Date:	Wed, 15 Feb 2012 21:24:31 -0800
From:	Arve Hjønnevåg <arve@...roid.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	linux-input@...r.kernel.org, linux-pm@...r.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Matthew Garrett <mjg@...hat.com>,
	Chase Douglas <chase.douglas@...onical.com>,
	Mark Brown <broonie@...nsource.wolfsonmicro.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Input: Add ioctl to block suspend while event queue is
 not empty.

2012/2/15 Rafael J. Wysocki <rjw@...k.pl>:
...
> Still, I have one issue with adding those ioctls.  Namely, wouldn't it be
> simpler to treat all events coming from wakeup devices as wakeup events?
>

User-space needs to block suspend between select/poll and read for
this to work, so an explicit call to enable this is useful.

> With the new ioctls user space can "mark" a queue of events coming out of
> a device that's not a wakeup one as a "wakeup source", which doesn't seem to
> be correct.
>

OK, but I don't think this is a big problem.

> Conversely, with those ioctls user space can effectively turn events coming
> out of a wakeup device into non-wakeup ones, which doesn't seem to be correct
> either.
>

I don't agree with this. There can be multiple readers on an input
device. Only the reader that is responsible for acting on the wakeup
event should call this ioctl.

> So, I think evdev client queue's wakeup source (or wakelock) should stay active
> if there are any events in the queue and the underlying device is a wakeup one,

I don't want additional readers of the device to prevent suspend.

> i.e. device_may_wakeup() returns true for it.  Then, we won't need the new
> ioctls at all and user space will still be able to control which events are to
> be regarded as wakeup ones by changing the wakeup settings of the devices that
> generate them.
>

I don't think this is currently hooked up for most of the devices we
have. If we do add a dynamic wakeup settings I would prefer to have an
ioctl to set which events on a device should be enabled for wakeup (or
just enabled) instead of switching the entire drive. That way we could
turn off unneeded rows and columns in a key matrix.

-- 
Arve Hjønnevåg
--
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