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
| ||
|
Date: Thu, 3 Jun 2010 03:27:46 +0200 From: Florian Mickler <florian@...kler.org> To: Dmitry Torokhov <dmitry.torokhov@...il.com> Cc: Neil Brown <neilb@...e.de>, Arve Hjønnevåg <arve@...roid.com>, Thomas Gleixner <tglx@...utronix.de>, "Rafael J. Wysocki" <rjw@...k.pl>, Alan Stern <stern@...land.harvard.edu>, Felipe Balbi <felipe.balbi@...ia.com>, Peter Zijlstra <peterz@...radead.org>, "Paul@...p1.linux-foundation.org" <Paul@...p1.linux-foundation.org>, LKML <linux-kernel@...r.kernel.org>, Linux OMAP Mailing List <linux-omap@...r.kernel.org>, Linux PM <linux-pm@...ts.linux-foundation.org>, Alan Cox <alan@...rguk.ukuu.org.uk>, James Bottomley <James.Bottomley@...e.de> Subject: Re: [PATCH] - race-free suspend. Was: Re: [linux-pm] [PATCH 0/8] Suspend block api (version 8) On Wed, 2 Jun 2010 16:32:44 -0700 Dmitry Torokhov <dmitry.torokhov@...il.com> wrote: > On Wed, Jun 02, 2010 at 09:05:21PM +0200, Florian Mickler wrote: > > On Wed, 2 Jun 2010 21:02:24 +1000 > > Neil Brown <neilb@...e.de> wrote: > > > > > > And this decision (to block suspend) really needs to be made in the driver, > > > not in userspace? > > > > Well, it fits. The requirement is a direct consequence of the intimate > > knowledge the driver has about the driven devices. > > That is not really true. A driver does have intimate knowledge of the > device, however it does not necessarily have an idea about the data read > from the device. Consider the gpio_matrix driver: Arve says that it has > to continue scanning matrix once first interrupt arrvies. But it really > depends on what key has been pressed - if user pressed KEY_SUSPEND or > KEY_POWER it cmight be better if we did not wait for key release but > initiated the action right away. The decision on how system reacts to a > key press does not belong to the driver but really to userspace. > I can't follow the gpio_matrix_driver example, but your point is obviously true. A device should never register a constraint because of the data it handles. That belongs into userspace. Or wherever the data is consumed. I'm obviously not trying to say that a network driver should block suspend while I'm on facebook. Or unblock when visiting m$.com. That would be absurd. But, there are of course places in the kernel, where some kernel code listens to data. For example the packet-filtering. Or sysrq-keys. But I don't know how that relates to suspend_blockers now... ? Mind if I rephrase the quote? From: "Well, it fits. The requirement is a direct consequence of the intimate knowledge the driver has about the driven devices." To: "It fits, when the requirement is a direct consequence of the intimate knowledge the driver has about the driven devices." Cheers, Flo p.s.: tsss.... language... what a broken concept. And yet we have to work with it. -- 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