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] [day] [month] [year] [list]
Message-ID: <ac3eb2510908120732x790868bau318caa614dd5c877@mail.gmail.com>
Date:	Wed, 12 Aug 2009 16:32:48 +0200
From:	Kay Sievers <kay.sievers@...y.org>
To:	"Rick L. Vinyard, Jr." <rvinyard@...nmsu.edu>
Cc:	Linux USB <linux-usb@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: Event notification when sysfs attribute changes

On Wed, Aug 12, 2009 at 16:26, Rick L. Vinyard, Jr.<rvinyard@...nmsu.edu> wrote:
> I'd like to allow userspace applications to track and display state
> changes (without polling) in a driver that exports attributes via sysfs.
>
> What is the best way to notify userspace applications when a sysfs
> exported attribute changes?
>
> In particular I wanted to drive the notification in the *_store() function
> of the sysfs attribute.
>
> Also, ideally, the mechanism would allow multiple userspace applications
> to hook into the notification.

There is nothing like this which works out-of-the-box. It needs kernel
support for every attribute that should be able to do that. Then
poll() can block until the kernel signifies a change, and return with
ERR, so the listener wakes up and can read the attribute again.

Kay
--
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